You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ni...@apache.org on 2007/01/08 05:39:38 UTC
svn commit: r493942 - /jakarta/commons/proper/commons-parent/trunk/pom.xml
Author: niallp
Date: Sun Jan 7 20:39:37 2007
New Revision: 493942
URL: http://svn.apache.org/viewvc?view=rev&rev=493942
Log:
Use a <resource> element to include the LICENSE.txt and NOTICE.txt files in the jar. The antrun plugin (which was copying in those files) has a bug that causes it execute twice if used in both a parent and dependant pom. The only downside to using a <resource> element is that its not inherited if dependant poms also specify any <resource> elements and therefore needs to be duplicated in dependant poms in that scenario
Modified:
jakarta/commons/proper/commons-parent/trunk/pom.xml
Modified: jakarta/commons/proper/commons-parent/trunk/pom.xml
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/commons-parent/trunk/pom.xml?view=diff&rev=493942&r1=493941&r2=493942
==============================================================================
--- jakarta/commons/proper/commons-parent/trunk/pom.xml (original)
+++ jakarta/commons/proper/commons-parent/trunk/pom.xml Sun Jan 7 20:39:37 2007
@@ -96,6 +96,21 @@
</mailingList>
</mailingLists>
<build>
+ <resources>
+ <!--
+ N.B. If dependant poms specify resources the following entry will
+ need to be added as maven only inherits if no resources are
+ specified in the dependant pom.
+ -->
+ <resource>
+ <directory>${basedir}</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>LICENSE.txt</include>
+ <include>NOTICE.txt</include>
+ </includes>
+ </resource>
+ </resources>
<plugins>
<!-- TODO: later use toolchain support to do compilation on an external JDK 1.3+ compiler -->
<plugin>
@@ -128,33 +143,6 @@
<configuration>
<jdkLevel>${maven.compile.source}</jdkLevel>
</configuration>
- </plugin>
- <plugin>
- <!-- This should possibly better be done by using a resource
- definition. However, if we declare a resource with
- ${basedir} as the base directory, then the
- maven-source-plugin will add the whole directory to
- its contents.
- -->
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>generate-resources</phase>
- <configuration>
- <tasks>
- <copy todir="${project.build.outputDirectory}/META-INF">
- <fileset dir="${basedir}">
- <include name="LICENSE.txt" />
- <include name="NOTICE.txt" />
- </fileset>
- </copy>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
</plugin>
</plugins>
</build>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org