jicarilla-sandbox/buildsystem build-project.xml,1.7,1.8 sample.dependencies.list,1.1,NONE

[email protected]
Newsgroups gmane.comp.java.jicarilla.cvs
Message-ID <[email protected]>
Update of /cvsroot/jicarilla/jicarilla-sandbox/buildsystem
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25848/buildsystem

Modified Files:
	build-project.xml 
Removed Files:
	sample.dependencies.list 
Log Message:
a little demo

Index: build-project.xml
===================================================================
RCS file: /cvsroot/jicarilla/jicarilla-sandbox/buildsystem/build-project.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- build-project.xml	10 Feb 2004 16:03:25 -0000	1.7
+++ build-project.xml	10 Feb 2004 19:05:23 -0000	1.8
@@ -68,7 +68,7 @@
     <target name="jbs:warn-project.name" unless="project.name.set">
         <echo>
 =======================================================================
-                          WARNING!
+                               WARNING!
 
   The property 'project.name' has not been set. This will result in a
   jar file with a rather dumb name, being
@@ -84,7 +84,7 @@
     <target name="jbs:warn-avail-java-src" unless="java.src.present">
         <echo>
 =======================================================================
-                          NOTE!
+                               WARNING!
 
   The directory
 
@@ -99,7 +99,7 @@
     <target name="jbs:warn-avail-test-src" unless="test.src.present">
         <echo>
 =======================================================================
-                          NOTE!
+                               WARNING!
 
   The directory
 
@@ -113,7 +113,7 @@
     <target name="jbs:warn-avail-no-sources" if="no.sources.available">
         <echo>
 =======================================================================
-                          ERROR!
+                                ERROR!
 
   This project does not contain any java source files in
 
@@ -126,7 +126,22 @@
         </echo>
     </target>
 
+    <target name="jbs:warn-avail-no-source-dir" if="no.source.dir">
+        <fail>
+=======================================================================
+                                ERROR!
+
+  This project does not contain a source directory
+
+            ${jbs.src.dir}
+
+  that means it is not possible to generate anything!
+=======================================================================
+        </fail>
+    </target>
+
     <target name="jbs:warn-avail" unless="do.not.warn">
+        <antcall target="jbs:warn-avail-no-source-dir"/>
         <antcall target="jbs:warn-avail-no-sources"/>
         <antcall target="jbs:warn-avail-java-src"/>
         <antcall target="jbs:warn-avail-test-src"/>
@@ -134,15 +149,33 @@
 
     <target name="jbs:compile"
             depends="jbs:java-compile"/>
-
     <target name="jbs:test"
             depends="jbs:java-test-compile, jbs:java-test, jbs:java-test-reports"/>
 
-    <target name="jbs:jar"
-            depends="jbs:java-compile, jbs:java-test, jbs:bin-jar"/>
+    <target name="jbs:jar" unless="no.source.dir"
+            depends="jbs:java-compile, jbs:java-test, jbs:bin-jar">
+        <echo>
+=======================================================================
+ Jar Generated!
+=======================================================================
+ The generated jarfile is at
 
-    <target name="jbs:dist"
-            depends="jbs:src-dist, jbs:bin-dist"/>
+   ${jbs.build.dir}/${project.name}-${project.version}.jar
+        </echo>
+    </target>
+
+    <target name="jbs:dist" unless="no.source.dir"
+            depends="jbs:src-dist, jbs:bin-dist">
+         <echo>
+ =======================================================================
+  Distributions generated!
+ =======================================================================
+  The generated distributions are at
+
+    ${jbs.build.dir}/dist/${project.name}-${project.version}-bin.zip
+    ${jbs.build.dir}/dist/${project.name}-${project.version}-src.zip
+         </echo>
+    </target>
 
     <target name="jbs:init">
         <property name="jbs.home" value="${user.home}/.jbs"/>
@@ -178,6 +211,7 @@
 
         <available file="${basedir}/src/java" property="java.src.present"/>
         <available file="${basedir}/src/test" property="test.src.present"/>
+        <available file="${basedir}/src" property="src.dir.present"/>
 
         <condition property="no.sources.available">
                 <and>
@@ -185,6 +219,9 @@
                     <not><isset property="test.src.present"/></not>
                 </and>
         </condition>
+        <condition property="no.source.dir">
+            <not><isset property="src.dir.present"/></not>
+        </condition>
 
         <antcall target="jbs:debug"/>
         <antcall target="jbs:warn-avail"/>
@@ -219,11 +256,6 @@
                 <pathelement path="${dependency.classpath}"/>
             </classpath>
         </javac>
-
-        <mkdir dir="${jbs.build.dir}/src"/>
-        <copy todir="${jbs.build.dir}/src">
-            <fileset dir="${jbs.src.dir}/java"/>
-        </copy>
     </target>
 
     <target name="jbs:java-test-compile" if="test.src.present"
@@ -303,10 +335,9 @@
             </fileset>
             <report format="frames" todir="${jbs.build.dir}/docs/junitreports"/>
         </junitreport>
-
     </target>
 
-    <target name="jbs:bin-jar"
+    <target name="jbs:bin-jar" if="java.src.present"
             depends="jbs:init, jbs:compile, jbs:test">
         <echo>
 =======================================================================
@@ -317,7 +348,13 @@
         <jar destfile="${jbs.build.dir}/${project.name}-${project.version}.jar" basedir="${jbs.build.dir}/classes"/>
     </target>
 
-    <target name="jbs:javadocs" depends="jbs:init,jbs:jar">
+    <target name="jbs:javadocs" if="java.src.present"
+            depends="jbs:init,jbs:jar">
+        <echo>
+=======================================================================
+ Generating javadocs
+=======================================================================
+        </echo>
         <mkdir dir="${jbs.build.dir}/docs"/>
         <mkdir dir="${jbs.build.dir}/docs/apidocs"/>
         <mkdir dir="${jbs.build.dir}/classes"/>
@@ -328,7 +365,7 @@
         <property name="title" value="Avalon ${project.name} API"/>
 
         <javadoc
-          sourcepath="${jbs.build.dir}/src"
+          sourcepath="${jbs.src.dir}/java"
           packagenames="*"
           destdir="${jbs.build.dir}/docs/apidocs"
           windowtitle="${title}"
@@ -349,7 +386,8 @@
         <delete dir="${jbs.build.dir}/dist"/>
     </target>
 
-    <target name="jbs:bin-dist" depends="jbs:init,jbs:distclean,jbs:jar,jbs:javadocs">
+    <target name="jbs:bin-dist" unless="no.source.dir"
+            depends="jbs:init,jbs:distclean,jbs:jar,jbs:javadocs">
         <echo>
 =======================================================================
  Building Binary Distribution
@@ -378,7 +416,8 @@
         </zip>
     </target>
 
-    <target name="jbs:src-dist" depends="jbs:init,jbs:distclean,jbs:jar,jbs:javadocs">
+    <target name="jbs:src-dist" unless="no.source.dir"
+            depends="jbs:init,jbs:distclean,jbs:jar,jbs:javadocs">
         <echo>
 =======================================================================
  Building Source Distribution
@@ -408,29 +447,6 @@
         </zip>
     </target>
 
-    <target name="test-dep" depends="jbs:init">
-        <property name="do.not.warn" value="true"/>
-        <antcall target="jbs:get-dependency" inheritAll="true">
-            <param name="do.not.warn" value="true"/>
-            <param name="do.not.debug" value="true"/>
-            <param name="groupid" value="commons-collections"/>
-            <param name="artifactid" value="commons-collections"/>
-            <param name="version" value="1.0"/>
-            <param name="repository" value="${jbs.repository.ibiblio}"/>
-        </antcall>
-    </target>
-
-    <target name="jbs:get-dependency" unless="skip.dependencies">
-        <available property="already.available" file="${jbs.repository.local}/${groupid}/jars/${artifactid}-${version}.jar"/>
-        <antcall target="jbs:download-dependency" inheritAll="true"/>
-    </target>
-
-    <target name="jbs:download-dependency" unless="already.available">
-        <mkdir dir="${jbs.repository.local}/${groupid}/jars/"/>
-        <get src="${repository}/${groupid}/jars/${artifactid}-${version}.jar"
-             dest="${jbs.repository.local}/${groupid}/jars/${artifactid}-${version}.jar"/>
-    </target>
-
     <target name="jbs:get-dependencies"
             depends="jbs:init, jbs:no-dependency-warning, jbs:actually-get-dependencies"/>
 

--- sample.dependencies.list DELETED ---



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.