You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/07/18 21:57:50 UTC
svn commit: r678019 [1/3] - in /portals/jetspeed-2/portal/trunk: ./
applications/jetspeed-demo/ maven/ maven/jetspeed-mvn-maven-plugin/
maven/jetspeed-mvn-maven-plugin/src/
maven/jetspeed-mvn-maven-plugin/src/main/
maven/jetspeed-mvn-maven-plugin/src/m...
Author: ate
Date: Fri Jul 18 12:57:49 2008
New Revision: 678019
URL: http://svn.apache.org/viewvc?rev=678019&view=rev
Log:
JS2-895: Provide a solution to seperate the Jetspeed build integration tasks (configuration,database,deploy) from the standard Maven-2 build lifecycle
See: http://issues.apache.org/jira/browse/JS2-895
Added:
portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml (with props)
portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml (with props)
portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/ (with props)
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml (with props)
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java (with props)
portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java (with props)
portals/jetspeed-2/portal/trunk/maven/src/
portals/jetspeed-2/portal/trunk/maven/src/site/
portals/jetspeed-2/portal/trunk/maven/src/site/resources/
portals/jetspeed-2/portal/trunk/maven/src/site/resources/css/
portals/jetspeed-2/portal/trunk/maven/src/site/resources/css/site.css
portals/jetspeed-2/portal/trunk/maven/src/site/site.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/building-jetspeed.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/examples/
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/examples/jetspeed-demo.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/examples/multiple-targets.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/index.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-archetype.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-db-ddl-plugin.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-db-init-plugin.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-deploy-plugin.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-maven-plugins.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-mvn-plugin.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-portal-resources.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/jetspeed-unpack-plugin.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/project-structure.xml (with props)
portals/jetspeed-2/portal/trunk/maven/src/site/xdoc/the-need-for-a-custom-lifecycle.xml (with props)
Removed:
portals/jetspeed-2/portal/trunk/settings.xml.derby.minimal
portals/jetspeed-2/portal/trunk/settings.xml.sample
Modified:
portals/jetspeed-2/portal/trunk/ (props changed)
portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml
portals/jetspeed-2/portal/trunk/maven/pom.xml
portals/jetspeed-2/portal/trunk/pom.xml
portals/jetspeed-2/portal/trunk/quickStart.sh
Propchange: portals/jetspeed-2/portal/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Fri Jul 18 12:57:49 2008
@@ -12,3 +12,5 @@
.springBeansProject
target-eclipse
+
+jetspeed-mvn-settings.xml
Added: portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml (added)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml Fri Jul 18 12:57:49 2008
@@ -0,0 +1,345 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <artifactId>jetspeed-mvn-demo-pom</artifactId>
+ <name>Jetspeed-2 Maven Invoker Configuration for Jetspeed Demo Portal</name>
+ <description>Jetspeed-2 Maven Invoker Configuration for Jetspeed Demo Portal</description>
+ <parent>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>applications</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </parent>
+
+ <packaging>pom</packaging>
+
+ <properties>
+ <org.apache.portals.jetspeed.version>${pom.version}</org.apache.portals.jetspeed.version>
+ <org.apache.jetspeed.portal.context.name>jetspeed</org.apache.jetspeed.portal.context.name>
+ <org.apache.jetspeed.server.home>${project.build.directory}/demo-deploy</org.apache.jetspeed.server.home>
+ </properties>
+
+ <build>
+ <defaultGoal>process-resources</defaultGoal>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>seed</id>
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-db-maven-plugin</artifactId>
+ <version>${org.apache.portals.jetspeed.version}</version>
+ <executions>
+ <execution>
+ <id>seed</id>
+ <goals>
+ <goal>init</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <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>seed</path>
+ <destination>db/seed</destination>
+ </resource>
+ </resources>
+ </unpack>
+ <seed>
+ <categories>serializer</categories>
+ <filterPropertiesFileName>
+ ${project.build.directory}/jetspeed-demo-${pom.version}/WEB-INF/conf/spring-filter.properties
+ </filterPropertiesFileName>
+ <applicationRootPath>
+ ${project.build.directory}/jetspeed-demo-${pom.version}
+ </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>
+ </execution>
+ </executions>
+ <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>
+
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>seed-dbpsml</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-db-maven-plugin</artifactId>
+ <version>${org.apache.portals.jetspeed.version}</version>
+ <executions>
+ <execution>
+ <id>seed-dbpsml</id>
+ <goals>
+ <goal>init</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <psml>
+ <categories>pageSerializer</categories>
+ <filterPropertiesFileName>
+ ${project.build.directory}/jetspeed-demo-${pom.version}/WEB-INF/conf/spring-filter.properties
+ </filterPropertiesFileName>
+ <applicationRootPath>
+ ${project.build.directory}/jetspeed-demo-${pom.version}
+ </applicationRootPath>
+ <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>
+ </psml>
+ </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>
+ <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>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>deploy</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-deploy-maven-plugin</artifactId>
+ <version>${org.apache.portals.jetspeed.version}</version>
+ <executions>
+ <execution>
+ <id>deploy</id>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <targetBaseDir>${org.apache.jetspeed.server.home}</targetBaseDir>
+ <portalName>${org.apache.jetspeed.portal.context.name}</portalName>
+ <deployments>
+ <!-- shared/lib -->
+ <deployment>
+ <artifact>portlet-api:portlet-api:jar</artifact>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.portals.jetspeed-2:jetspeed-api:jar</artifact>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.portals.jetspeed-2:jetspeed-commons:jar</artifact>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.pluto:pluto:jar</artifact>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.portals.bridges:portals-bridges-common:jar</artifact>
+ </deployment>
+ <deployment>
+ <artifact>${org.apache.jetspeed.production.jdbc.driver.groupId}:${org.apache.jetspeed.production.jdbc.driver.artifactId}:jar</artifact>
+ <destination>system</destination>
+ </deployment>
+ <!-- jetspeed portal expanded -->
+ <deployment>
+ <artifact>org.apache.portals.jetspeed-2:jetspeed-demo:war</artifact>
+ <expand>true</expand>
+ <targetName>${org.apache.jetspeed.portal.context.name}</targetName>
+ <delete>./${org.apache.jetspeed.portal.context.name}</delete>
+ </deployment>
+ <!-- admin pa -->
+ <deployment>
+ <artifact>org.apache.portals.jetspeed-2:j2-admin:war</artifact>
+ <delete>./j2-admin</delete>
+ </deployment>
+ <!-- demo pa's -->
+ <deployment>
+ <artifact>org.apache.portals.jetspeed-2:demo:war</artifact>
+ <delete>./demo</delete>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.portals.jetspeed-2:rss:war</artifact>
+ <delete>./rss</delete>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.portals.bridges:jpetstore:war</artifact>
+ <infuse>true</infuse>
+ <delete>./jpetstore</delete>
+ </deployment>
+ <deployment>
+ <artifact>org.apache.portals.bridges:jsf-demo:war</artifact>
+ <infuse>true</infuse>
+ <expand>true</expand>
+ <delete>./jsf-demo</delete>
+ </deployment>
+ </deployments>
+ </configuration>
+ </execution>
+ </executions>
+
+ <dependencies>
+ <!-- shared/lib deps -->
+ <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.production.jdbc.driver.groupId}</groupId>
+ <artifactId>${org.apache.jetspeed.production.jdbc.driver.artifactId}</artifactId>
+ <version>${org.apache.jetspeed.production.jdbc.driver.version}</version>
+ </dependency>
+ <!-- jetspeed-demo -->
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-demo</artifactId>
+ <version>${pom.version}</version>
+ <type>war</type>
+ </dependency>
+ <!-- j2-admin -->
+ <dependency>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>j2-admin</artifactId>
+ <version>${org.apache.portals.jetspeed.version}</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>
+ </profile>
+
+ </profiles>
+
+</project>
Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/jetspeed-mvn-demo-pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
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=678019&r1=678018&r2=678019&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/applications/jetspeed-demo/pom.xml Fri Jul 18 12:57:49 2008
@@ -25,14 +25,21 @@
<maven>2.0.9</maven>
</prerequisites>
- <groupId>org.apache.portals.jetspeed-2</groupId>
<artifactId>jetspeed-demo</artifactId>
- <version>2.2-SNAPSHOT</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>
+ <properties>
+ <org.apache.portals.jetspeed.version>${pom.version}</org.apache.portals.jetspeed.version>
+ </properties>
+
<dependencies>
<dependency>
<groupId>org.apache.portals.jetspeed-2</groupId>
@@ -49,17 +56,8 @@
</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>${portal.context.name}</finalName>
+ <defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.portals.jetspeed-2</groupId>
@@ -133,6 +131,7 @@
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
<configuration>
+ <warName>${pom.artifactId}</warName>
<webResources>
<resource>
<directory>${project.build.directory}/resources</directory>
@@ -146,285 +145,6 @@
<profiles>
<profile>
- <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>org.apache.portals.jetspeed-2</groupId>
- <artifactId>jetspeed-deploy-maven-plugin</artifactId>
- <version>${org.apache.portals.jetspeed.version}</version>
- <configuration>
- <targetBaseDir>${org.apache.jetspeed.server.home}</targetBaseDir>
- <portalName>${portal.context.name}</portalName>
- <deployments>
- <!-- shared/lib -->
- <deployment>
- <artifact>portlet-api:portlet-api:jar</artifact>
- </deployment>
- <deployment>
- <artifact>org.apache.portals.jetspeed-2:jetspeed-api:jar</artifact>
- </deployment>
- <deployment>
- <artifact>org.apache.portals.jetspeed-2:jetspeed-commons:jar</artifact>
- </deployment>
- <deployment>
- <artifact>org.apache.pluto:pluto:jar</artifact>
- </deployment>
- <deployment>
- <artifact>org.apache.portals.bridges:portals-bridges-common:jar</artifact>
- </deployment>
- <deployment>
- <artifact>
- ${org.apache.jetspeed.production.jdbc.driver.groupId}:${org.apache.jetspeed.production.jdbc.driver.artifactId}:jar
- </artifact>
- <destination>system</destination>
- </deployment>
- <!-- jetspeed portal expanded -->
- <deployment>
- <artifact>${pom.groupId}:${pom.artifactId}:war</artifact>
- <expand>true</expand>
- <targetName>${portal.context.name}</targetName>
- <delete>./${portal.context.name}</delete>
- </deployment>
- <!-- admin pa -->
- <deployment>
- <artifact>org.apache.portals.jetspeed-2:j2-admin:war</artifact>
- <delete>./j2-admin</delete>
- </deployment>
- <!-- demo pa's -->
- <deployment>
- <artifact>org.apache.portals.jetspeed-2:demo:war</artifact>
- <delete>./demo</delete>
- </deployment>
- <deployment>
- <artifact>org.apache.portals.jetspeed-2:rss:war</artifact>
- <delete>./rss</delete>
- </deployment>
- <deployment>
- <artifact>org.apache.portals.bridges:jpetstore:war</artifact>
- <infuse>true</infuse>
- <delete>./jpetstore</delete>
- </deployment>
- <deployment>
- <artifact>org.apache.portals.bridges:jsf-demo:war</artifact>
- <infuse>true</infuse>
- <expand>true</expand>
- <delete>./jsf-demo</delete>
- </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.production.jdbc.driver.groupId}</groupId>
- <artifactId>${org.apache.jetspeed.production.jdbc.driver.artifactId}</artifactId>
- <version>${org.apache.jetspeed.production.jdbc.driver.version}</version>
- </dependency>
- <!-- j2-admin -->
- <dependency>
- <groupId>org.apache.portals.jetspeed-2</groupId>
- <artifactId>j2-admin</artifactId>
- <version>${org.apache.portals.jetspeed.version}</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>
- </profile>
-
- <profile>
- <id>demo-dbpsml</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>
- <psml>
- <categories>pageSerializer</categories>
- <filterPropertiesFileName>
- ${project.build.directory}/${project.build.finalName}/WEB-INF/conf/spring-filter.properties
- </filterPropertiesFileName>
- <applicationRootPath>${project.build.directory}/${project.build.finalName}</applicationRootPath>
- <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>
- </psml>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
<id>dbpsml</id>
<build>
<resources>
Added: portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml Fri Jul 18 12:57:49 2008
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <artifactId>jetspeed-mvn-dbinit-pom</artifactId>
+ <name>Jetspeed-2 Maven Invoker Database Initialization</name>
+ <description>Jetspeed-2 Maven Invoker Database Initialization</description>
+ <parent>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-2</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </parent>
+ <packaging>pom</packaging>
+
+ <build>
+ <defaultGoal>process-resources</defaultGoal>
+
+ <plugins>
+ <plugin>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>jetspeed-db-maven-plugin</artifactId>
+ <version>${pom.version}</version>
+ <configuration>
+ <connection>
+ <username>${org.apache.jetspeed.@database.type@.database.user}</username>
+ <password>${org.apache.jetspeed.@database.type@.database.password}</password>
+ <url>${org.apache.jetspeed.@database.type@.database.url}</url>
+ <driver>${org.apache.jetspeed.@database.type@.database.driver}</driver>
+ </connection>
+ </configuration>
+ <executions>
+ <execution>
+ <id>unpack-ddl</id>
+ <goals>
+ <goal>init</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <unpack>
+ <artifact>${groupId}:jetspeed-portal-resources:jar</artifact>
+ <resources>
+ <resource>
+ <path>ddl</path>
+ <destination>ddl/@database.type@</destination>
+ <include>${org.apache.jetspeed.@database.type@.database.default.name}/</include>
+ </resource>
+ </resources>
+ </unpack>
+ </configuration>
+ </execution>
+ <execution>
+ <id>execute-sql</id>
+ <goals>
+ <goal>init</goal>
+ </goals>
+ <phase>process-resources</phase>
+ <configuration>
+ <sql>
+ <scripts>
+ <script>
+ <path>${project.build.directory}/ddl/@database.type@/${org.apache.jetspeed.@database.type@.database.default.name}/drop-schema.sql</path>
+ <ignoreErrors>true</ignoreErrors>
+ </script>
+ <script>
+ <path>${project.build.directory}/ddl/@database.type@/${org.apache.jetspeed.@database.type@.database.default.name}/create-schema.sql</path>
+ </script>
+ </scripts>
+ </sql>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>jetspeed-portal-resources</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${org.apache.jetspeed.@database.type@.jdbc.driver.groupId}</groupId>
+ <artifactId>${org.apache.jetspeed.@database.type@.jdbc.driver.artifactId}</artifactId>
+ <version>${org.apache.jetspeed.@database.type@.jdbc.driver.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+
+ </build>
+
+</project>
Propchange: portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/trunk/jetspeed-mvn-db-init-pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml (added)
+++ portals/jetspeed-2/portal/trunk/jetspeed-mvn-settings-sample.xml Fri Jul 18 12:57:49 2008
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ jetspeed-mvn-settings.xml
+
+ This file is usually placed in your root project folder.
+ It can be used to provide a specific Maven settings.xml for usage with the jetspeed:mvn plugin
+ when executing specific targets, like database initialization or deployments.
+ This allows easier maintenance and configuration for different conditions and environments
+ like development|test|staging|production, *and* keeping these configurations with your
+ project source (version management).
+
+ By providing multiple profiles, it is easy to switch different settings by configuring the
+ specific profile(s) to be used for a specific jetspeed:mvn target with a <profiles> subelement.
+
+ Lookup and usage of the nearest jetspeed-mvn-settings.xml file, searching current project folder
+ and then upwards to the root project, is enabled by default.
+
+ The default lookup behavior can be disabled or overridden in 3 ways (in higest precedence order):
+
+ a) specify a custom settings.xml file in one of the target specific or general jetspeed-mvn properties
+ using key jetspeed.mvn.settings.xml
+ b) specify a specific settings.xml file for a target with a <settingsFile> element
+ c) configure <useSettings>false</useSettings> in the configuration of the jetspeed:mvn plugin
+ to disable using a custom settings.xml
+ d) lookup of the nearest jetspeed-mvn-settings.xml
+
+ $Id$
+-->
+<settings xmlns="http://maven.apache.org/POM/4.0.0">
+
+ <profiles>
+
+ <!-- Sample Jetspeed Invoker (jetspeed:mvn plugin) Maven settings.xml configuration using embedded Derby-->
+ <profile>
+ <id>jetspeed-mvn-settings</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <org.apache.jetspeed.services.autodeployment.user>j2deployer</org.apache.jetspeed.services.autodeployment.user>
+ <org.apache.jetspeed.services.autodeployment.password>j2deployer</org.apache.jetspeed.services.autodeployment.password>
+
+ <org.apache.jetspeed.server.home>@rootdir@/applications/jetspeed-demo/target/demo-deploy</org.apache.jetspeed.server.home>
+
+ <!-- demo embedded Derby database configurations -->
+
+ <!-- Production Derby jdbc driver artifact properties -->
+
+ <org.apache.jetspeed.production.jdbc.driver.groupId>org.apache.derby</org.apache.jetspeed.production.jdbc.driver.groupId>
+ <org.apache.jetspeed.production.jdbc.driver.artifactId>derby</org.apache.jetspeed.production.jdbc.driver.artifactId>
+ <org.apache.jetspeed.production.jdbc.driver.version>10.3.2.1</org.apache.jetspeed.production.jdbc.driver.version>
+
+ <!-- required production database configuration properties:
+ make sure to check/correct the database.url path location (e.g. /tmp on Linux usually is restricted)
+ -->
+ <org.apache.jetspeed.production.database.default.name>derby</org.apache.jetspeed.production.database.default.name>
+ <org.apache.jetspeed.production.database.url>jdbc:derby:/tmp/derby/productiondb;create=true</org.apache.jetspeed.production.database.url>
+ <org.apache.jetspeed.production.database.driver>org.apache.derby.jdbc.EmbeddedDriver</org.apache.jetspeed.production.database.driver>
+ <org.apache.jetspeed.production.database.user></org.apache.jetspeed.production.database.user>
+ <org.apache.jetspeed.production.database.password></org.apache.jetspeed.production.database.password>
+
+ <!-- Jetspeed Portal development test Derby database properties -->
+
+ <org.apache.jetspeed.test.jdbc.driver.groupId>org.apache.derby</org.apache.jetspeed.test.jdbc.driver.groupId>
+ <org.apache.jetspeed.test.jdbc.driver.artifactId>derby</org.apache.jetspeed.test.jdbc.driver.artifactId>
+ <org.apache.jetspeed.test.jdbc.driver.version>10.3.2.1</org.apache.jetspeed.test.jdbc.driver.version>
+
+ <!-- make sure to check/correct the database.url path location (e.g. /tmp on Linux usually is restricted) -->
+ <org.apache.jetspeed.test.database.default.name>derby</org.apache.jetspeed.test.database.default.name>
+ <org.apache.jetspeed.test.database.url>jdbc:derby:/tmp/derby/testdb;create=true</org.apache.jetspeed.test.database.url>
+ <org.apache.jetspeed.test.database.driver>org.apache.derby.jdbc.EmbeddedDriver</org.apache.jetspeed.test.database.driver>
+ <org.apache.jetspeed.test.database.user></org.apache.jetspeed.test.database.user>
+ <org.apache.jetspeed.test.database.password></org.apache.jetspeed.test.database.password>
+
+ </properties>
+ </profile>
+
+ </profiles>
+
+</settings>
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jul 18 12:57:49 2008
@@ -0,0 +1 @@
+target
Added: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml (added)
+++ portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml Fri Jul 18 12:57:49 2008
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id$
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <artifactId>jetspeed-mvn-maven-plugin</artifactId>
+ <name>Jetspeed 2 Maven Invoker Plugin</name>
+ <description>Jetspeed 2 Maven Maven Invoker Plugin</description>
+ <parent>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>maven</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </parent>
+ <packaging>maven-plugin</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>jetspeed-maven-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-invoker</artifactId>
+ <version>2.0.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>2.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-settings</artifactId>
+ <version>2.0.9</version>
+ </dependency>
+ <dependency>
+ <groupId>org.beanshell</groupId>
+ <artifactId>bsh</artifactId>
+ <version>2.0b4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <!-- TODO: 1.5.1 seems to cause problems with quoted commandline parameters containing spaces on Windows
+ see: http://jira.codehaus.org/browse/MSHARED-21
+ should be fixed with org.apache.maven.share:maven-invoker:2.0.9
+ -->
+ <version>1.5</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-plugin-plugin</artifactId>
+ <configuration>
+ <goalPrefix>jetspeed</goalPrefix>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/pom.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java (added)
+++ portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java Fri Jul 18 12:57:49 2008
@@ -0,0 +1,181 @@
+package org.apache.jetspeed.maven.plugins;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import org.apache.maven.project.MavenProject;
+import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
+
+/**
+ * Copied from org.apache.maven.plugin.invoker.CompositeMap.java
+ *
+ * @author <a href="mailto:olamy@apache.org">olamy</a>
+ * @version $Id$
+ */
+public class CompositeMap implements Map
+{
+ private MavenProject mavenProject;
+
+ private Properties properties;
+
+ public CompositeMap( MavenProject mavenProject, Properties properties )
+ {
+ this.mavenProject = mavenProject;
+ this.properties = properties == null ? new Properties() : properties;
+ }
+
+ public Properties getProperties()
+ {
+ return properties;
+ }
+
+ /**
+ * @see java.util.Map#clear()
+ */
+ public void clear()
+ {
+ // nothing here
+ }
+
+ /**
+ * @see java.util.Map#containsKey(java.lang.Object)
+ */
+ public boolean containsKey( Object key )
+ {
+ if ( key == null )
+ {
+ return false;
+ }
+ try
+ {
+ Object evaluated = ReflectionValueExtractor.evaluate( (String) key, this.mavenProject );
+ return evaluated == null;
+ }
+ catch ( Exception e )
+ {
+ // uhm do we have to throw a RuntimeException here ?
+ }
+
+ return ( mavenProject.getProperties().containsKey( key ) || properties.containsKey( key ) );
+ }
+
+ /**
+ * @see java.util.Map#containsValue(java.lang.Object)
+ */
+ public boolean containsValue( Object value )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#entrySet()
+ */
+ public Set entrySet()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#get(java.lang.Object)
+ */
+ public Object get( Object key )
+ {
+ if ( key == null )
+ {
+ return null;
+ }
+ try
+ {
+ Object evaluated = ReflectionValueExtractor.evaluate( (String) key, this.mavenProject );
+ if ( evaluated != null )
+ {
+ return evaluated;
+ }
+ }
+ catch ( Exception e )
+ {
+ // uhm do we have to throw a RuntimeException here ?
+ }
+
+ Object value = properties.get( key );
+
+ return ( value != null ? value : this.mavenProject.getProperties().get( key ) );
+
+ }
+
+ /**
+ * @see java.util.Map#isEmpty()
+ */
+ public boolean isEmpty()
+ {
+ return this.mavenProject == null && this.mavenProject.getProperties().isEmpty() && this.properties.isEmpty();
+ }
+
+ /**
+ * @see java.util.Map#keySet()
+ */
+ public Set keySet()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#put(java.lang.Object, java.lang.Object)
+ */
+ public Object put( Object key, Object value )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#putAll(java.util.Map)
+ */
+ public void putAll( Map t )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#remove(java.lang.Object)
+ */
+ public Object remove( Object key )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#size()
+ */
+ public int size()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @see java.util.Map#values()
+ */
+ public Collection values()
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/CompositeMap.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java (added)
+++ portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java Fri Jul 18 12:57:49 2008
@@ -0,0 +1,600 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.maven.plugins;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.settings.Settings;
+import org.apache.maven.shared.invoker.CommandLineConfigurationException;
+import org.apache.maven.shared.invoker.DefaultInvocationRequest;
+import org.apache.maven.shared.invoker.InvocationRequest;
+import org.apache.maven.shared.invoker.InvocationResult;
+import org.apache.maven.shared.invoker.Invoker;
+import org.apache.maven.shared.invoker.MavenCommandLineBuilder;
+import org.apache.maven.shared.invoker.MavenInvocationException;
+import org.apache.maven.shared.invoker.SystemOutLogger;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.InterpolationFilterReader;
+import org.codehaus.plexus.util.ReaderFactory;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.WriterFactory;
+import org.codehaus.plexus.util.cli.CommandLineException;
+import org.codehaus.plexus.util.interpolation.MapBasedValueSource;
+import org.codehaus.plexus.util.interpolation.RegexBasedInterpolator;
+
+/**
+ * Based upon org.apache.maven.plugin.invoker.InvokerMojo.java, r655038
+ *
+ * @goal mvn
+ * @aggregator
+ * @requiresDirectInvocation true
+ * @author <a href="mailto:ate@douma.nu">Ate Douma</a>
+ * @version $Id$
+ */
+public class MvnMojo extends AbstractMojo
+{
+ public static class Target
+ {
+ public Target()
+ {
+ }
+
+ public Target(String name)
+ {
+ this.name = name;
+ init();
+ }
+
+ public void init()
+ {
+ if (properties == null)
+ {
+ properties = new HashMap<String,String>();
+ }
+ }
+
+ protected String id;
+ protected String name;
+ protected String dir;
+ protected String settingsFile;
+ protected String goals;
+ protected String profiles;
+ protected String depends;
+ protected Map<String,String> properties;
+ protected String mavenOpts;
+
+ public String toString()
+ {
+ return id;
+ }
+ }
+
+ /**
+ * @parameter
+ */
+ protected String defaultTarget;
+
+ /**
+ * @parameter default-value="true"
+ */
+ protected boolean useSettings;
+
+ /**
+ * @parameter
+ */
+ protected String mavenOpts;
+
+ /**
+ * @parameter expression="${target}"
+ */
+ protected String target;
+
+ /**
+ * @parameter
+ */
+ protected Target[] targets;
+
+ /**
+ * Common set of properties to pass in on each project's command line, via -D parameters.
+ *
+ * @parameter
+ */
+ protected Map properties;
+
+ /**
+ * The predefined root project directory
+ *
+ * @parameter expression="${rootdir}"
+ * @readonly
+ */
+ protected String rootdir;
+
+ /**
+ * @component
+ */
+ protected Invoker invoker;
+
+
+ /**
+ * The current user system settings for use in Maven.
+ *
+ * @parameter expression="${settings}"
+ * @required
+ * @readonly
+ */
+ protected Settings settings;
+
+
+ /** The Maven project.
+ * @parameter expression="${project}"
+ * @required
+ * @readonly
+ */
+ protected MavenProject project;
+
+ /* (non-Javadoc)
+ * @see org.apache.maven.plugin.Mojo#execute()
+ */
+ public void execute() throws MojoExecutionException, MojoFailureException
+ {
+ // determine rootdir
+ if (!StringUtils.isEmpty(rootdir))
+ {
+ File dir = new File(rootdir);
+ if (!dir.exists() || !dir.isDirectory())
+ {
+ throw new MojoFailureException("Project property rootdir doesn't resolve to an existing directory");
+ }
+ else
+ {
+ rootdir = dir.getAbsolutePath();
+ }
+ }
+ else
+ {
+ MavenProject prj = project;
+ while (prj.hasParent())
+ {
+ prj = prj.getParent();
+ }
+ rootdir = prj.getBasedir().getAbsolutePath();
+ }
+
+ HashMap<String,Target> targetsMap = new HashMap<String,Target>();
+
+ if (targets != null)
+ {
+ int i = 0;
+
+ for (Target t : targets)
+ {
+ t.init();
+ if (t.id == null)
+ {
+ throw new MojoFailureException("Target element["+i+"] encountered without id");
+ }
+ if (t.name == null && t.depends == null && t.dir == null)
+ {
+ throw new MojoFailureException("Target ["+t.id+"] requires at least a name, a dir or depends definition");
+ }
+ if (targetsMap.containsKey(t.id))
+ {
+ throw new MojoFailureException("Duplicate target id (or derived from its name): "+t.id);
+ }
+ if (t.dir != null)
+ {
+ t.dir = interpolateRootDir(t.dir);
+ }
+ if (t.settingsFile != null)
+ {
+ t.settingsFile = interpolateRootDir(t.settingsFile);
+ }
+ targetsMap.put(t.id, t);
+ i++;
+ }
+ }
+ String targetId = target;
+ if (StringUtils.isEmpty(targetId) || targetId.equals("true"))
+ {
+ targetId = StringUtils.isEmpty(defaultTarget) ? null : defaultTarget;
+ }
+ if (targetId == null)
+ {
+ throw new MojoFailureException("Specify a target (id) on the commandline using -Dtarget=<id> or define a defaultTarget in the plugin configuration.");
+ }
+
+ List<Target> targetsList = resolveTargets(targetsMap, null, targetId);
+ getLog().info("Resolved target(s) order: "+targetsList);
+ for (Target target : targetsList)
+ {
+ executeTarget(target);
+ }
+ }
+
+ protected void executeTarget(Target target) throws MojoExecutionException, MojoFailureException
+ {
+ if (target.name == null && target.dir == null)
+ {
+ getLog().info("Executing target: "+target.id+" dependent on ["+target.depends+"] ONLY: all done");
+ return;
+ }
+ else if (target.depends==null)
+ {
+ getLog().info("Executing target: "+target.id);
+ }
+ else
+ {
+ getLog().info("Executing target: "+target.id+" dependent on ["+target.depends+"]");
+ }
+
+ File targetDir = target.dir != null ? new File(target.dir) : project.getBasedir();
+
+ if (!targetDir.exists() || !targetDir.isDirectory())
+ {
+ throw new MojoFailureException("Invalid or non-existing target directory "+targetDir.getAbsolutePath());
+ }
+
+ String targetPomName = target.name == null ? "pom.xml" : "jetspeed-mvn-"+target.name+"-pom.xml";
+
+ File targetPom = new File(targetDir, targetPomName);
+ if (!targetPom.exists() || !targetPom.isFile())
+ {
+ if (target.dir != null)
+ {
+ throw new MojoFailureException("Invalid or non-existing target pom "+targetPom.getAbsolutePath());
+ }
+ targetPom = getProjectFile(project, targetPomName);
+ }
+ if (targetPom == null)
+ {
+ throw new MojoFailureException("Target pom file "+targetPomName+" not found in current project directory or one of its parent projects");
+ }
+
+ StringBuffer targetCmdMessage = new StringBuffer();
+ try
+ {
+ targetCmdMessage.append("Invoking target "+target.id+": "+targetPom.getCanonicalPath());
+ }
+ catch (IOException ioe)
+ {
+ getLog().error("Unexpected error: "+ioe.toString());
+ throw new MojoExecutionException("Unexpected error: ",ioe);
+ }
+
+ Properties props = new Properties();
+ if (properties != null)
+ {
+ props.putAll(properties);
+ }
+ props.putAll(target.properties);
+ CompositeMap filter = new CompositeMap(project, props);
+ addFileProperties(filter, getLocalOrProjectFile(targetPom.getParentFile(), project, "jetspeed-mvn.properties"));
+ if (target.name != null)
+ {
+ addFileProperties(filter, getLocalOrProjectFile(targetPom.getParentFile(), project, "jetspeed-mvn-"+target.name+".properties"));
+ if (!target.id.equals(target.name))
+ {
+ addFileProperties(filter, getLocalOrProjectFile(targetPom.getParentFile(), project, "jetspeed-mvn-"+target.name+"-"+target.id+".properties"));
+ }
+ }
+
+ if (!props.containsKey("rootdir"))
+ {
+ props.put("rootdir", rootdir);
+ }
+
+ InvocationRequest request = new DefaultInvocationRequest();
+
+ if (!StringUtils.isEmpty(target.goals))
+ {
+ List<String> goals = Arrays.asList(StringUtils.split(target.goals, ", "));
+ targetCmdMessage.append(" "+StringUtils.join( goals.iterator(), " " ));
+ request.setGoals(goals);
+ }
+ if (!StringUtils.isEmpty(target.profiles))
+ {
+ List<String> profiles = Arrays.asList(StringUtils.split(target.profiles, ", "));
+ targetCmdMessage.append(" "+StringUtils.join( profiles.iterator(), " " ));
+ request.setProfiles(profiles);
+ }
+ request.setProperties(props);
+ request.setInteractive( false );
+ request.setShowErrors(getLog().isErrorEnabled());
+ request.setDebug(getLog().isDebugEnabled());
+ request.setOffline(settings.isOffline());
+ String mavenOpts = props.getProperty("jetspeed.mvn.mavenOpts", null);
+ if (StringUtils.isEmpty(mavenOpts) && !StringUtils.isEmpty(target.mavenOpts))
+ {
+ mavenOpts = target.mavenOpts;
+ }
+ if (StringUtils.isEmpty(mavenOpts) && !StringUtils.isEmpty(this.mavenOpts))
+ {
+ mavenOpts = this.mavenOpts;
+ }
+ if (!StringUtils.isEmpty(mavenOpts))
+ {
+ request.setMavenOpts(mavenOpts);
+ }
+
+ request.setBaseDirectory( targetPom.getParentFile() );
+
+ if (target.name != null)
+ {
+ targetPom = buildInterpolatedFile( targetPom, targetPom.getParentFile(), targetPomName+".interpolated", filter);
+ }
+ request.setPomFile(targetPom);
+
+ File settingsFile = null;
+ String settingsFileName = (String)filter.get("jetspeed.mvn.settings.xml");
+ if (settingsFileName == null)
+ {
+ settingsFileName = target.settingsFile;
+ }
+ if (settingsFileName != null )
+ {
+ settingsFileName = interpolateRootDir(settingsFileName);
+ settingsFile = new File(settingsFileName);
+ if (!settingsFile.exists() || !settingsFile.isFile())
+ {
+ settingsFile = null;
+ }
+ }
+ if (settingsFile == null && useSettings)
+ {
+ settingsFile = getLocalOrProjectFile(targetPom.getParentFile(), project, "jetspeed-mvn-settings.xml");
+ }
+
+ if (settingsFile != null)
+ {
+ settingsFile = buildInterpolatedFile( settingsFile, settingsFile.getParentFile(), settingsFile.getName()+".interpolated", filter);
+ request.setUserSettingsFile(settingsFile);
+ }
+ try
+ {
+ getLog().debug( "Executing: " + new MavenCommandLineBuilder().build( request ) );
+ }
+ catch (CommandLineConfigurationException e)
+ {
+ getLog().debug( "Failed to display command line: " + e.getMessage() );
+ }
+ InvocationResult result = null;
+
+ try
+ {
+ getLog().info(targetCmdMessage.toString());
+ if (invoker.getLogger() == null)
+ {
+ invoker.setLogger(new SystemOutLogger());
+ }
+ result = invoker.execute( request );
+ }
+ catch ( MavenInvocationException e )
+ {
+ getLog().debug( "Error invoking Maven: " + e.getMessage(), e );
+ throw new MojoFailureException("...FAILED[error invoking Maven]");
+ }
+
+ CommandLineException executionException = result.getExecutionException();
+ if ( executionException != null )
+ {
+ throw new MojoFailureException("...FAILED");
+ }
+ else if ( ( result.getExitCode() != 0 ) )
+ {
+ throw new MojoFailureException("...FAILED[code=" + result.getExitCode() + "].");
+ }
+ else
+ {
+ getLog().info( "...SUCCESS." );
+ }
+ }
+
+ protected String interpolateRootDir(String str)
+ {
+ return StringUtils.replace(str, "@rootdir@", rootdir);
+ }
+
+ protected List<Target> resolveTargets(HashMap<String,Target> targetsMap, List<Target> resolving, String id) throws MojoFailureException
+ {
+ List<Target> targets = new ArrayList<Target>();
+
+ Target t = targetsMap.get(id);
+ if (t == null)
+ {
+ if (resolving == null)
+ {
+ t = new Target(id);
+ t.init();
+ }
+ else
+ {
+ throw new MojoFailureException("Target with id "+id+" undefined");
+ }
+ }
+ if (resolving == null)
+ {
+ resolving = new ArrayList<Target>();
+ }
+ if (resolving.contains(t))
+ {
+ throw new MojoFailureException("Circular reference encountered for target "+t.id);
+ }
+ if (t.depends != null)
+ {
+ resolving.add(t);
+ for (String depend : StringUtils.split(t.depends, " ,"))
+ {
+ List<Target> depends = resolveTargets(targetsMap, resolving, depend);
+ for (Target d : depends)
+ {
+ if (!targets.contains(d))
+ {
+ targets.add(d);
+ }
+ }
+ }
+ targets.add(t);
+ resolving.remove(t);
+ }
+ else
+ {
+ targets.add(t);
+ }
+ return targets;
+ }
+
+ protected File buildInterpolatedFile( File originalFile, File targetDirectory, String targetFileName, CompositeMap filter )
+ throws MojoExecutionException, MojoFailureException
+ {
+ File interpolatedFile = new File( targetDirectory, targetFileName );
+ if ( interpolatedFile.exists() )
+ {
+ interpolatedFile.delete();
+ }
+ interpolatedFile.deleteOnExit();
+
+ try
+ {
+ boolean created = interpolatedFile.createNewFile();
+ if ( !created )
+ {
+ throw new MojoFailureException( "Failure creating file " + interpolatedFile.getPath() );
+ }
+ }
+ catch ( IOException e )
+ {
+ throw new MojoFailureException( "Failure creating file " + interpolatedFile.getPath() );
+ }
+
+ BufferedReader reader = null;
+ Writer writer = null;
+ try
+ {
+ // interpolation with token @...@
+ reader = new BufferedReader(new InterpolationFilterReader(ReaderFactory.newXmlReader(originalFile), filter, "@", "@" ));
+ writer = WriterFactory.newXmlWriter( interpolatedFile );
+ String line = null;
+ while ( ( line = reader.readLine() ) != null )
+ {
+ writer.write( line );
+ writer.write("\n");
+ }
+ writer.flush();
+ }
+ catch ( IOException e )
+ {
+ String message = "Failure interpolating file: "+e.getMessage();
+ getLog().error(message);
+ throw new MojoExecutionException( message, e );
+ }
+ finally
+ {
+ // IOUtil in p-u is null check and silently NPE
+ IOUtil.close( reader );
+ IOUtil.close( writer );
+ }
+
+ if ( interpolatedFile == null )
+ {
+ // null check : normally impossible but :-)
+ throw new MojoFailureException( "File is null after interpolation" );
+ }
+ return interpolatedFile;
+ }
+
+ protected void addFileProperties(CompositeMap filter, File propsFile) throws MojoExecutionException, MojoFailureException
+ {
+ if (propsFile != null)
+ {
+ FileInputStream fin = null;
+ Properties props = new Properties();
+ try
+ {
+ fin = new FileInputStream( propsFile );
+
+ props.load( fin );
+ RegexBasedInterpolator interpolator = new RegexBasedInterpolator();
+ interpolator.addValueSource( new MapBasedValueSource( filter ) );
+ for ( Iterator it = props.keySet().iterator(); it.hasNext(); )
+ {
+ String key = (String) it.next();
+ String value = props.getProperty( key );
+ value = interpolator.interpolate( value, "" );
+ props.setProperty( key, value );
+ }
+
+ filter.getProperties().putAll(props);
+ }
+ catch (IOException ioe)
+ {
+ throw new MojoFailureException("Failed to read properties from "+propsFile.getAbsolutePath());
+ }
+ finally
+ {
+ IOUtil.close( fin );
+ }
+ }
+ }
+
+ protected File getLocalOrProjectFile(File localDir, MavenProject project, String name)
+ {
+ File file = new File(localDir, name);
+ if (!file.exists() || !file.isFile())
+ {
+ file = getProjectFile(project, name);
+ }
+ return file;
+ }
+
+ protected File getProjectFile(MavenProject project, String name)
+ {
+ File basedir = project.getBasedir();
+ if (basedir == null)
+ {
+ return null;
+ }
+ File projectFile = new File(basedir, name);
+ if (projectFile.exists() && projectFile.isFile())
+ {
+ // found;
+ }
+ else if (project.getParent() != null)
+ {
+ projectFile = getProjectFile(project.getParent(), name);
+ }
+ else
+ {
+ projectFile = null;
+ }
+ return projectFile;
+ }
+}
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: portals/jetspeed-2/portal/trunk/maven/pom.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/pom.xml?rev=678019&r1=678018&r2=678019&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/pom.xml (original)
+++ portals/jetspeed-2/portal/trunk/maven/pom.xml Fri Jul 18 12:57:49 2008
@@ -1,46 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
- $Id$
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id$
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
- <prerequisites>
- <maven>2.0.9</maven>
- </prerequisites>
-
- <artifactId>maven</artifactId>
- <name>Jetspeed-2 Maven Plugins</name>
- <description>Jetspeed-2 Maven Plugins</description>
- <parent>
- <groupId>org.apache.portals.jetspeed-2</groupId>
- <artifactId>jetspeed-2</artifactId>
- <version>2.2-SNAPSHOT</version>
- </parent>
- <packaging>pom</packaging>
-
- <modules>
- <module>jetspeed-maven-utils</module>
- <module>jetspeed-unpack-maven-plugin</module>
- <module>jetspeed-deploy-maven-plugin</module>
- <module>jetspeed-db-maven-plugin</module>
- <module>jetspeed-archetype</module>
- </modules>
-
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <prerequisites>
+ <maven>2.0.9</maven>
+ </prerequisites>
+
+ <artifactId>maven</artifactId>
+ <name>Jetspeed-2 Maven Plugins</name>
+ <description>Jetspeed-2 Maven Plugins</description>
+ <parent>
+ <groupId>org.apache.portals.jetspeed-2</groupId>
+ <artifactId>jetspeed-2</artifactId>
+ <version>2.2-SNAPSHOT</version>
+ </parent>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>jetspeed-maven-utils</module>
+ <module>jetspeed-mvn-maven-plugin</module>
+ <module>jetspeed-unpack-maven-plugin</module>
+ <module>jetspeed-deploy-maven-plugin</module>
+ <module>jetspeed-db-maven-plugin</module>
+ <module>jetspeed-archetype</module>
+ </modules>
+
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <reportSets>
+ <reportSet>
+ <reports>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+
</project>
Added: portals/jetspeed-2/portal/trunk/maven/src/site/resources/css/site.css
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/src/site/resources/css/site.css?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/src/site/resources/css/site.css (added)
+++ portals/jetspeed-2/portal/trunk/maven/src/site/resources/css/site.css Fri Jul 18 12:57:49 2008
@@ -0,0 +1,9 @@
+#leftColumn {
+ width: 250px;
+ float:left;
+ overflow: auto;
+}
+#bodyColumn {
+ margin-right: 1.5em;
+ margin-left: 270px;
+}
Added: portals/jetspeed-2/portal/trunk/maven/src/site/site.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/src/site/site.xml?rev=678019&view=auto
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/src/site/site.xml (added)
+++ portals/jetspeed-2/portal/trunk/maven/src/site/site.xml Fri Jul 18 12:57:49 2008
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+ $Id$
+-->
+
+<project name="Building and developing Jetspeed-2 using Maven-2">
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html" />
+ <item name="The need for a custom Maven lifecycle" href="the-need-for-a-custom-lifecycle.html" />
+ <item name="Structure of Jetspeed Portal Projects" href="project-structure.html" />
+ <item name="Jetspeed Portal Resources" href="jetspeed-portal-resources.html" />
+ </menu>
+ <menu name="Documentation">
+ <item name="Jetspeed Maven Plugins Overview" href="jetspeed-maven-plugins.html">
+ <item name="Using jetspeed:mvn" href="jetspeed-mvn-plugin.html" />
+ <item name="Using jetspeed-unpack:unpack" href="jetspeed-unpack-plugin.html" />
+ <item name="Using jetspeed-db:init" href="jetspeed-db-init-plugin.html" />
+ <item name="Using jetspeed-db:ddl" href="jetspeed-db-ddl-plugin.html" />
+ <item name="Using jetspeed-deploy:deploy" href="jetspeed-deploy-plugin.html" />
+ </item>
+ <item name="Using the Jetspeed Archetype" href="jetspeed-archetype.html" />
+ <item name="Building Jetspeed-2 from source" href="building-jetspeed.html" />
+ </menu>
+ <menu name="Examples">
+ <item name="Jetspeed Demo Portal" href="examples/jetspeed-demo.html" />
+ <item name="Multiple target environments" href="examples/multiple-targets.html" />
+ </menu>
+ </body>
+</project>
Propchange: portals/jetspeed-2/portal/trunk/maven/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: portals/jetspeed-2/portal/trunk/maven/src/site/site.xml
------------------------------------------------------------------------------
svn:keywords = Id
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org