You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2009/09/11 22:30:01 UTC

svn commit: r814015 - /incubator/uima/uimaj/trunk/uimaj/pom.xml

Author: schor
Date: Fri Sep 11 20:29:59 2009
New Revision: 814015

URL: http://svn.apache.org/viewvc?rev=814015&view=rev
Log:
UIMA-1566 use maven profile mechanism to run the maven source plugin only if there is a src/main/java directory.  Change the phase it's run in to avoid problems with ant script adding/removing LIC/NOT/DIS files.  Remove the earlier workaround of adding the POM to the sources.

Modified:
    incubator/uima/uimaj/trunk/uimaj/pom.xml

Modified: incubator/uima/uimaj/trunk/uimaj/pom.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj/pom.xml?rev=814015&r1=814014&r2=814015&view=diff
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj/pom.xml (original)
+++ incubator/uima/uimaj/trunk/uimaj/pom.xml Fri Sep 11 20:29:59 2009
@@ -252,26 +252,6 @@
     
     <plugins>
       
-      <!-- ORDERING: the source plugin has to come before the Ant one below,
-           because otherwise the Ant one below cleans up the meta-inf dir
-           before it can be used by this to have the LIC/NOT/DIS files included -->
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <version>2.1</version>
-        <executions>
-          <execution>
-            <id>main-jar</id>
-            <goals>
-              <goal>jar-no-fork</goal>
-            </goals>
-            <configuration>
-              <includePom>true</includePom>
-            </configuration>
-            <phase>package</phase>
-          </execution>
-        </executions>
-      </plugin>
 			<!-- We use an ant task to copy the LICENSE, NOTICE, and DISCLAIMER files
 				from a single location in uimaj-distr into the src/main/resources/META-INF
 				directory of all components.  We tried using the Maven resources plugin for 
@@ -511,7 +491,39 @@
       </plugin>
     </plugins>
   </reporting>
+  
+  
 	<profiles>
+    <profile>
+      <id>buildSourceJar</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+        <file>
+          <exists>src/main/java</exists>
+        </file>
+      </activation>
+      <build>
+        <plugins>        
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-source-plugin</artifactId>
+            <version>2.1</version>
+            <executions>
+              <execution>
+                <id>main-jar</id>
+                <!-- pick a phase that's after the ant script
+                     adds in the LIC/NOT/DIS files (process-resources) and before
+                     it removes them in cleanup (= package) -->
+                <phase>prepare-package</phase>
+                <goals>
+                  <goal>jar-no-fork</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>        
+        </plugins>
+      </build>      
+    </profile>
 		<profile>
 			<id>signArtifacts</id>
 			<activation>
@@ -540,6 +552,8 @@
 			</build>
 		</profile>
 	</profiles>
+  
+    
   <modules>
     <module>../uimaj-core</module>
     <module>../uimaj-cpe</module>