leosutic 2003/08/23 14:07:11 Modified: attributes maven.xml attributes/compiler/src/java/org/apache/commons/attributes/compiler AttributeCompiler.java attributes/plugin plugin.jelly attributes/unittest maven.xml Log: Corrected handling of the source paths. Revision Changes Path 1.7 +1 -10 jakarta-commons-sandbox/attributes/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/attributes/maven.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- maven.xml 22 Aug 2003 23:48:45 -0000 1.6 +++ maven.xml 23 Aug 2003 21:07:11 -0000 1.7 @@ -12,14 +12,7 @@ description="Build the Jakarta Commons Attributes distribution." > <maven:reactor basedir="${basedir}" - includes="api/project.xml" - goals="jar:install-snapshot" - banner="Building:" - ignoreFailures="false" /> - - <maven:reactor - basedir="${basedir}" - includes="compiler/project.xml" + includes="api/project.xml,compiler/project.xml" goals="jar:install-snapshot" banner="Building:" ignoreFailures="false" /> @@ -30,8 +23,6 @@ goals="wrapper" banner="Building:" ignoreFailures="false" /> - - </goal> <goal name="do-clean" prereqs="clean"> 1.3 +2 -0 jakarta-commons-sandbox/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeCompiler.java Index: AttributeCompiler.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/attributes/compiler/src/java/org/apache/commons/attributes/compiler/AttributeCompiler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- AttributeCompiler.java 22 Aug 2003 23:48:03 -0000 1.2 +++ AttributeCompiler.java 23 Aug 2003 21:07:11 -0000 1.3 @@ -68,6 +68,7 @@ import java.util.StringTokenizer; import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.types.Path; @@ -117,6 +118,7 @@ public void setSourcepathref (String pathref) { String sourcePaths = project.getReference (pathref).toString (); + log ("Setting source paths to:" + pathref + "/" + sourcePaths); StringTokenizer tok = new StringTokenizer (sourcePaths, File.pathSeparator); while (tok.hasMoreTokens ()) { FileSet fs = new FileSet (); 1.2 +42 -8 jakarta-commons-sandbox/attributes/plugin/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/attributes/plugin/plugin.jelly,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- plugin.jelly 22 Aug 2003 23:46:40 -0000 1.1 +++ plugin.jelly 23 Aug 2003 21:07:11 -0000 1.2 @@ -6,17 +6,24 @@ xmlns:maven="jelly:maven" xmlns:ant="jelly:ant"> - <ant:taskdef resource="org/apache/commons/attributes/anttasks.properties"> - <classpath> - <path refid="maven.dependency.classpath"/> - </classpath> - </ant:taskdef> + <ant:path id="plugin.class.path"> + <pathelement path="${plugin.getDependencyPath('commons-attributes:commons-attributes-api')}"/> + <pathelement path="${plugin.getDependencyPath('commons-attributes:commons-attributes-compiler')}"/> - <preGoal name="java:compile"> - + <pathelement path="${plugin.getDependencyPath('commons-collections')}"/> + <pathelement path="${plugin.getDependencyPath('commons-logging')}"/> + <pathelement path="${plugin.getDependencyPath('log4j')}"/> + <pathelement path="${plugin.getDependencyPath('xdoclet+xjavadoc')}"/> + </ant:path> + + <ant:taskdef + resource="org/apache/commons/attributes/anttasks.properties" + classpathref="plugin.class.path"/> + + <goal name="commons-attributes:compile"> <ant:mkdir dir="${maven.build.dir}/commons-attributes"/> - <attribute-compiler inMaven="true" sourcepathref="maven.compile.src.set" + <ant:attribute-compiler inMaven="true" sourcepathref="maven.compile.src.set" destdir="${maven.build.dir}/commons-attributes"/> <ant:path @@ -26,5 +33,32 @@ <maven:addPath id="maven.compile.src.set" refid="jakarta.commons.attributes.generated.dir"/> + </goal> + + <preGoal name="java:compile"> + <j:if test="${sourcesPresent == 'true'}"> + <attainGoal name="commons-attributes:compile"/> + </j:if> + </preGoal> + + <preGoal name="test:compile"> + <j:if test="${unitTestSourcesPresent == 'true'}"> + <attainGoal name="commons-attributes:test-compile"/> + </j:if> </preGoal> + + <goal name="commons-attributes:test-compile"> + <ant:attribute-compiler + inMaven="true" + sourcepathref="maven.test.compile.src.set" + destdir="${maven.build.dir}/commons-attributes-unittest"/> + + <ant:path + id="jakarta.commons.attributes.generated.dir.test" + location="${maven.build.dir}/commons-attributes-unittest"/> + + <maven:addPath + id="maven.test.compile.src.set" + refid="jakarta.commons.attributes.generated.dir.test"/> + </goal> </project> 1.3 +2 -23 jakarta-commons-sandbox/attributes/unittest/maven.xml Index: maven.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/attributes/unittest/maven.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- maven.xml 22 Aug 2003 23:47:45 -0000 1.2 +++ maven.xml 23 Aug 2003 21:07:11 -0000 1.3 @@ -15,6 +15,8 @@ </classpath> </ant:taskdef> + <ant:echo message="JVZ says: ${pom.artifactId}-${pom.currentVersion}.jar"/> + <!-- For the life of me I can't figure out how to get the filename of the snapshot jar that jar:jar has just created. @@ -28,29 +30,6 @@ </classpath> </ant:attribute-indexer> </postGoal> - - <preGoal name="test:compile"> - <j:if test="${unitTestSourcesPresent == 'true'}"> - <ant:taskdef resource="org/apache/commons/attributes/anttasks.properties"> - <classpath> - <path refid="maven.dependency.classpath"/> - </classpath> - </ant:taskdef> - - <ant:attribute-compiler - inMaven="true" - sourcepathref="maven.test.compile.src.set" - destdir="${maven.build.dir}/commons-attributes-unitttest"/> - - <ant:path - id="jakarta.commons.attributes.generated.dir.test" - location="${maven.build.dir}/commons-attributes-unittest"/> - - <maven:addPath - id="maven.test.compile.src.set" - refid="jakarta.commons.attributes.generated.dir"/> - </j:if> - </preGoal> <goal name="wrapper"> <taskdef resource="org/apache/commons/attributes/anttasks.properties">
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]