activerdf_net7 1.6.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. data/CHANGELOG +79 -0
  2. data/LICENSE +504 -0
  3. data/README.rdoc +34 -0
  4. data/activerdf-jena/CHANGELOG +14 -0
  5. data/activerdf-jena/LICENSE +504 -0
  6. data/activerdf-jena/README +57 -0
  7. data/activerdf-jena/Rakefile +87 -0
  8. data/activerdf-jena/TODO +18 -0
  9. data/activerdf-jena/VERSION +1 -0
  10. data/activerdf-jena/ext/antlr-2.7.5.jar +0 -0
  11. data/activerdf-jena/ext/arq-extra.jar +0 -0
  12. data/activerdf-jena/ext/arq.jar +0 -0
  13. data/activerdf-jena/ext/aterm-java-1.6.jar +0 -0
  14. data/activerdf-jena/ext/commons-logging-1.1.jar +0 -0
  15. data/activerdf-jena/ext/concurrent.jar +0 -0
  16. data/activerdf-jena/ext/icu4j_3_4.jar +0 -0
  17. data/activerdf-jena/ext/iri.jar +0 -0
  18. data/activerdf-jena/ext/jena.jar +0 -0
  19. data/activerdf-jena/ext/jenatest.jar +0 -0
  20. data/activerdf-jena/ext/json.jar +0 -0
  21. data/activerdf-jena/ext/junit.jar +0 -0
  22. data/activerdf-jena/ext/log4j-1.2.12.jar +0 -0
  23. data/activerdf-jena/ext/lucene-core-2.0.0.jar +0 -0
  24. data/activerdf-jena/ext/ng4j.jar +0 -0
  25. data/activerdf-jena/ext/pellet.jar +0 -0
  26. data/activerdf-jena/ext/relaxngDatatype.jar +0 -0
  27. data/activerdf-jena/ext/stax-api-1.0.jar +0 -0
  28. data/activerdf-jena/ext/wstx-asl-3.0.0.jar +0 -0
  29. data/activerdf-jena/ext/xercesImpl.jar +0 -0
  30. data/activerdf-jena/ext/xml-apis.jar +0 -0
  31. data/activerdf-jena/ext/xsdlib.jar +0 -0
  32. data/activerdf-jena/lib/activerdf_jena/init.rb +26 -0
  33. data/activerdf-jena/lib/activerdf_jena/jena.rb +59 -0
  34. data/activerdf-jena/lib/activerdf_jena/jena_adapter.rb +515 -0
  35. data/activerdf-jena/lib/activerdf_jena/lucene.rb +22 -0
  36. data/activerdf-jena/lib/activerdf_jena/ng4j.rb +50 -0
  37. data/activerdf-jena/lib/activerdf_jena/ng4j_adapter.rb +379 -0
  38. data/activerdf-jena/lib/activerdf_jena/pellet.rb +25 -0
  39. data/activerdf-jena/test/bnode_org_rss.rdf +793 -0
  40. data/activerdf-jena/test/eyal-foaf.nt +39 -0
  41. data/activerdf-jena/test/fun_with_bnodes.nt +2 -0
  42. data/activerdf-jena/test/s1.n3 +18 -0
  43. data/activerdf-jena/test/test_data.nt +32 -0
  44. data/activerdf-jena/test/test_jena_adapter.rb +451 -0
  45. data/activerdf-jena/test/test_ng4j_adapter.rb +354 -0
  46. data/activerdf-rdflite/CHANGELOG +31 -0
  47. data/activerdf-rdflite/LICENSE +504 -0
  48. data/activerdf-rdflite/README +16 -0
  49. data/activerdf-rdflite/Rakefile +73 -0
  50. data/activerdf-rdflite/VERSION +1 -0
  51. data/activerdf-rdflite/lib/activerdf_rdflite/fetching.rb +34 -0
  52. data/activerdf-rdflite/lib/activerdf_rdflite/init.rb +13 -0
  53. data/activerdf-rdflite/lib/activerdf_rdflite/rdflite.rb +582 -0
  54. data/activerdf-rdflite/lib/activerdf_rdflite/suggesting.rb +87 -0
  55. data/activerdf-rdflite/test/test_bnode_data.nt +5 -0
  56. data/activerdf-rdflite/test/test_data.nt +32 -0
  57. data/activerdf-rdflite/test/test_escaped_data.nt +2 -0
  58. data/activerdf-rdflite/test/test_fetching.rb +33 -0
  59. data/activerdf-rdflite/test/test_rdflite.rb +277 -0
  60. data/activerdf-redland/CHANGELOG +12 -0
  61. data/activerdf-redland/LICENSE +504 -0
  62. data/activerdf-redland/README +9 -0
  63. data/activerdf-redland/Rakefile +72 -0
  64. data/activerdf-redland/VERSION +1 -0
  65. data/activerdf-redland/lib/activerdf_redland/init.rb +10 -0
  66. data/activerdf-redland/lib/activerdf_redland/redland.rb +362 -0
  67. data/activerdf-redland/test/test_person_data.nt +42 -0
  68. data/activerdf-redland/test/test_redland_adapter.rb +242 -0
  69. data/activerdf-sesame/CHANGELOG +6 -0
  70. data/activerdf-sesame/LICENSE +10 -0
  71. data/activerdf-sesame/LICENSE-aduna +10 -0
  72. data/activerdf-sesame/LICENSE-lgpl +504 -0
  73. data/activerdf-sesame/README +33 -0
  74. data/activerdf-sesame/Rakefile +77 -0
  75. data/activerdf-sesame/VERSION +1 -0
  76. data/activerdf-sesame/ext/commons-codec-1.3.jar +0 -0
  77. data/activerdf-sesame/ext/commons-dbcp-1.2.2.jar +0 -0
  78. data/activerdf-sesame/ext/commons-httpclient-3.1.jar +0 -0
  79. data/activerdf-sesame/ext/commons-logging-1.1.1.jar +0 -0
  80. data/activerdf-sesame/ext/commons-pool-1.3.jar +0 -0
  81. data/activerdf-sesame/ext/commons-pool-1.5.2.jar +0 -0
  82. data/activerdf-sesame/ext/junit-3.8.2.jar +0 -0
  83. data/activerdf-sesame/ext/openrdf-sesame-2.0-onejar.jar +0 -0
  84. data/activerdf-sesame/ext/openrdf-sesame-2.3-pr1-onejar.jar +0 -0
  85. data/activerdf-sesame/ext/slf4j-api-1.4.3.jar +0 -0
  86. data/activerdf-sesame/ext/slf4j-nop-1.4.3.jar +0 -0
  87. data/activerdf-sesame/ext/wrapper-sesame2.jar +0 -0
  88. data/activerdf-sesame/java/build.number +3 -0
  89. data/activerdf-sesame/java/build.xml +313 -0
  90. data/activerdf-sesame/java/javadoc/allclasses-frame.html +31 -0
  91. data/activerdf-sesame/java/javadoc/allclasses-noframe.html +31 -0
  92. data/activerdf-sesame/java/javadoc/constant-values.html +146 -0
  93. data/activerdf-sesame/java/javadoc/deprecated-list.html +146 -0
  94. data/activerdf-sesame/java/javadoc/help-doc.html +223 -0
  95. data/activerdf-sesame/java/javadoc/index-files/index-1.html +150 -0
  96. data/activerdf-sesame/java/javadoc/index-files/index-10.html +145 -0
  97. data/activerdf-sesame/java/javadoc/index-files/index-2.html +157 -0
  98. data/activerdf-sesame/java/javadoc/index-files/index-3.html +146 -0
  99. data/activerdf-sesame/java/javadoc/index-files/index-4.html +145 -0
  100. data/activerdf-sesame/java/javadoc/index-files/index-5.html +145 -0
  101. data/activerdf-sesame/java/javadoc/index-files/index-6.html +142 -0
  102. data/activerdf-sesame/java/javadoc/index-files/index-7.html +145 -0
  103. data/activerdf-sesame/java/javadoc/index-files/index-8.html +152 -0
  104. data/activerdf-sesame/java/javadoc/index-files/index-9.html +146 -0
  105. data/activerdf-sesame/java/javadoc/index.html +36 -0
  106. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/WrapperForSesame2.html +665 -0
  107. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/class-use/WrapperForSesame2.html +144 -0
  108. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-frame.html +32 -0
  109. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-summary.html +157 -0
  110. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-tree.html +150 -0
  111. data/activerdf-sesame/java/javadoc/org/activerdf/wrapper/sesame2/package-use.html +144 -0
  112. data/activerdf-sesame/java/javadoc/overview-summary.html +156 -0
  113. data/activerdf-sesame/java/javadoc/overview-tree.html +152 -0
  114. data/activerdf-sesame/java/javadoc/package-list +1 -0
  115. data/activerdf-sesame/java/javadoc/resources/inherit.gif +0 -0
  116. data/activerdf-sesame/java/javadoc/stylesheet.css +29 -0
  117. data/activerdf-sesame/java/lib/commons-codec-1.3.jar +0 -0
  118. data/activerdf-sesame/java/lib/commons-dbcp-1.2.2.jar +0 -0
  119. data/activerdf-sesame/java/lib/commons-httpclient-3.1.jar +0 -0
  120. data/activerdf-sesame/java/lib/commons-logging-1.1.1.jar +0 -0
  121. data/activerdf-sesame/java/lib/commons-pool-1.3.jar +0 -0
  122. data/activerdf-sesame/java/lib/commons-pool-1.5.2.jar +0 -0
  123. data/activerdf-sesame/java/lib/junit-3.8.2.jar +0 -0
  124. data/activerdf-sesame/java/lib/openrdf-sesame-2.0-onejar.jar +0 -0
  125. data/activerdf-sesame/java/lib/openrdf-sesame-2.3-pr1-onejar.jar +0 -0
  126. data/activerdf-sesame/java/lib/slf4j-api-1.4.3.jar +0 -0
  127. data/activerdf-sesame/java/lib/slf4j-nop-1.4.3.jar +0 -0
  128. data/activerdf-sesame/java/manifest.mf +3 -0
  129. data/activerdf-sesame/java/settings.xml +135 -0
  130. data/activerdf-sesame/java/src/org/activerdf/wrapper/sesame2/WrapperForSesame2.java +145 -0
  131. data/activerdf-sesame/java/test-src/org/activerdf/wrapper/sesame2/TestWrapperForSesame2.java +41 -0
  132. data/activerdf-sesame/lib/activerdf_sesame/init.rb +11 -0
  133. data/activerdf-sesame/lib/activerdf_sesame/sesame.rb +400 -0
  134. data/activerdf-sesame/test/eyal-foaf.nt +39 -0
  135. data/activerdf-sesame/test/eyal-foaf.rdf +65 -0
  136. data/activerdf-sesame/test/test_sesame_adapter.rb +341 -0
  137. data/activerdf-sparql/CHANGELOG +35 -0
  138. data/activerdf-sparql/LICENSE +504 -0
  139. data/activerdf-sparql/README +10 -0
  140. data/activerdf-sparql/Rakefile +78 -0
  141. data/activerdf-sparql/VERSION +1 -0
  142. data/activerdf-sparql/lib/activerdf_sparql/init.rb +10 -0
  143. data/activerdf-sparql/lib/activerdf_sparql/sparql.rb +212 -0
  144. data/activerdf-sparql/lib/activerdf_sparql/sparql_result_parser.rb +55 -0
  145. data/activerdf-sparql/test/test_sparql_adapter.rb +108 -0
  146. data/activerdf-yars/LICENSE +504 -0
  147. data/activerdf-yars/README +10 -0
  148. data/activerdf-yars/Rakefile +38 -0
  149. data/activerdf-yars/lib/activerdf_yars/init.rb +10 -0
  150. data/activerdf-yars/lib/activerdf_yars/jars2.rb +119 -0
  151. data/lib/active_rdf.rb +85 -0
  152. data/lib/active_rdf/directaccess/direct_access.rb +49 -0
  153. data/lib/active_rdf/federation/active_rdf_adapter.rb +47 -0
  154. data/lib/active_rdf/federation/connection_pool.rb +156 -0
  155. data/lib/active_rdf/federation/federation_manager.rb +112 -0
  156. data/lib/active_rdf/instance_exec.rb +13 -0
  157. data/lib/active_rdf/objectmanager/bnode.rb +7 -0
  158. data/lib/active_rdf/objectmanager/literal.rb +71 -0
  159. data/lib/active_rdf/objectmanager/namespace.rb +106 -0
  160. data/lib/active_rdf/objectmanager/object_manager.rb +119 -0
  161. data/lib/active_rdf/objectmanager/ordered_set.rb +116 -0
  162. data/lib/active_rdf/objectmanager/property_list.rb +76 -0
  163. data/lib/active_rdf/objectmanager/resource.rb +609 -0
  164. data/lib/active_rdf/objectmanager/resource_like.rb +28 -0
  165. data/lib/active_rdf/queryengine/ntriples_parser.rb +90 -0
  166. data/lib/active_rdf/queryengine/query.rb +245 -0
  167. data/lib/active_rdf/queryengine/query2jars2.rb +22 -0
  168. data/lib/active_rdf/queryengine/query2sparql.rb +139 -0
  169. data/lib/active_rdf_helpers.rb +30 -0
  170. data/lib/active_rdf_log.rb +100 -0
  171. data/test/common.rb +119 -0
  172. data/test/directaccess/test_direct_access.rb +64 -0
  173. data/test/federation/test_connection_pool.rb +86 -0
  174. data/test/federation/test_federation_manager.rb +145 -0
  175. data/test/objectmanager/test_literal.rb +52 -0
  176. data/test/objectmanager/test_namespace.rb +83 -0
  177. data/test/objectmanager/test_object_manager.rb +96 -0
  178. data/test/objectmanager/test_ordered_set.rb +110 -0
  179. data/test/objectmanager/test_resource_reading.rb +150 -0
  180. data/test/objectmanager/test_resource_writing.rb +39 -0
  181. data/test/objectmanager/test_talia_syntax.rb +68 -0
  182. data/test/queryengine/my_external_resource.rb +24 -0
  183. data/test/queryengine/test_external_resource_class.rb +49 -0
  184. data/test/queryengine/test_ntriples_parser.rb +71 -0
  185. data/test/queryengine/test_query.rb +55 -0
  186. data/test/queryengine/test_query2jars2.rb +51 -0
  187. data/test/queryengine/test_query2sparql.rb +76 -0
  188. data/test/queryengine/test_query_engine.rb +52 -0
  189. data/test/test_adapters.rb +58 -0
  190. metadata +266 -0
@@ -0,0 +1,33 @@
1
+ The Sesame2 adapter for ActiveRDF connects ActiveRDF with the Sesame2 RDF store.
2
+
3
+ == Benefits and disadvantages
4
+ Using Sesame2 through this adapter has the following benefits :
5
+ * Good performance, because java code is used for all communication
6
+ * Support for RDF Schema inferencing
7
+ * Support for quads/named graphs (as soon as I get around to implementing them in the adapter)
8
+
9
+ The disadvantages currently are:
10
+ * Requires installation of jruby and manual setting of the Java CLASSPATH
11
+ * No OWL inferencing (but on other ActiveRDF adapter currently has this anyway)
12
+ * No support for a database backend (Sesame2 uses its own native storage
13
+ interanlly, which is recommended anyway)
14
+
15
+ The adapter uses Sesame 2 Alpha 4, which is distributed as a jar inside this gem.
16
+
17
+ == License
18
+ The adapter is distributed under LGPL, the Sesame2 jar is under the Aduna
19
+ license. See LICENSE for more information.
20
+
21
+ == Installation
22
+ For installation instructions visit: http://wiki.activerdf.org/ActiveRDF_and_RoR_and_Sesame
23
+
24
+ == More info
25
+ For more information about ActiveRDF visit:
26
+ * http://www.activerdf.org/
27
+ * http://wiki.activerdf.org/ActiveRDF
28
+
29
+ For more information about Sesame 2, visit:
30
+ * http://www.openrdf.org/
31
+
32
+ == Athors
33
+ * Benjamin Heitmann <benjamin.heitmann@deri.org>
@@ -0,0 +1,77 @@
1
+ require 'meta_project'
2
+ require 'rake'
3
+ require 'rake/testtask'
4
+ require 'rake/clean'
5
+ require 'rake/gempackagetask'
6
+ require 'rake/rdoctask'
7
+ require 'rake/contrib/xforge'
8
+ require 'rubygems'
9
+ require 'fileutils'
10
+ require '../tools/rakehelp'
11
+
12
+ $version = IO.read('VERSION').strip
13
+ $name = 'activerdf_sesame'
14
+ $project = MetaProject::Project::XForge::RubyForge.new('activerdf')
15
+
16
+ # setup tests
17
+ #setup_tests
18
+ setup_clean ["pkg", "lib/*.bundle", "*.gem", ".config"]
19
+
20
+ # setup rdoc
21
+ Rake::RDocTask.new do |rdoc|
22
+ rdoc.rdoc_dir = 'doc/rdoc'
23
+ rdoc.options << '--line-numbers'
24
+ rdoc.rdoc_files.add ['README', 'LICENSE', 'lib/**/*.rb', 'doc/**/*.rdoc']
25
+ end
26
+
27
+ desc "Does a full compile, test run"
28
+ task :default => [:test, :package]
29
+
30
+ # define package task
31
+ setup_gem($name, $version) do |spec|
32
+ spec.summary = "jruby adapter to sesame2 datastore (for usage in ActiveRDF)"
33
+ spec.description = spec.summary
34
+ spec.author="Benjamin Heitmann <benjamin.heitmann@deri.org>"
35
+ spec.add_dependency('gem_plugin', '>= 0.2.1')
36
+ spec.add_dependency('activerdf', '>= 1.6.4')
37
+ spec.files = FileList[ 'ext/*.jar', '[A-Z]*', 'lib/**/*.rb', 'test/**/*' ].to_a
38
+ end
39
+
40
+ task :build_java do
41
+ Dir::chdir(File.expand_path(File.join(File.dirname(__FILE__), 'java')))
42
+ `ant`
43
+ end
44
+
45
+ task :verify_rubyforge do
46
+ raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
47
+ raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
48
+ end
49
+
50
+ desc "Release files on RubyForge."
51
+ task :release_files => [:clean, :verify_rubyforge, :package ] do
52
+ release_files = FileList["pkg/#$name-#$version.gem"]
53
+
54
+ Rake::XForge::Release.new($project) do |release|
55
+ release.user_name = ENV['RUBYFORGE_USER']
56
+ release.password = ENV['RUBYFORGE_PASSWORD']
57
+ release.files = release_files.to_a
58
+ release.release_name = "#$name #$version"
59
+ release.package_name = "activerdf-sesame"
60
+ release.release_notes = ""
61
+
62
+ changes = []
63
+ File.open("CHANGELOG") do |file|
64
+ current = true
65
+
66
+ file.each do |line|
67
+ line.chomp!
68
+ if current and line =~ /^==/
69
+ current = false; next
70
+ end
71
+ break if line.empty? and not current
72
+ changes << line
73
+ end
74
+ end
75
+ release.release_changes = changes.join("\n")
76
+ end
77
+ end
@@ -0,0 +1 @@
1
+ 0.2.2
@@ -0,0 +1,3 @@
1
+ #Build Number for ANT. Do not edit!
2
+ #Mon Sep 14 13:41:03 CEST 2009
3
+ build.number=129
@@ -0,0 +1,313 @@
1
+ <?xml version="1.0"?>
2
+ <project name="generic-build" default="build" basedir=".">
3
+
4
+ <property name="destination" value="../ext" />
5
+
6
+ <!--
7
+ This is the generic ant build file
8
+
9
+ The configuration for the targets is in ./settings.xml.
10
+
11
+
12
+ It currently supports the following targets:
13
+ - compile: compile all sources
14
+ - jar: create a jar file from the compiled sources
15
+ - build: put the jar and all librarys from ./lib into ${destination} (needed by the buildmanager)
16
+ - compile-tests: compile the test sources
17
+ - run-tests: run the compiled tests
18
+ - dist-zip: distribution zip file for end users (jar, libs and javadoc)
19
+ - src-zip: distribution zip only with all sources
20
+ - all-zip: distribution zip with jar, libs, javadoc and all sources
21
+
22
+ -->
23
+
24
+ <!-- settings.xml contains _ALL_ project specific settings -->
25
+ <import file="settings.xml"/>
26
+
27
+ <target name="log" description="enables tracking the build process itself">
28
+ <buildnumber file="build.number"/>
29
+ </target>
30
+
31
+ <target name="temp" description="create and clean temp, create and clean dest">
32
+ <mkdir description="prepare temp dir" dir="temp"/>
33
+ <mkdir description="prepare temp dir" dir="dest"/>
34
+ <delete includeemptydirs="true">
35
+ <fileset dir="temp" includes="**/*"/>
36
+ <fileset dir="dest" includes="**/*"/>
37
+ </delete>
38
+ <mkdir description="prepare temp dir" dir="temp/dest"/>
39
+ <mkdir description="prepare temp dir" dir="temp/distribution"/>
40
+ <mkdir dir="${destination}"/>
41
+ </target>
42
+
43
+
44
+ <target name="compile" depends="log, temp" description="compile the sources for everything except tests">
45
+ <echo>Compiling ...</echo>
46
+ <mkdir dir="temp/build" />
47
+ <!-- debug level can be removed ot get smaller jars -->
48
+ <javac
49
+ destdir="temp/build"
50
+ compiler="javac1.5"
51
+ source="1.5"
52
+ verbose="false"
53
+ debug="on"
54
+ debuglevel="lines,vars,source"
55
+ >
56
+ <src refid="src-path" />
57
+ <classpath refid="src-classpath"/>
58
+ </javac>
59
+ </target>
60
+
61
+ <target name="jar" depends="compile" description="make the jar library of all sources except tests">
62
+ <mkdir dir="temp/manifest" />
63
+ <echo>Creating manifest ...</echo>
64
+ <manifest file="temp/manifest/MANIFEST.MF" >
65
+ <attribute name="Built-By" value="${user.name}"/>
66
+ <attribute name="Built-Number" value="${build.number}"/>
67
+ <section name="common">
68
+ <attribute name="Specification-Title" value="Example"/>
69
+ <attribute name="Specification-Version" value="${version-number}"/>
70
+ <attribute name="Specification-Vendor" value="${creator}"/>
71
+ <attribute name="Implementation-Title" value="${product-title}"/>
72
+ <attribute name="Implementation-Version" value="${version-number} ${TODAY}"/>
73
+ <attribute name="Implementation-Vendor" value="${creator}"/>
74
+ </section>
75
+ </manifest>
76
+ <echo>Creating JAR ...</echo>
77
+ <jar compress="true" manifest="temp/manifest/MANIFEST.MF" manifestencoding="UTF-8"
78
+ destfile="${destination}/${product-name}.jar">
79
+ <fileset dir="temp/build/">
80
+ <include name="**"/>
81
+ </fileset>
82
+ <fileset refid="jarfile-includes"/>
83
+ </jar>
84
+ </target>
85
+
86
+ <target name="clean-dest" description="Clean ${destination}">
87
+ <delete dir="${destination}" />
88
+ </target>
89
+
90
+ <!-- build manager targets -->
91
+
92
+ <target name="build" depends="clean-dest, jar" description="copy the jar and all libs of this project to ${destination} (used by the buildmanager)">
93
+ <echo>Copying all libs and the jar to ${destination}</echo>
94
+ <mkdir dir="${destination}" />
95
+ <copy description="copy all libs on which this project depends" todir="${destination}">
96
+ <fileset refid="all-libs" />
97
+ <fileset refid="export-libs" />
98
+ </copy>
99
+ </target>
100
+
101
+
102
+ <!-- automated testing -->
103
+
104
+ <target name="compile-tests" depends="compile" description="compile the tests">
105
+ <mkdir description="prepare test temp dir" dir="temp/build-test"/>
106
+ <echo>Compiling test classes ...</echo>
107
+ <javac
108
+ destdir="temp/build-test"
109
+ compiler="javac1.5"
110
+ source="1.5"
111
+ verbose=""
112
+ debug="on"
113
+ debuglevel="lines,vars,source"
114
+ >
115
+ <src refid="test-src-path"/>
116
+ <classpath refid="test-src-classpath"/>
117
+ </javac>
118
+ </target>
119
+
120
+ <target name="run-tests" depends="compile-tests" description="run the tests">
121
+ <junit haltonfailure="true" printsummary="yes">
122
+ <classpath refid="test-src-classpath"/>
123
+ <formatter type="brief" usefile="false" />
124
+ <batchtest>
125
+ <fileset refid="test-cases"/>
126
+ </batchtest>
127
+ </junit>
128
+ </target>
129
+
130
+ <!-- prepare for the distribution -->
131
+
132
+ <target name="javadoc" depends="temp" description="generate javadoc into javadoc">
133
+ <echo>Generating javadocs ...</echo>
134
+ <mkdir dir="javadoc" />
135
+ <javadoc
136
+ access="public"
137
+ author="true"
138
+ destdir="javadoc"
139
+ doctitle="${product-title}"
140
+ failonerror="true"
141
+ linksource="true"
142
+ nodeprecated="false"
143
+ nodeprecatedlist="false"
144
+ noindex="false"
145
+ nonavbar="false"
146
+ notree="false"
147
+ overview="javadoc/overview.html"
148
+ source="1.5"
149
+ splitindex="true"
150
+ use="true"
151
+ verbose="false"
152
+ version="true"
153
+ windowtitle="${product-title}"
154
+ packagenames="${javadoc-packages}"
155
+ >
156
+ <sourcepath refid="src-path" />
157
+ <classpath>
158
+ <pathelement path="${classpath}"/>
159
+ <fileset refid="all-libs" />
160
+ <pathelement location="build"/>
161
+ </classpath>
162
+ </javadoc>
163
+ </target>
164
+
165
+
166
+ <!-- distribution targets -->
167
+
168
+ <property name="dist-zip" value="${product-name}-${version-number}-dist.zip"
169
+ description="name of the distributed zip file" />
170
+ <property name="dist-zip-folder" value="${product-name}-${version-number}-dist"
171
+ description="name of the base folder of the distributed zip file" />
172
+ <target name="dist-zip" depends="javadoc, build" description="create distribution zip file for end users">
173
+ <mkdir dir="temp/dist-zip/${dist-zip-folder}" />
174
+ <copy description="copy all libs on which this project depends" todir="temp/dist-zip/${dist-zip-folder}/lib">
175
+ <fileset dir="${destination}">
176
+ <include name="**"/>
177
+ </fileset>
178
+ </copy>
179
+
180
+ <mkdir dir="temp/dist-zip/${dist-zip-folder}/doc/" />
181
+ <copy description="copy java doc" todir="temp/dist-zip/${dist-zip-folder}/doc/javadoc">
182
+ <fileset dir="temp/javadoc">
183
+ <include name="**"/>
184
+ </fileset>
185
+ </copy>
186
+
187
+ <copy description="copy documentation" todir="temp/dist-zip/${dist-zip-folder}/doc/">
188
+ <fileset refid="documentation" description="other documentation files"/>
189
+ </copy>
190
+
191
+ <copy todir="temp/dist-zip/${dist-zip-folder}">
192
+ <fileset refid="data" description="files needed at runtime"/>
193
+ </copy>
194
+
195
+ <copy todir="temp/dist-zip/${dist-zip-folder}">
196
+ <fileset dir="." description="include the changelog">
197
+ <include name="changelog.txt"/>
198
+ </fileset>
199
+ </copy>
200
+
201
+ <zip compress="true" whenempty="fail" destfile="dest/${dist-zip}" basedir="temp/dist-zip"/>
202
+ </target>
203
+
204
+ <property name="src-zip" value="${product-name}-${version-number}-src.zip"/>
205
+ <property name="src-zip-folder" value="${product-name}-${version-number}-src"/>
206
+ <target name="src-zip" depends="temp" description="create distribution zip file with the sources">
207
+ <mkdir dir="temp/src-zip/${src-zip-folder}" />
208
+ <copy todir="temp/src-zip/${src-zip-folder}">
209
+ <fileset refid="src" description="source files"/>
210
+ <fileset refid="test-src" description="test source files"/>
211
+ <fileset dir=".">
212
+ <include name="settings.xml"/>
213
+ <include name="build.xml"/>
214
+ <include name="build.number"/>
215
+ </fileset>
216
+ </copy>
217
+
218
+ <zip compress="true" whenempty="fail"
219
+ destfile="dest/${src-zip}" basedir="temp/src-zip"/>
220
+ </target>
221
+
222
+ <property name="all-zip" value="${product-name}-${version-number}-all.zip"/>
223
+ <property name="all-zip-folder" value="${product-name}-${version-number}-all"/>
224
+ <target name="all-zip" depends="javadoc, build"
225
+ description="create distribution zip file with all contents of src and dist zip">
226
+
227
+ <mkdir dir="temp/all-zip/${all-zip-folder}" />
228
+ <copy description="copy all libs on which this project depends" todir="temp/all-zip/${all-zip-folder}/lib">
229
+ <fileset dir="${destination}">
230
+ <include name="**"/>
231
+ </fileset>
232
+ </copy>
233
+
234
+ <mkdir dir="temp/all-zip/${all-zip-folder}/doc/" />
235
+ <copy description="copy java doc" todir="temp/all-zip/${all-zip-folder}/doc/javadoc">
236
+ <fileset dir="temp/javadoc">
237
+ <include name="**"/>
238
+ </fileset>
239
+ </copy>
240
+
241
+ <copy description="copy documentation" todir="temp/all-zip/${all-zip-folder}/doc/">
242
+ <fileset refid="documentation" description="other documentation files"/>
243
+ </copy>
244
+
245
+ <copy todir="temp/all-zip/${all-zip-folder}">
246
+ <fileset refid="data" description="files needed at runtime"/>
247
+ </copy>
248
+
249
+ <copy todir="temp/all-zip/${all-zip-folder}">
250
+ <fileset dir="." description="include the changelog">
251
+ <include name="changelog.txt"/>
252
+ </fileset>
253
+ </copy>
254
+
255
+ <copy todir="temp/all-zip/${all-zip-folder}">
256
+ <fileset refid="src" description="source files"/>
257
+ <fileset refid="test-src" description="test source files"/>
258
+ <fileset dir=".">
259
+ <include name="settings.xml"/>
260
+ <include name="build.xml"/>
261
+ <include name="build.number"/>
262
+ </fileset>
263
+ </copy>
264
+
265
+ <zip compress="true" whenempty="fail" destfile="dest/${all-zip}" basedir="temp/all-zip"/>
266
+
267
+ </target>
268
+
269
+
270
+ <!-- legacy targets for updating the www module/folder of the project -->
271
+
272
+ <target name="www-zip" depends="temp">
273
+ <copy todir="temp/www">
274
+ <fileset dir="${product-www}">
275
+ <exclude name="*.project"/>
276
+ <exclude name="javadoc/**"/>
277
+ <exclude name="bin/**"/>
278
+ <exclude name="*.bak"/>
279
+ </fileset>
280
+ </copy>
281
+ <delete dir="temp/www/bin" />
282
+ <delete dir="temp/www/javadoc" />
283
+ <mkdir dir="temp/dest"/>
284
+ <zip basedir="temp/www" file="temp/dest/${product-name}-${version-number}-www.zip"/>
285
+ </target>
286
+
287
+ <target name="zip-all" depends="src-zip, jar, www-zip, temp, javadoc">
288
+ <copy file="dest/${src-zip}" tofile="temp/dest/${src-zip}" />
289
+ <copy file="dest/${javadoc-zip}" tofile="temp/dest/${javadoc-zip}" />
290
+ <!-- <copy file="dest/${lib-zip}" tofile="temp/dest/${lib-zip}" /> -->
291
+ <copy todir="temp/dest">
292
+ <fileset dir=".">
293
+ <include name="${product-name}-changelog.txt"/>
294
+ </fileset>
295
+ </copy>
296
+
297
+ <zip description="create zip"
298
+ basedir="temp/dest" compress="true" whenempty="fail"
299
+ zipfile="dest/${product-name}-${version-number}-all.zip" />
300
+ </target>
301
+
302
+ <target name="www" depends="javadoc, jar, zip-all">
303
+ <copy description="copy javadoc"
304
+ todir="${product-www}/javadoc">
305
+ <fileset dir="doc" includes="**/*" />
306
+ </copy>
307
+ <copy description="copy destination files"
308
+ todir="${product-www}/bin">
309
+ <fileset dir="dest" includes="**/*" />
310
+ </copy>
311
+ </target>
312
+
313
+ </project>