You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ow...@apache.org on 2014/01/24 17:29:16 UTC

svn commit: r1561052 - /cxf/fediz/trunk/services/idp/pom.xml

Author: owulff
Date: Fri Jan 24 16:29:15 2014
New Revision: 1561052

URL: http://svn.apache.org/r1561052
Log:
[FEDIZ-69] Support starting IDP with jetty maven plugin

Modified:
    cxf/fediz/trunk/services/idp/pom.xml

Modified: cxf/fediz/trunk/services/idp/pom.xml
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/services/idp/pom.xml?rev=1561052&r1=1561051&r2=1561052&view=diff
==============================================================================
--- cxf/fediz/trunk/services/idp/pom.xml (original)
+++ cxf/fediz/trunk/services/idp/pom.xml Fri Jan 24 16:29:15 2014
@@ -1,157 +1,152 @@
 <?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.
--->
-<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>
-    <parent>
-        <groupId>org.apache.cxf.fediz</groupId>
-        <artifactId>fediz</artifactId>
-        <version>1.2.0-SNAPSHOT</version>
-        <relativePath>../../pom.xml</relativePath>
-    </parent>
-    <artifactId>fediz-idp</artifactId>
-    <name>Apache Fediz IDP (Spring Security &amp; Spring Web Flow)</name>
-    <packaging>war</packaging>
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-        	    <groupId>org.springframework</groupId>
-        	    <artifactId>spring-jdbc</artifactId>
-        	    <version>3.1.4.RELEASE</version>
-            </dependency>
-            <dependency>
-        	    <groupId>org.springframework</groupId>
-        	    <artifactId>spring-tx</artifactId>
-        	    <version>3.1.4.RELEASE</version>
-            </dependency>
-            <dependency>
-        	    <groupId>org.springframework</groupId>
-        	    <artifactId>spring-aop</artifactId>
-        	    <version>3.1.4.RELEASE</version>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-    <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>javax.servlet</groupId>
-            <artifactId>servlet-api</artifactId>
-            <version>2.5</version>
-            <scope>provided</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf.fediz</groupId>
-            <artifactId>fediz-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-webmvc</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-tx</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-orm</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-web</artifactId>
-            <version>${spring.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-test</artifactId>
-            <version>${spring.version}</version>
-            <scope>test</scope>
-        </dependency>         
-        
-        <dependency>
-            <groupId>org.springframework.webflow</groupId>
-            <artifactId>spring-webflow</artifactId>
-            <version>2.3.1.RELEASE</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.security</groupId>
-            <artifactId>spring-security-web</artifactId>
-            <version>${spring.security.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.security</groupId>
-            <artifactId>spring-security-config</artifactId>
-            <version>${spring.security.version}</version>
-        </dependency> 
-        <dependency>
-          <groupId>ognl</groupId>
-          <artifactId>ognl</artifactId>
-          <version>3.0.5</version>
-          <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
-            <version>${slf4j.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-ws-security</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-transports-http</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-ws-policy</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-            <version>3.0.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-rs-extension-providers</artifactId>
-            <version>${cxf.version}</version>
-        </dependency>        
-        <dependency>
+<!-- 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. -->
+<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>
+	<parent>
+		<groupId>org.apache.cxf.fediz</groupId>
+		<artifactId>fediz</artifactId>
+		<version>1.2.0-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	<artifactId>fediz-idp</artifactId>
+	<name>Apache Fediz IDP (Spring Security &amp; Spring Web Flow)</name>
+	<packaging>war</packaging>
+	<dependencyManagement>
+		<dependencies>
+			<dependency>
+				<groupId>org.springframework</groupId>
+				<artifactId>spring-jdbc</artifactId>
+				<version>3.1.4.RELEASE</version>
+			</dependency>
+			<dependency>
+				<groupId>org.springframework</groupId>
+				<artifactId>spring-tx</artifactId>
+				<version>3.1.4.RELEASE</version>
+			</dependency>
+			<dependency>
+				<groupId>org.springframework</groupId>
+				<artifactId>spring-aop</artifactId>
+				<version>3.1.4.RELEASE</version>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<idp.https.port>9443</idp.https.port>
+		<idp.http.port>9080</idp.http.port>
+	</properties>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf.fediz</groupId>
+			<artifactId>fediz-core</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-tx</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-orm</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+			<version>${spring.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.webflow</groupId>
+			<artifactId>spring-webflow</artifactId>
+			<version>2.3.1.RELEASE</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-web</artifactId>
+			<version>${spring.security.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework.security</groupId>
+			<artifactId>spring-security-config</artifactId>
+			<version>${spring.security.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>ognl</groupId>
+			<artifactId>ognl</artifactId>
+			<version>3.0.5</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-ws-security</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-transports-http</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-ws-policy</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<version>3.0.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-rs-extension-providers</artifactId>
+			<version>${cxf.version}</version>
+		</dependency>
+		<dependency>
 			<groupId>org.codehaus.jackson</groupId>
 			<artifactId>jackson-jaxrs</artifactId>
 			<version>1.9.13</version>
@@ -160,37 +155,29 @@
 			<groupId>org.codehaus.jackson</groupId>
 			<artifactId>jackson-xc</artifactId>
 			<version>1.9.13</version>
-		</dependency>		
-        <!-- 
-        <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jpa_2.0_spec</artifactId>
-            <version>1.1</version>
-        </dependency>
-        -->
-        
-        <dependency>
-            <groupId>hsqldb</groupId>
-            <artifactId>hsqldb</artifactId>
-            <version>1.8.0.7</version>
-            <scope>test</scope>
-        </dependency>
-         
-            <dependency>
-      <groupId>cglib</groupId>
-      <artifactId>cglib-nodep</artifactId>
-      <version>2.1_3</version>
-    </dependency>
-         
-        <dependency>
-            <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa-all</artifactId>
-            <version>2.2.2</version>
-        </dependency>             
-    </dependencies>
-    <build>
-    	<resources>
-    		<resource>
+		</dependency>
+		<dependency>
+			<groupId>hsqldb</groupId>
+			<artifactId>hsqldb</artifactId>
+			<version>1.8.0.7</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>cglib</groupId>
+			<artifactId>cglib-nodep</artifactId>
+			<version>2.1_3</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.openjpa</groupId>
+			<artifactId>openjpa-all</artifactId>
+			<version>2.2.2</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<resources>
+			<resource>
 				<directory>src/main/resources</directory>
 				<filtering>true</filtering>
 				<includes>
@@ -198,54 +185,54 @@
 					<include>**/web.xml</include>
 				</includes>
 			</resource>
-    		<resource>
+			<resource>
 				<directory>src/main/resources</directory>
 				<filtering>false</filtering>
 				<excludes>
 					<exclude>**/realm.properties</exclude>
 					<exclude>**/web.xml</exclude>
 				</excludes>
-			</resource>			
-    	</resources>
-        <plugins>
-            <plugin>
-		        <groupId>org.apache.openjpa</groupId>
-		        <artifactId>openjpa-maven-plugin</artifactId>
-		        <version>2.2.2</version>
-		        <inherited>true</inherited>
-		        <configuration>
-		            <persistenceXmlFile>${project.basedir}/src/main/resources/META-INF/spring-persistence.xml</persistenceXmlFile>
-		            <includes>org/apache/cxf/fediz/service/idp/service/jpa/**/*.class</includes>
-		        </configuration>
-		        <executions>
-		            <execution>
-		                <id>enhancer</id>
-		                <phase>process-classes</phase>
-		                <goals>
-		                    <goal>enhance</goal>
-		                </goals>
-		            </execution>
-		        </executions>
-		        <dependencies>
-		            <dependency>
-		                <groupId>xerces</groupId>
-		                <artifactId>xercesImpl</artifactId>
-		                <version>2.11.0</version>
-		            </dependency>
-		        </dependencies>
-		    </plugin>
-            <plugin>
-                <!--for mvn tomcat:deploy/:undeploy/:redeploy -->
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>tomcat-maven-plugin</artifactId>
-                <version>1.1</version>
-                <configuration>
-                    <server>myTomcat</server>
-                    <url>http://localhost:9080/manager/text</url>
-                    <path>/${project.build.finalName}</path>
-                </configuration>
-            </plugin>
-            <plugin>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.openjpa</groupId>
+				<artifactId>openjpa-maven-plugin</artifactId>
+				<version>2.2.2</version>
+				<inherited>true</inherited>
+				<configuration>
+					<persistenceXmlFile>${project.basedir}/src/main/resources/META-INF/spring-persistence.xml</persistenceXmlFile>
+					<includes>org/apache/cxf/fediz/service/idp/service/jpa/**/*.class</includes>
+				</configuration>
+				<executions>
+					<execution>
+						<id>enhancer</id>
+						<phase>process-classes</phase>
+						<goals>
+							<goal>enhance</goal>
+						</goals>
+					</execution>
+				</executions>
+				<dependencies>
+					<dependency>
+						<groupId>xerces</groupId>
+						<artifactId>xercesImpl</artifactId>
+						<version>2.11.0</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+			<plugin>
+				<!--for mvn tomcat:deploy/:undeploy/:redeploy -->
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>tomcat-maven-plugin</artifactId>
+				<version>1.1</version>
+				<configuration>
+					<server>myTomcat</server>
+					<url>http://localhost:9080/manager/text</url>
+					<path>/${project.build.finalName}</path>
+				</configuration>
+			</plugin>
+			<plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-war-plugin</artifactId>
 				<configuration>
@@ -269,13 +256,70 @@
 					</webResources>
 				</configuration>
 			</plugin>
-            
-        </plugins>
-        <!-- Name of the generated WAR file -->
-        <finalName>fediz-idp</finalName>
-    </build>
-    
-    <profiles>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>properties-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<goals>
+							<goal>set-system-properties</goal>
+						</goals>
+						<configuration>
+							<properties>
+								<property>
+									<name>catalina.base</name>
+									<value>target</value>
+								</property>
+							</properties>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>jetty-maven-plugin</artifactId>
+				<version>${jetty.version}</version>
+				<configuration>
+					<connectors>
+						<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+							<port>${idp.http.port}</port>
+							<maxIdleTime>30000</maxIdleTime>
+						</connector>
+						<connector
+							implementation="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
+							<port>${idp.https.port}</port>
+							<maxIdleTime>30000</maxIdleTime>
+							<keystore>../../examples/samplekeys/idp-ssl-server.jks</keystore>
+							<keyPassword>tompass</keyPassword>
+							<password>tompass</password>
+						</connector>
+					</connectors>
+					<contextHandlers>
+						<contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
+							<war>target/fediz-idp.war</war>
+							<contextPath>/fediz-idp</contextPath>
+						</contextHandler>
+                        <contextHandler implementation="org.eclipse.jetty.webapp.WebAppContext">
+                            <war>target/fediz-idp-sts.war</war>
+                            <contextPath>/fediz-idp-sts</contextPath>
+                            <throwUnavailableOnStartupException>false</throwUnavailableOnStartupException>
+                        </contextHandler>						
+					</contextHandlers>
+				</configuration>
+				<dependencies>
+					<dependency>
+						<groupId>hsqldb</groupId>
+						<artifactId>hsqldb</artifactId>
+						<version>1.8.0.7</version>
+					</dependency>
+				</dependencies>
+			</plugin>
+		</plugins>
+		<!-- Name of the generated WAR file -->
+		<finalName>fediz-idp</finalName>
+	</build>
+
+	<profiles>
 		<profile>
 			<id>realm-a</id>
 			<activation>
@@ -290,7 +334,7 @@
 			</build>
 		</profile>
 		<profile>
-			<id>realm-b</id>			
+			<id>realm-b</id>
 			<properties>
 			</properties>
 			<build>
@@ -300,5 +344,47 @@
 				<finalName>fediz-idp-remote</finalName>
 			</build>
 		</profile>
+		<profile>
+	        <id>sts</id>
+	        <build>
+	           <!-- If you choose this profile -Psts then the profile 'realm-a' is not active -->
+	           <!-- activeByDefault means the profile is active if no other profile has been chosen -->
+	           <!-- Therefore, filter definition copied from profile 'realm-a' -->
+               <filters>
+                   <filter>src/main/filters/realm-a/env.properties</filter>
+               </filters>	        
+	           <plugins>
+	               <plugin>
+		                <groupId>org.apache.maven.plugins</groupId>
+		                <artifactId>maven-dependency-plugin</artifactId>
+						<executions>
+						    <execution>
+						        <id>copy-sts</id>
+						        <phase>generate-resources</phase>
+						        <goals>
+						            <goal>copy</goal>
+						        </goals>
+						        <configuration>
+						            <artifactItems>
+						                <artifactItem>
+						                    <groupId>org.apache.cxf.fediz</groupId>
+						                    <artifactId>fediz-idp-sts</artifactId>
+						                    <version>${project.version}</version>
+						                    <type>war</type>
+						                    <overWrite>true</overWrite>
+						                    <outputDirectory>target/</outputDirectory>
+						                </artifactItem>                              
+						            </artifactItems>
+						            <outputAbsoluteArtifactFilename>true</outputAbsoluteArtifactFilename>
+						            <overWriteSnapshots>true</overWriteSnapshots>
+						            <overWriteIfNewer>true</overWriteIfNewer>
+						            <stripVersion>true</stripVersion>
+						        </configuration>
+						    </execution>
+						</executions>
+                   </plugin>
+	           </plugins>
+	        </build>
+		</profile>
 	</profiles>
 </project>