portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r533874 - /portals/jetspeed-2/branches/J2-M2-REDUX/pom.xml
Date Mon, 30 Apr 2007 23:07:36 GMT
Author: ate
Date: Mon Apr 30 16:07:35 2007
New Revision: 533874

URL: http://svn.apache.org/viewvc?view=rev&rev=533874
Log:
Moved init-db plugin configuration for test and production to profiles, test-setup and setup
respectively.
Now anywhere in the project (in context of a pom.xml), you can initialize the database using:
  mvn -P test-setup org.apache.portals.jetspeed-2:jetspeed-maven-plugins:init-db
or (for production):
  mvn -P setup org.apache.portals.jetspeed-2:jetspeed-maven-plugins:init-db

Note: I'm working on fixing the tests again (got it working partly already). I noticed that
running init-db in process before testing causes tests to fail.
This would most likely require forking the init-db execution, but I'm not so sure that'll
be a good idea, nor that it is needed.
The way the tests are going to be setup (clearing the database before/after the tests), you
only would need to init-db once, or after the schema is changed.
Thus I see (right now) not much use for in-process execution of init-db before running tests
 

Modified:
    portals/jetspeed-2/branches/J2-M2-REDUX/pom.xml

Modified: portals/jetspeed-2/branches/J2-M2-REDUX/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/J2-M2-REDUX/pom.xml?view=diff&rev=533874&r1=533873&r2=533874
==============================================================================
--- portals/jetspeed-2/branches/J2-M2-REDUX/pom.xml (original)
+++ portals/jetspeed-2/branches/J2-M2-REDUX/pom.xml Mon Apr 30 16:07:35 2007
@@ -227,8 +227,9 @@
   <properties>
 
     <!-- Default Build Properties -->        
+    <!--
     <maven.test.skip>true</maven.test.skip>    
-        
+    -->    
     <!-- Build Dependency Version Properties -->
     <ant.version>1.6.5</ant.version>
     <jmock.version>1.0.1</jmock.version>
@@ -450,6 +451,11 @@
         <artifactId>jetspeed-webapp-logging</artifactId>
         <version>${pom.version}</version>
       </dependency>
+      <dependency>
+        <groupId>${pom.groupId}</groupId>
+        <artifactId>jetspeed-serializer</artifactId>
+        <version>${pom.version}</version>
+      </dependency>
       
       <!-- Portals Applications JARs -->
       <dependency>
@@ -1009,6 +1015,14 @@
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <configuration>
+            <!-- when forked, debugging in Eclipse won't work -->
+            <forkMode>never</forkMode>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
           <!-- force maven-jar-plugin to 2.1 which fixes putting in the "correct" pom.xml
in the jar
             I'd like to be able to specify version range [2.1,) but that seems to be utterly
broken :(
@@ -1023,85 +1037,10 @@
             <addVersionToProjectName>true</addVersionToProjectName>
           </configuration>
         </plugin>
-        <plugin>
-          <groupId>${pom.groupId}</groupId>
-          <artifactId>jetspeed-maven-plugins</artifactId>
-          <version>${pom.version}</version>
-          <dependencies>
-            <dependency>
-              <groupId>${org.apache.jetspeed.test.jdbc.driver.groupId}</groupId>
-              <artifactId>${org.apache.jetspeed.test.jdbc.driver.artifactId}</artifactId>
-              <version>${org.apache.jetspeed.test.jdbc.driver.version}</version>
-            </dependency>
-            <dependency>
-              <groupId>${org.apache.jetspeed.production.jdbc.driver.groupId}</groupId>
-              <artifactId>${org.apache.jetspeed.production.jdbc.driver.artifactId}</artifactId>
-              <version>${org.apache.jetspeed.production.jdbc.driver.version}</version>
-            </dependency>
-          </dependencies>
-          <executions>
-            <execution>
-              <phase>test</phase>
-              <goals>
-                <goal>init-db</goal>
-              </goals>
-              <configuration>
-                <goalPrefix>jetspeed</goalPrefix>
-                <unpackResources>
-                  <resourceBundle>${groupId}:jetspeed-portal-resources:${pom.version}</resourceBundle>
-                  <resources>
-                    <unpackResource>
-                      <fromDir>ddl/${org.apache.jetspeed.test.database.default.name}</fromDir>
-                      <toDir>ddl/${org.apache.jetspeed.test.database.default.name}</toDir>
-                    </unpackResource>
-                  </resources>
-                </unpackResources>
-                <sqlScripts>
-                  <sqlScript>
-                    <path>${project.build.directory}/ddl/${org.apache.jetspeed.test.database.default.name}/drop-schema.sql</path>
-                    <ignoreErrors>true</ignoreErrors>
-                  </sqlScript>
-                  <sqlScript>
-                    <path>${project.build.directory}/ddl/${org.apache.jetspeed.test.database.default.name}/create-schema.sql</path>
-                  </sqlScript>
-                </sqlScripts>
-                <username>${org.apache.jetspeed.test.database.user}</username>
-                <password>${org.apache.jetspeed.test.database.password}</password>
-                <url>${org.apache.jetspeed.test.database.url}</url>
-                <driver>${org.apache.jetspeed.test.database.driver}</driver>
-              </configuration>
-            </execution>
-          </executions>
-          <inherited>false</inherited>
-          <configuration>
-            <goalPrefix>jetspeed</goalPrefix>
-            <unpackResources>
-              <resourceBundle>${groupId}:jetspeed-portal-resources:${pom.version}</resourceBundle>
-              <resources>
-                <unpackResource>
-                  <fromDir>ddl/${org.apache.jetspeed.production.database.default.name}</fromDir>
-                  <toDir>ddl/${org.apache.jetspeed.production.database.default.name}</toDir>
-                </unpackResource>
-              </resources>
-            </unpackResources>
-            <sqlScripts>
-              <sqlScript>
-                <path>${project.build.directory}/ddl/${org.apache.jetspeed.production.database.default.name}/drop-schema.sql</path>
-                <ignoreErrors>true</ignoreErrors>
-              </sqlScript>
-              <sqlScript>
-                <path>${project.build.directory}/ddl/${org.apache.jetspeed.production.database.default.name}/create-schema.sql</path>
-              </sqlScript>
-            </sqlScripts>
-            <username>${org.apache.jetspeed.production.database.user}</username>
-            <password>${org.apache.jetspeed.production.database.password}</password>
-            <url>${org.apache.jetspeed.production.database.url}</url>
-            <driver>${org.apache.jetspeed.production.database.driver}</driver>
-          </configuration>
-        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
+        
       <!-- TODO: the maven-remote-resources-plugin isn't working quite well yet
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -1168,6 +1107,96 @@
         </pluginRepository>
       </pluginRepositories>
     </profile>    
+    <profile>
+      <id>setup</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>${pom.groupId}</groupId>
+              <artifactId>jetspeed-maven-plugins</artifactId>
+              <version>${pom.version}</version>
+              <dependencies>
+                <dependency>
+                  <groupId>${org.apache.jetspeed.production.jdbc.driver.groupId}</groupId>
+                  <artifactId>${org.apache.jetspeed.production.jdbc.driver.artifactId}</artifactId>
+                  <version>${org.apache.jetspeed.production.jdbc.driver.version}</version>
+                </dependency>
+              </dependencies>
+              <goals>
+                <goal>init-db</goal>
+              </goals>
+              <configuration>
+                <unpackResources>
+                  <resourceBundle>${groupId}:jetspeed-portal-resources:${pom.version}</resourceBundle>
+                  <resources>
+                    <unpack includes="ddl/${org.apache.jetspeed.production.database.default.name}/"/>

+                  </resources>
+                </unpackResources>
+                <sqlScripts>
+                  <sqlScript>
+                    <path>${project.build.directory}/ddl/${org.apache.jetspeed.production.database.default.name}/drop-schema.sql</path>
+                    <ignoreErrors>true</ignoreErrors>
+                  </sqlScript>
+                  <sqlScript>
+                    <path>${project.build.directory}/ddl/${org.apache.jetspeed.production.database.default.name}/create-schema.sql</path>
+                  </sqlScript>
+                </sqlScripts>
+                <username>${org.apache.jetspeed.production.database.user}</username>
+                <password>${org.apache.jetspeed.production.database.password}</password>
+                <url>${org.apache.jetspeed.production.database.url}</url>
+                <driver>${org.apache.jetspeed.production.database.driver}</driver>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>      
+    <profile>
+      <id>test-setup</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>${pom.groupId}</groupId>
+              <artifactId>jetspeed-maven-plugins</artifactId>
+              <version>${pom.version}</version>
+              <dependencies>
+                <dependency>
+                  <groupId>${org.apache.jetspeed.test.jdbc.driver.groupId}</groupId>
+                  <artifactId>${org.apache.jetspeed.test.jdbc.driver.artifactId}</artifactId>
+                  <version>${org.apache.jetspeed.test.jdbc.driver.version}</version>
+                </dependency>
+              </dependencies>
+              <goals>
+                <goal>init-db</goal>
+              </goals>
+              <configuration>
+                <unpackResources>
+                  <resourceBundle>${groupId}:jetspeed-portal-resources:${pom.version}</resourceBundle>
+                  <resources>
+                    <unpack includes="ddl/${org.apache.jetspeed.test.database.default.name}/"/>

+                  </resources>
+                </unpackResources>
+                <sqlScripts>
+                  <sqlScript>
+                    <path>${project.build.directory}/ddl/${org.apache.jetspeed.test.database.default.name}/drop-schema.sql</path>
+                    <ignoreErrors>true</ignoreErrors>
+                  </sqlScript>
+                  <sqlScript>
+                    <path>${project.build.directory}/ddl/${org.apache.jetspeed.test.database.default.name}/create-schema.sql</path>
+                  </sqlScript>
+                </sqlScripts>
+                <username>${org.apache.jetspeed.test.database.user}</username>
+                <password>${org.apache.jetspeed.test.database.password}</password>
+                <url>${org.apache.jetspeed.test.database.url}</url>
+                <driver>${org.apache.jetspeed.test.database.driver}</driver>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+    </profile>      
   </profiles>      
 
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message