You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by br...@apache.org on 2014/07/01 06:22:35 UTC

git commit: prevent build order issues

Repository: archiva
Updated Branches:
  refs/heads/archiva-1.3.x 187bdd02a -> 540bd3a79


prevent build order issues

It seemed that whenever the release profile was enabled, the POM ordering was
not respected causing the antrun plugin to happen before the appassembler
plugin. Move them to different, more appropriate phases.


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/540bd3a7
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/540bd3a7
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/540bd3a7

Branch: refs/heads/archiva-1.3.x
Commit: 540bd3a79f3faefa0608f403dd53eb9e35396c77
Parents: 187bdd0
Author: Brett Porter <br...@apache.org>
Authored: Tue Jul 1 14:21:52 2014 +1000
Committer: Brett Porter <br...@apache.org>
Committed: Tue Jul 1 14:21:52 2014 +1000

----------------------------------------------------------------------
 archiva-jetty/pom.xml | 31 +++++++++++++++++++++++++++++--
 1 file changed, 29 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/540bd3a7/archiva-jetty/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/pom.xml b/archiva-jetty/pom.xml
index 05d9373..da99760 100644
--- a/archiva-jetty/pom.xml
+++ b/archiva-jetty/pom.xml
@@ -191,7 +191,7 @@
               <goal>generate-daemons</goal>
               <goal>create-repository</goal>
             </goals>
-            <phase>prepare-package</phase>
+            <phase>generate-resources</phase>
           </execution>
         </executions>
       </plugin>
@@ -232,7 +232,7 @@
           </execution>
           <execution>
             <id>fix-appassembler-bug</id>
-            <phase>prepare-package</phase>
+            <phase>process-resources</phase>
             <configuration>
               <tasks>
                 <replaceregexp file="target/generated-resources/appassembler/jsw/archiva/conf/wrapper.conf" match="set.ARCHIVA_BASE" replace="set.default.ARCHIVA_BASE" />
@@ -252,6 +252,33 @@
           </supplementalModels>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>enforce-beanshell</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <phase>package</phase>
+            <configuration>
+              <rules>
+                <evaluateBeanshell>
+                  <message>wrapper.conf should be correctly set</message>
+                  <condition>
+                    <![CDATA[
+                      java.util.Properties props = new java.util.Properties();
+                      props.load( new java.io.FileInputStream( "${project.build.directory}/generated-resources/appassembler/jsw/archiva/conf/wrapper.conf" ) );
+                      props.getProperty( "set.default.ARCHIVA_BASE" ).equals( "." )
+                    ]]>
+                  </condition>
+                </evaluateBeanshell>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 </project>