geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r433511 - /geronimo/genesis/trunk/config/project-config/pom.xml
Date Tue, 22 Aug 2006 04:47:59 GMT
Author: jdillon
Date: Mon Aug 21 21:47:59 2006
New Revision: 433511

URL: http://svn.apache.org/viewvc?rev=433511&view=rev
Log:
Add LICENSE.txt and NOTICE.txt to target/classes/META-INF if the packaging is not pom using
groovy to not conflict with children's use of antrun

Modified:
    geronimo/genesis/trunk/config/project-config/pom.xml

Modified: geronimo/genesis/trunk/config/project-config/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/genesis/trunk/config/project-config/pom.xml?rev=433511&r1=433510&r2=433511&view=diff
==============================================================================
--- geronimo/genesis/trunk/config/project-config/pom.xml (original)
+++ geronimo/genesis/trunk/config/project-config/pom.xml Mon Aug 21 21:47:59 2006
@@ -166,15 +166,6 @@
         
         <resources>
             <resource>
-                <directory>${pom.basedir}</directory>
-                <targetPath>META-INF</targetPath>
-                <includes>
-                    <include>LICENSE.txt</include>
-                    <include>NOTICE.txt</include>
-                </includes>
-            </resource>
-
-            <resource>
                 <directory>${pom.basedir}/src/main/resources</directory>
             </resource>
         </resources>
@@ -334,6 +325,45 @@
             </plugin>
             
             <!--
+            NOTE: Install LICENSE.txt and NOTICE.txt into the classes directory.
+                  
+                  Using a resource will cause some uneeded havok on some plugins
+                  like maven-eclipse-plugin.
+                  
+                  Not using antrun, as when we use it here it causes failures down the line
+                  because Maven will not honor the local dependencies.
+            -->
+            <plugin>
+                <groupId>org.apache.geronimo.genesis.plugins</groupId>
+                <artifactId>script-maven-plugin</artifactId>
+                <version>1.0.0-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>groovy</goal>
+                        </goals>
+                        <configuration>
+                            <code>
+                                if (project.packaging != "pom") {
+                                    def ant = new AntBuilder()
+                                    
+                                    def dir = "${project.basedir}/target/classes/META-INF"
+                                    ant.mkdir(dir: dir)
+                                    ant.copy(todir: dir) {
+                                        fileset(dir: "${project.basedir}") {
+                                            include(name: "LICENSE.txt")
+                                            include(name: "NOTICE.txt")
+                                        }
+                                    }
+                                }
+                            </code>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            
+            <!--
             NOTE: Project pom should define:
             
             <plugin>
@@ -343,7 +373,7 @@
                     <source>1.4</source>
                     <target>1.4</target>
                 </configuration>
-             </plugin>
+            </plugin>
              
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>



Mime
View raw message