option to deactivate contributed jars packaging

This commit is contained in:
claur 2015-08-01 15:05:05 +02:00
parent 3f5ba25991
commit 4bf62b9e40
2 changed files with 99 additions and 52 deletions

View file

@ -6,10 +6,11 @@ src_ui=../openproj_ui/src
src_reports=../openproj_reports/src
src_pl_exchange=../projectlibre_exchange/src
src_exchange=../openproj_exchange/src
src_contrib=../openproj_contrib/src
src_ext=
resources=resources
packages=packages
build_contrib=true
build_contrib=false
rpm=rpm
rpmroot=rpm
@ -50,16 +51,3 @@ rpm_builds=mageia
jvm_name=jdk1.7.0_45.jdk
#jvm_name=jdk1.8.0.jdk
#version_name=1.5_beta5
#version=1.5_beta5
##windows
#numericVersion3=1.5.5
#
##mac
#numericVersion4=1.5.5.0
##Linux
#rpm_version=1.5
#rpm_revision=0.5.beta
#deb_version=1.5~b5
#deb_revision=1

View file

@ -12,6 +12,12 @@
</fileset>
</path>
<path id="compile-no_contrib_built.class.path">
<fileset dir="../openproj_contrib/lib">
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="../openproj_contrib/ant-lib/ant-contrib-1.jar"/>
@ -31,23 +37,48 @@
</target>
<target name="compile" depends="prepare,contrib">
<javac destdir="${build}"
classpathref="compile.class.path"
debug="off"
nowarn="on"
source="1.5"
target="1.5">
<src path="${src_pl_core}" />
<src path="${src_core}" />
<src path="${src_ui}" />
<src path="${src_reports}" />
<src path="${src_pl_exchange}" />
<src path="${src_exchange}" />
<src path="${src_ext}" />
<include name="**/*.java" />
<!--exclude name="**/version.properties" / -->
<exclude name="test/**" />
</javac>
<if>
<equals arg1="${build_contrib}" arg2="true" />
<then>
<javac destdir="${build}"
classpathref="compile.class.path"
debug="off"
nowarn="on"
source="1.5"
target="1.5">
<src path="${src_pl_core}" />
<src path="${src_core}" />
<src path="${src_ui}" />
<src path="${src_reports}" />
<src path="${src_pl_exchange}" />
<src path="${src_exchange}" />
<src path="${src_ext}" />
<include name="**/*.java" />
<!--exclude name="**/version.properties" / -->
<exclude name="test/**" />
</javac>
</then>
<else>
<javac destdir="${build}"
classpathref="compile-no_contrib_built.class.path"
debug="off"
nowarn="on"
source="1.5"
target="1.5">
<src path="${src_pl_core}" />
<src path="${src_core}" />
<src path="${src_ui}" />
<src path="${src_reports}" />
<src path="${src_pl_exchange}" />
<src path="${src_exchange}" />
<src path="${src_ext}" />
<src path="${src_contrib}" />
<include name="**/*.java" />
<!--exclude name="**/version.properties" / -->
<exclude name="test/**" />
</javac>
</else>
</if>
</target>
<target name="build" depends="compile">
@ -87,33 +118,61 @@
<target name="lib" depends="build">
<jar jarfile="${dist}/projectlibre.jar">
<zipfileset dir="${build}" >
<include name="**/*" />
</zipfileset>
<zipfileset dir="." >
<include name="license/**" />
</zipfileset>
<if>
<equals arg1="${build_contrib}" arg2="true" />
<then>
<jar jarfile="${dist}/projectlibre.jar">
<zipfileset dir="${build}" >
<include name="**/*" />
</zipfileset>
<zipfileset dir="." >
<include name="license/**" />
</zipfileset>
<manifest>
<attribute name="Main-Class" value="com.projity.main.Main"/>
<attribute name="Class-Path" value="lib/openproj-contrib.jar lib/openproj-script.jar lib/openproj-reports.jar"/>
</manifest>
<manifest>
<attribute name="Main-Class" value="com.projity.main.Main"/>
<attribute name="Class-Path" value="lib/openproj-contrib.jar lib/openproj-script.jar lib/openproj-reports.jar"/>
</manifest>
<metainf dir="license">
<include name="**" />
</metainf>
</jar>
<metainf dir="license">
<include name="**" />
</metainf>
</jar>
</then>
<else>
<jar jarfile="${dist}/projectlibre.jar">
<zipfileset dir="${build}" >
<include name="**/*" />
</zipfileset>
<zipfileset dir="." >
<include name="license/**" />
</zipfileset>
<manifest>
<attribute name="Main-Class" value="com.projity.main.Main"/>
</manifest>
<metainf dir="license">
<include name="**" />
</metainf>
</jar>
</else>
</if>
</target>
<target name="dist" depends="lib">
<mkdir dir="${dist}/lib"/>
<copy todir="${dist}/lib">
<fileset dir="../openproj_contrib/">
<include name="*.jar" />
</fileset>
</copy>
<if>
<equals arg1="${build_contrib}" arg2="true" />
<then>
<mkdir dir="${dist}/lib"/>
<copy todir="${dist}/lib">
<fileset dir="../openproj_contrib/">
<include name="*.jar" />
</fileset>
</copy>
</then>
</if>
</target>
<target name="dir" depends="dist">