portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r646793 - /portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml
Date Thu, 10 Apr 2008 13:21:34 GMT
Author: ate
Date: Thu Apr 10 06:21:31 2008
New Revision: 646793

URL: http://svn.apache.org/viewvc?rev=646793&view=rev
Log:
Finally: A complete jetspeed demo application build with database initialization and installation.
This example pom.xml can easily be copied and adapted for custom portal creation and building,
independant of the Jetspeed-2 src tree.

You only need to:
- adjust the artifactId, groupId and version 
- adjust the predefined properties in the pom to taste (like defining a different portal.context.name)
- add your own portal application resources and features (like custom decorators, pages, extra
default installed portlet applications etc.)

Then execute:
- build  :   mvn install
- init db:  mvn jetspeed-db:init -P demo (or some other profile name you added)
- deploy: mvn jetspeed-db:deploy -P demo

done :)

Modified:
    portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml

Modified: portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml?rev=646793&r1=646792&r2=646793&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml Thu Apr 10 06:21:31
2008
@@ -25,131 +25,40 @@
     <maven>2.0.8</maven>
   </prerequisites>
 
+  <groupId>org.apache.portals.jetspeed-2</groupId>
   <artifactId>jetspeed-demo</artifactId>
+  <version>1.0</version>
   <name>Jetspeed-2 Demo Portal Application</name>
   <description>Jetspeed-2 Demo Portal Application</description>
-  <parent>
-    <groupId>org.apache.portals.jetspeed-2</groupId>
-    <artifactId>applications</artifactId>
-    <version>2.2-SNAPSHOT</version>
-  </parent>
+
   <packaging>war</packaging>
 
   <dependencies>
     <dependency>
       <groupId>org.apache.portals.jetspeed-2</groupId>
       <artifactId>jetspeed</artifactId>
+      <version>${org.apache.portals.jetspeed.version}</version>
       <type>war</type>
       <scope>runtime</scope>
     </dependency>
   </dependencies>
-  
+
   <properties>
+    <portlet-api.version>1.0</portlet-api.version>
+    <org.apache.portals.jetspeed.version>2.2-SNAPSHOT</org.apache.portals.jetspeed.version>
+    <org.apache.pluto.version>1.0.1</org.apache.pluto.version>
+    <org.apache.portals.bridges.common.version>1.0.4</org.apache.portals.bridges.common.version>
+    <portal.context.name>jetspeed</portal.context.name>
     <org.apache.jetspeed.server.home>${project.build.directory}/demo-deploy</org.apache.jetspeed.server.home>
   </properties>
-  
-  <build>
-    <finalName>jetspeed</finalName>
-    <pluginManagement>
-      <plugins>
-          <plugin>
-            <groupId>${pom.groupId}</groupId>
-            <artifactId>jetspeed-deploy-maven-plugin</artifactId>
-            <version>${pom.version}</version>
-            <dependencies>
-              <!-- shared/lib deps -->
-              <dependency>
-                <groupId>${pom.groupId}</groupId>
-                <artifactId>${pom.artifactId}</artifactId>
-                <version>${pom.version}</version>
-                <type>war</type>
-              </dependency>
-              <dependency>
-                <groupId>portlet-api</groupId>
-                <artifactId>portlet-api</artifactId>
-                <version>${portlet-api.version}</version>
-              </dependency>
-              <dependency>
-                <groupId>${pom.groupId}</groupId>
-                <artifactId>jetspeed-api</artifactId>
-                <version>${pom.version}</version>
-                <scope>runtime</scope>
-              </dependency>
-              <dependency>
-                <groupId>${pom.groupId}</groupId>
-                <artifactId>jetspeed-commons</artifactId>
-                <version>${pom.version}</version>
-              </dependency>
-              <dependency>
-                <groupId>org.apache.pluto</groupId>
-                <artifactId>pluto</artifactId>
-                <version>${org.apache.pluto.version}</version>
-              </dependency>
-              <dependency>
-                <groupId>org.apache.portals.bridges</groupId>
-                <artifactId>portals-bridges-common</artifactId>
-                <version>${org.apache.portals.bridges.common.version}</version>
-              </dependency>
-              <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>
-              <!-- j2-admin -->
-              <dependency>
-                <groupId>${pom.groupId}</groupId>
-                <artifactId>j2-admin</artifactId>
-                <version>2.1.3</version>
-                <type>war</type>
-              </dependency>
-              <!-- demo pa's -->
-              <dependency>
-                <groupId>${pom.groupId}</groupId>
-                <artifactId>rss</artifactId>
-                <version>2.1.3</version>
-                <type>war</type>
-              </dependency>
-              <dependency>
-                <groupId>${pom.groupId}</groupId>
-                <artifactId>demo</artifactId>
-                <version>2.1.3</version>
-                <type>war</type>
-              </dependency>
-              <dependency>
-                <groupId>org.apache.portals.bridges</groupId>
-                <artifactId>jsf-demo</artifactId>
-                <version>1.0.4</version>
-                <type>war</type>
-              </dependency>
-              <dependency>
-                <groupId>org.apache.portals.bridges</groupId>
-                <artifactId>jpetstore</artifactId>
-                <version>1.0.4</version>
-                <type>war</type>
-              </dependency>
-          <dependency>
-            <groupId>${pom.groupId}</groupId>
-            <artifactId>jetspeed-layouts</artifactId>
-            <version>${pom.version}</version>
-            <type>war</type>            
-          </dependency>
-
-              <!-- plugin own dependencies -->
-              <dependency>
-                <groupId>org.apache.portals.jetspeed-2</groupId>
-                <artifactId>jetspeed-deploy-tools</artifactId>
-                <version>${pom.version}</version>
-              </dependency>
-            </dependencies>
-          </plugin>
-      </plugins>
-    </pluginManagement>
 
+  <build>
+    <finalName>${portal.context.name}</finalName>
     <plugins>
       <plugin>
-        <groupId>${pom.groupId}</groupId>
+        <groupId>org.apache.portals.jetspeed-2</groupId>
         <artifactId>jetspeed-unpack-maven-plugin</artifactId>
-        <version>${pom.version}</version>
+        <version>${org.apache.portals.jetspeed.version}</version>
         <executions>
           <execution>
             <id>unpack-appserver</id>
@@ -159,7 +68,7 @@
             <phase>process-resources</phase>
             <configuration>
               <unpack>
-                <artifact>${groupId}:jetspeed-portal-resources:jar</artifact>
+                <artifact>org.apache.portals.jetspeed-2:jetspeed-portal-resources:jar</artifact>
                 <targetDirectory>${project.build.directory}/resources/META-INF</targetDirectory>
                 <resources>
                   <resource>
@@ -171,11 +80,18 @@
             </configuration>
           </execution>
         </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.portals.jetspeed-2</groupId>
+            <artifactId>jetspeed-portal-resources</artifactId>
+            <version>${org.apache.portals.jetspeed.version}</version>
+          </dependency>
+        </dependencies>
       </plugin>
       <plugin>
-        <groupId>${pom.groupId}</groupId>
-        <artifactId>jetspeed-deploy-maven-plugin</artifactId>
-        <version>${pom.version}</version>
+        <groupId>org.apache.portals.jetspeed-2</groupId>
+        <artifactId>jetspeed-attached-deploy-maven-plugin</artifactId>
+        <version>${org.apache.portals.jetspeed.version}</version>
         <executions>
           <execution>
             <id>deploy-jetspeed-layouts</id>
@@ -190,13 +106,21 @@
               </destinations>
               <deployments>
                 <deployment>
-                  <artifact>${pom.groupId}:jetspeed-layouts:war</artifact>
+                  <artifact>org.apache.portals.jetspeed-2:jetspeed-layouts:war</artifact>
                   <destination>local</destination>
                 </deployment>
               </deployments>
             </configuration>
           </execution>
         </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.portals.jetspeed-2</groupId>
+            <artifactId>jetspeed-layouts</artifactId>
+            <version>${org.apache.portals.jetspeed.version}</version>
+            <type>war</type>
+          </dependency>
+        </dependencies>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -219,23 +143,111 @@
       <id>demo</id>
       <build>
         <plugins>
+
+          <plugin>
+            <groupId>org.apache.portals.jetspeed-2</groupId>
+            <artifactId>jetspeed-db-maven-plugin</artifactId>
+            <version>${org.apache.portals.jetspeed.version}</version>
+            <goals>
+              <goal>init</goal>
+            </goals>
+            <configuration>
+              <connection>
+                <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>
+              </connection>
+              <unpack>
+                <artifact>org.apache.portals.jetspeed-2:jetspeed-portal-resources:jar</artifact>
+                <resources>
+                  <resource>
+                    <path>ddl</path>
+                    <include>${org.apache.jetspeed.production.database.default.name}/</include>
+                    <destination>db/ddl</destination>
+                  </resource>
+                  <resource>
+                    <path>seed</path>
+                    <destination>db/seed</destination>
+                  </resource>
+                </resources>
+              </unpack>
+              <sql>
+                <scripts>
+                  <script>
+                    <path>
+                      ${project.build.directory}/db/ddl/${org.apache.jetspeed.production.database.default.name}/drop-schema.sql
+                    </path>
+                    <ignoreErrors>true</ignoreErrors>
+                  </script>
+                  <script>
+                    <path>
+                      ${project.build.directory}/db/ddl/${org.apache.jetspeed.production.database.default.name}/create-schema.sql
+                    </path>
+                  </script>
+                </scripts>
+              </sql>
+              <seed>
+                <categories>serializer</categories>
+                <filterPropertiesFileName>
+                  ${project.build.directory}/${project.build.finalName}/WEB-INF/conf/spring-filter.properties
+                </filterPropertiesFileName>
+                <applicationRootPath>${project.build.directory}/${project.build.finalName}</applicationRootPath>
+                <files>
+                  <file>${project.build.directory}/db/seed/j2-seed.xml</file>
+                </files>
+                <initProperties>
+                  <org.apache.jetspeed.database.user>
+                    ${org.apache.jetspeed.production.database.user}
+                  </org.apache.jetspeed.database.user>
+                  <org.apache.jetspeed.database.password>
+                    ${org.apache.jetspeed.production.database.password}
+                  </org.apache.jetspeed.database.password>
+                  <org.apache.jetspeed.database.url>
+                    ${org.apache.jetspeed.production.database.url}
+                  </org.apache.jetspeed.database.url>
+                  <org.apache.jetspeed.database.driver>
+                    ${org.apache.jetspeed.production.database.driver}
+                  </org.apache.jetspeed.database.driver>
+                </initProperties>
+              </seed>
+            </configuration>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>jetspeed-portal-resources</artifactId>
+                <version>${org.apache.portals.jetspeed.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>jetspeed-db-tools</artifactId>
+                <version>${org.apache.portals.jetspeed.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>
+          </plugin>
+
           <plugin>
-            <groupId>${pom.groupId}</groupId>
+            <groupId>org.apache.portals.jetspeed-2</groupId>
             <artifactId>jetspeed-deploy-maven-plugin</artifactId>
-            <version>${pom.version}</version>
+            <version>${org.apache.portals.jetspeed.version}</version>
             <configuration>
               <targetBaseDir>${org.apache.jetspeed.server.home}</targetBaseDir>
-              <portalName>ROOT</portalName>
+              <portalName>${portal.context.name}</portalName>
               <deployments>
                 <!-- shared/lib -->
                 <deployment>
                   <artifact>portlet-api:portlet-api:jar</artifact>
                 </deployment>
                 <deployment>
-                  <artifact>${pom.groupId}:jetspeed-api:jar</artifact>
+                  <artifact>org.apache.portals.jetspeed-2:jetspeed-api:jar</artifact>
                 </deployment>
                 <deployment>
-                  <artifact>${pom.groupId}:jetspeed-commons:jar</artifact>
+                  <artifact>org.apache.portals.jetspeed-2:jetspeed-commons:jar</artifact>
                 </deployment>
                 <deployment>
                   <artifact>org.apache.pluto:pluto:jar</artifact>
@@ -253,21 +265,21 @@
                 <deployment>
                   <artifact>${pom.groupId}:${pom.artifactId}:war</artifact>
                   <expand>true</expand>
-                  <targetName>ROOT</targetName>
-                  <delete>./ROOT</delete>
+                  <targetName>${portal.context.name}</targetName>
+                  <delete>./${portal.context.name}</delete>
                 </deployment>
                 <!-- admin pa -->
                 <deployment>
-                  <artifact>${pom.groupId}:j2-admin:war</artifact>
+                  <artifact>org.apache.portals.jetspeed-2:j2-admin:war</artifact>
                   <delete>./j2-admin</delete>
                 </deployment>
                 <!-- demo pa's -->
                 <deployment>
-                  <artifact>${pom.groupId}:demo:war</artifact>
+                  <artifact>org.apache.portals.jetspeed-2:demo:war</artifact>
                   <delete>./demo</delete>
                 </deployment>
                 <deployment>
-                  <artifact>${pom.groupId}:rss:war</artifact>
+                  <artifact>org.apache.portals.jetspeed-2:rss:war</artifact>
                   <delete>./rss</delete>
                 </deployment>
                 <deployment>
@@ -283,6 +295,85 @@
                 </deployment>
               </deployments>
             </configuration>
+            <dependencies>
+              <!-- shared/lib deps -->
+              <dependency>
+                <groupId>${pom.groupId}</groupId>
+                <artifactId>${pom.artifactId}</artifactId>
+                <version>${pom.version}</version>
+                <type>war</type>
+              </dependency>
+              <dependency>
+                <groupId>portlet-api</groupId>
+                <artifactId>portlet-api</artifactId>
+                <version>${portlet-api.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>jetspeed-api</artifactId>
+                <version>${org.apache.portals.jetspeed.version}</version>
+                <scope>runtime</scope>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>jetspeed-commons</artifactId>
+                <version>${org.apache.portals.jetspeed.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.pluto</groupId>
+                <artifactId>pluto</artifactId>
+                <version>${org.apache.pluto.version}</version>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.bridges</groupId>
+                <artifactId>portals-bridges-common</artifactId>
+                <version>${org.apache.portals.bridges.common.version}</version>
+              </dependency>
+              <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>
+              <!-- j2-admin -->
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>j2-admin</artifactId>
+                <version>2.1.3</version>
+                <type>war</type>
+              </dependency>
+              <!-- demo pa's -->
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>rss</artifactId>
+                <version>2.1.3</version>
+                <type>war</type>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>demo</artifactId>
+                <version>2.1.3</version>
+                <type>war</type>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.bridges</groupId>
+                <artifactId>jsf-demo</artifactId>
+                <version>1.0.4</version>
+                <type>war</type>
+              </dependency>
+              <dependency>
+                <groupId>org.apache.portals.bridges</groupId>
+                <artifactId>jpetstore</artifactId>
+                <version>1.0.4</version>
+                <type>war</type>
+              </dependency>
+
+              <!-- plugin own dependencies -->
+              <dependency>
+                <groupId>org.apache.portals.jetspeed-2</groupId>
+                <artifactId>jetspeed-deploy-tools</artifactId>
+                <version>${org.apache.portals.jetspeed.version}</version>
+              </dependency>
+            </dependencies>
           </plugin>
         </plugins>
       </build>



---------------------------------------------------------------------
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