Switch to unified view

a/build.xml b/build.xml
...
...
74
    <target name="dist" depends="build" description="generate the distribution">
74
    <target name="dist" depends="build" description="generate the distribution">
75
        <mkdir dir="${dist}" />
75
        <mkdir dir="${dist}" />
76
        <jar jarfile="${dist}/${jarfile}" basedir="${build}" manifest="META-INF/MANIFEST.MF" />
76
        <jar jarfile="${dist}/${jarfile}" basedir="${build}" manifest="META-INF/MANIFEST.MF" />
77
    </target>
77
    </target>
78
78
79
  <target name="dist-standalone" depends="dist" description="Build a single jar containing also the full classpath">
80
      <!-- We want to exclude some files from the generated jar, namely individual MANIFEST, LICENSE and README files -->
81
      <!-- Otherwise, if we merge MANIFEST files, we might end up with an invalid main class set (one from the other JAR files) -->
82
83
      <!-- It seems this it is not possibly to exclude specific files in a ZIP/JAR file when using zipgroupfileset -->
84
      <!-- Thus, employing workaround described at http://stackoverflow.com/questions/1274879/ant-exclude-files-from-merged-jar-file -->
85
      <!-- First, bundle all external libraries in a fat jar external-libs -->
86
      <jar jarfile="${dist}/external-libs.jar" filesetmanifest="skip">
87
          <zipgroupfileset dir="${lib}" includes="**/*.jar" />
88
      </jar>
89
      <sleep seconds="1" />
90
91
      <!-- Then merge with our jar, excluding everything in /META-INF in the external-libs fat jar -->
92
      <jar destfile="${dist}/${jarfileFat}" filesetmanifest="merge">
93
          <manifest>
94
              <attribute name="Class-Path" value="${libs.project}" />
95
              <section name="Referenced Libs">
96
                  <attribute name="Info" value="Additional libraries are provided as-is, and might fall under different licenses." />
97
              </section>
98
          </manifest>
99
          <zipgroupfileset file="${dist}/${jarfile}" />
100
          <zipfileset src="${dist}/external-libs.jar">
101
              <exclude name="META-INF/**" />
102
          </zipfileset>
103
      </jar>
104
  </target>
105
106
    <target name="clean" description="clean up">
79
    <target name="clean" description="clean up">
107
        <delete dir="${build}" />
80
        <delete dir="${build}" />
108
        <delete dir="${dist}" />
81
        <delete dir="${dist}" />
109
        <delete file="${jarfile}" />
82
        <delete file="${jarfile}" />
110
  </target>
111
112
  <target name="doc" depends="build">
113
      <delete dir="${doc}" />
114
      <mkdir dir="${doc}" />
115
      <mkdir dir="${doc}/api" />
116
      <javadoc windowtitle="Taverna2Archi API" sourcepath="${src}" destdir="${doc}/api" packagenames="*" package="yes">
117
          <classpath refid="classpath" />
118
      </javadoc>
119
    </target>
83
    </target>
120
84
121
    <target name="TavernaExtractor" depends="build" description="Runs the TavernaExtractor">
85
    <target name="TavernaExtractor" depends="build" description="Runs the TavernaExtractor">
122
        <java classname="net.timbusproject.extractors.Main" failonerror="true" fork="yes">
86
        <java classname="net.timbusproject.extractors.Main" failonerror="true" fork="yes">
123
            <arg line="${args}" />
87
            <arg line="${args}" />