And of course, we should also keep Jan's GSoC project Manila in mind, which is soon finished!
Regards, Jakob 2011/8/24 Jakob Korherr <jak...@apache.org>: > Hi guys, > > I just committed an archetype for creating an integration-test module > for MyFaces core. > > With this archetype you are able to generate a module with one of > three configurations (servlet 2.5 + el 1.0, servlet 2.5 + el 2.2 or > serlvet 3.0 + el 2.2), just like the basic integration-tests modules > in the 2.0.x branch. > > This stuff works pretty well, however while working on the archetype I > was - again - thinking about the basic integration-test architecture > for MyFaces core and I found some flaws in the current design. For > example it is not possible to test MyFaces core 2.0.7-SNAPSHOT or > earlier, b/c there was no integration-test support module back then. > Or the version of MyFaces core is currently only defined by the parent > module, which is pretty inflexible. And of course there is also the > discussion about re-using some tests across different versions, which > is not easily possible at the moment. > > Thus I am thinking of changing the integration-test module structure a > bit, which would of course also mean changing the archetype. So please > see this archetype as a first draft and nothing more! > > Suggestions for a kick-ass integration-test module structure are > always welcome! Thanks for your attention. > > Regards, > Jakob > > ---------- Forwarded message ---------- > From: <jak...@apache.org> > Date: 2011/8/24 > Subject: svn commit: r1161089 - in > /myfaces/myfaces-build-tools/trunk/maven2-archetypes: ./ > myfaces-archetype-codi-jsf12/src/site/apt/ > myfaces-archetype-codi-jsf20/src/site/apt/ > myfaces-archetype-core-integration-test/ > myfaces-archetype-core-integration-test/sr... > To: comm...@myfaces.apache.org > > > Author: jakobk > Date: Wed Aug 24 13:19:38 2011 > New Revision: 1161089 > > URL: http://svn.apache.org/viewvc?rev=1161089&view=rev > Log: > MYFACES-3290 Archetype for integration-test modules > > Added: > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/ > (with props) > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/pom.xml > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/LICENSE.txt > - copied unchanged from r1146098, > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/META-INF/LICENSE.txt > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/NOTICE.txt > - copied unchanged from r1146098, > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/main/resources/META-INF/NOTICE.txt > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/maven/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/maven/archetype-metadata.xml > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/pom.xml > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/java/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/java/TestBean.java > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/pages/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/java/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/apt/ > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/apt/index.apt > Modified: > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf12/src/site/apt/index.apt > > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/site/apt/index.apt > myfaces/myfaces-build-tools/trunk/maven2-archetypes/pom.xml > > Modified: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf12/src/site/apt/index.apt > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf12/src/site/apt/index.apt?rev=1161089&r1=1161088&r2=1161089&view=diff > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf12/src/site/apt/index.apt > (original) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf12/src/site/apt/index.apt > Wed Aug 24 13:19:38 2011 > @@ -1,5 +1,5 @@ > ------ > - Myfaces CODI JSF 1.2 Archetype > + MyFaces CODI JSF 1.2 Archetype > ------ > > Overview > > Modified: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/site/apt/index.apt > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/site/apt/index.apt?rev=1161089&r1=1161088&r2=1161089&view=diff > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/site/apt/index.apt > (original) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-codi-jsf20/src/site/apt/index.apt > Wed Aug 24 13:19:38 2011 > @@ -1,5 +1,5 @@ > ------ > - Myfaces CODI JSF 2.0 Archetype > + MyFaces CODI JSF 2.0 Archetype > ------ > > Overview > > Propchange: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/ > ------------------------------------------------------------------------------ > --- svn:ignore (added) > +++ svn:ignore Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,10 @@ > +target > +.classpath > +.project > +.wtpmodules > +*.ipr > +*.iml > +*.iws > +.settings > +.externalToolBuilders > +maven-eclipse.xml > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/pom.xml > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/pom.xml?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/pom.xml > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/pom.xml > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,40 @@ > +<?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"> > + > + <parent> > + <groupId>org.apache.myfaces.buildtools</groupId> > + <artifactId>myfaces-archetype-parent</artifactId> > + <version>1.0.4-SNAPSHOT</version> > + </parent> > + > + <modelVersion>4.0.0</modelVersion> > + <groupId>org.apache.myfaces.buildtools</groupId> > + <artifactId>myfaces-archetype-core-integration-test</artifactId> > + <packaging>jar</packaging> <!-- maven-archetype --> > + <name>MyFaces Core Integration Test Archetype</name> > + > + <description> > + Archetype to create a new MyFaces core project used for > integration tests via cargo and HtmlUnit. > + Projects created via this archetype aim to test specific > issues from the MyFaces core JIRA issue > + tracker and can be directly added to the MyFaces core > integration-tests module. > + </description> > + > +</project> > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/maven/archetype-metadata.xml > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/maven/archetype-metadata.xml > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/META-INF/maven/archetype-metadata.xml > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,67 @@ > +<?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. > +--> > +<archetype-descriptor > xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" > + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + > xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 > http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" > + name="myfaces-archetype-core-integration-test" > partial="false"> > + > + <requiredProperties> > + <requiredProperty key="groupId"> > + > <defaultValue>org.apache.myfaces.core.integrationtest</defaultValue> > + </requiredProperty> > + > + <requiredProperty key="package"> > + <defaultValue>org.apache.myfaces.integrationtest</defaultValue> > + </requiredProperty> > + > + <requiredProperty key="version"> > + <defaultValue>2.0.9-SNAPSHOT</defaultValue> > + </requiredProperty> > + > + <!-- > + The issueId from the MyFaces core JIRA issue for which > + this integration test is created (e.g MYFACES-1234) > + --> > + <requiredProperty key="issueId" /> > + > + <!-- > + type of environment: > + 0 - servlet 2.5 + el 1.0 (default) > + 1 - servlet 2.5 + el 2.2 > + 2 - servlet 3.0 + el 2.2 > + --> > + <requiredProperty key="environmentType" /> > + </requiredProperties> > + > + <fileSets> > + <fileSet filtered="true" packaged="true"> > + <directory>src/main/java/</directory> > + </fileSet> > + <fileSet filtered="true" packaged="true"> > + <directory>src/test/java/</directory> > + </fileSet> > + <fileSet filtered="true" packaged="false"> > + <directory>src/main/webapp/</directory> > + </fileSet> > + </fileSets> > + > + <modules/> > + > +</archetype-descriptor> > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/pom.xml > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/pom.xml?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/pom.xml > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/pom.xml > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,216 @@ > +#set( $symbol_pound = '#' ) > +#set( $symbol_dollar = '$' ) > +#set( $symbol_escape = '\' ) > +<?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"> > + > + <parent> > + <groupId>org.apache.myfaces.core.integrationtest</groupId> > + <artifactId>myfaces-integration-tests</artifactId> > + > + <!-- NOTE: set appropriate version, e.g. 2.0.x-SNAPSHOT or > 2.1.x-SNAPSHOT --> > + <version>${version}</version> > + </parent> > + > + <modelVersion>4.0.0</modelVersion> > + > + <groupId>${groupId}</groupId> > + <artifactId>${artifactId}</artifactId> > + <packaging>war</packaging> > + <name>Apache MyFaces JSF-2.0 Core Integration Tests - ${issueId}</name> > + > + > + <build> > + <plugins> > + <plugin> > + <!-- to start the container for manual tests use "mvn > clean package cargo:run" --> > + <groupId>org.codehaus.cargo</groupId> > + <artifactId>cargo-maven2-plugin</artifactId> > + <configuration> > + <container> > +## servlet 2.5 + el 2.2 > +#if ($environmentType == 1) > + <!-- using jetty6x here, b/c jetty7x does not > play well with el-2.2 integration --> > + <containerId>jetty6x</containerId> > + <type>embedded</type> > + > + <dependencies> > + <!-- use el 2.2 api+impl from glassfish --> > + <dependency> > + <groupId>javax.el</groupId> > + <artifactId>javax.el-api</artifactId> > + </dependency> > + <dependency> > + <groupId>org.glassfish.web</groupId> > + <artifactId>javax.el</artifactId> > + </dependency> > + </dependencies> > +## servlet 3.0 + el 2.2 > +#elseif ($environmentType == 2) > + <containerId>tomcat7x</containerId> > + <zipUrlInstaller> > + > <url>http://archive.apache.org/dist/tomcat/tomcat-7/v7.0.16/bin/apache-tomcat-7.0.16.zip</url> > + </zipUrlInstaller> > +## servlet 2.5 + el 1.0 (default) > +#else > + <containerId>tomcat6x</containerId> > + <zipUrlInstaller> > + > <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip</url> > + </zipUrlInstaller> > +#end > + </container> > + > + <configuration> > + <properties> > + > <cargo.servlet.port>${symbol_dollar}{cargo.port}</cargo.servlet.port> > + </properties> > + > + <deployables> > + <deployable> > + > <groupId>${symbol_dollar}{project.groupId}</groupId> > + > <artifactId>${symbol_dollar}{project.artifactId}</artifactId> > + <type>war</type> > + <properties> > + > <context>${symbol_dollar}{cargo.context}</context> > + </properties> > + </deployable> > + </deployables> > + </configuration> > + </configuration> > + <executions> > + <execution> > + <id>start-container</id> > + <phase>pre-integration-test</phase> > + <goals> > + <goal>start</goal> > + </goals> > + </execution> > + <execution> > + <id>stop-container</id> > + <phase>post-integration-test</phase> > + <goals> > + <goal>stop</goal> > + </goals> > + </execution> > + </executions> > + </plugin> > + > + <plugin> > + <!-- using failsafe instead of surefire plugin > ensures execution of phase post-integration-test --> > + <artifactId>maven-failsafe-plugin</artifactId> > + <executions> > + <execution> > + <id>htmlunit-integration-tests</id> > + <phase>integration-test</phase> > + <goals> > + <goal>integration-test</goal> > + </goals> > + <configuration> > + <includes> > + <include>**/*Test*.java</include> > + </includes> > + <skip>false</skip> > + > <testNGArtifactName>none:none</testNGArtifactName> > + <systemPropertyVariables> > + <!-- pass properties to JUnit --> > + > <cargo.context>${symbol_dollar}{cargo.context}</cargo.context> > + > <cargo.port>${symbol_dollar}{cargo.port}</cargo.port> > + </systemPropertyVariables> > + </configuration> > + </execution> > + <execution> > + <id>verify</id> > + <phase>verify</phase> > + <goals> > + <goal>verify</goal> > + </goals> > + </execution> > + </executions> > + </plugin> > + > + </plugins> > + </build> > + > + > + <dependencies> > + > +## servlet 2.5 + el 2.2 > +#if ($environmentType == 1) > + <!-- servlet 2.5 --> > + <dependency> > + <groupId>org.apache.geronimo.specs</groupId> > + <artifactId>geronimo-servlet_2.5_spec</artifactId> > + <scope>provided</scope> > + </dependency> > + > + <!-- el 2.2 api+impl from glassfish (need both dependencies > here for cargo-plugin, see above) --> > + <dependency> > + <groupId>javax.el</groupId> > + <artifactId>javax.el-api</artifactId> > + <version>2.2.1</version> > + <scope>provided</scope> > + </dependency> > + <dependency> > + <groupId>org.glassfish.web</groupId> > + <artifactId>javax.el</artifactId> > + <version>2.2.1</version> > + <scope>provided</scope> > + </dependency> > +## servlet 3.0 + el 2.2 > +#elseif ($environmentType == 2) > + <!-- servlet 3.0 --> > + <dependency> > + <groupId>org.apache.geronimo.specs</groupId> > + <artifactId>geronimo-servlet_3.0_spec</artifactId> > + <scope>provided</scope> > + </dependency> > + > + <!-- el 2.2 --> > + <dependency> > + <groupId>org.apache.geronimo.specs</groupId> > + <artifactId>geronimo-el_2.2_spec</artifactId> > + <scope>provided</scope> > + </dependency> > +## servlet 2.5 + el 1.0 (default) > +#else > + <!-- servlet 2.5 --> > + <dependency> > + <groupId>org.apache.geronimo.specs</groupId> > + <artifactId>geronimo-servlet_2.5_spec</artifactId> > + <scope>provided</scope> > + </dependency> > + > + <!-- el 1.0 --> > + <dependency> > + <groupId>org.apache.geronimo.specs</groupId> > + <artifactId>geronimo-el_1.0_spec</artifactId> > + <scope>provided</scope> > + </dependency> > +#end > + > + <!-- test support module --> > + <dependency> > + <groupId>org.apache.myfaces.core.integrationtest</groupId> > + <artifactId>myfaces-integration-test-support</artifactId> > + <scope>test</scope> > + </dependency> > + > + </dependencies> > + > +</project> > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/java/TestBean.java > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/java/TestBean.java?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/java/TestBean.java > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/java/TestBean.java > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,42 @@ > +#set( $symbol_pound = '#' ) > +#set( $symbol_dollar = '$' ) > +#set( $symbol_escape = '\' ) > +/* > + * 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 ${package}; > + > +import javax.faces.bean.ManagedBean; > +import javax.faces.bean.RequestScoped; > + > +/** > + * Bean for integration tests of ${issueId}. > + */ > +@ManagedBean > +@RequestScoped > +public class TestBean > +{ > + > + // TODO > + > + public String action() > + { > + return null; > + } > + > +} > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,66 @@ > +#set( $symbol_pound = '#' ) > +#set( $symbol_dollar = '$' ) > +#set( $symbol_escape = '\' ) > +<?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. > + > +--> > +<web-app xmlns="http://java.sun.com/xml/ns/javaee" > + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" > + version="2.5"> > + > + <servlet> > + <servlet-name>Faces Servlet</servlet-name> > + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> > + <load-on-startup>1</load-on-startup> > + </servlet> > + > + <servlet-mapping> > + <servlet-name>Faces Servlet</servlet-name> > + <url-pattern>*.xhtml</url-pattern> > + </servlet-mapping> > + > + <context-param> > + <param-name>javax.faces.PROJECT_STAGE</param-name> > + <param-value>Production</param-value> > + </context-param> > + > + <context-param> > + <param-name>javax.faces.DEFAULT_SUFFIX</param-name> > + <param-value>.xhtml</param-value> > + </context-param> > + > + <welcome-file-list> > + <welcome-file>index.xhtml</welcome-file> > + </welcome-file-list> > + > +## servlet 2.5 + el 2.2 > +#if ($environmentType == 1) > + <!-- > + we have to explicitly configure glassfish's el 2.2 implementation, > + because it is not the standard one on this server > + --> > + <context-param> > + <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name> > + <param-value>com.sun.el.ExpressionFactoryImpl</param-value> > + </context-param> > +#end > + > +</web-app> > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/main/webapp/pages/index.xhtml > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,48 @@ > +#set( $symbol_pound = '#' ) > +#set( $symbol_dollar = '$' ) > +#set( $symbol_escape = '\' ) > +<?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. > + > +--> > +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > +<html xmlns="http://www.w3.org/1999/xhtml" > + xmlns:f="http://java.sun.com/jsf/core" > + xmlns:h="http://java.sun.com/jsf/html" > + xmlns:ui="http://java.sun.com/jsf/facelets" > + xmlns:c="http://java.sun.com/jsp/jstl/core"> > +<h:head> > + <title>Apache MyFaces Core - Integration test for ${issueId}</title> > +</h:head> > +<h:body> > + > + <h1>Apache MyFaces Core - Integration test for ${issueId}</h1> > + > + <h:messages /> > + > + <h:form id="form"> > + > + <!-- TODO --> > + > + <h:commandButton id="submit" value="Submit" > action="${symbol_pound}{testBean.action}" /> > + </h:form> > + > +</h:body> > +</html> > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/main/resources/archetype-resources/src/test/java/IntegrationTest.java > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,46 @@ > +#set( $symbol_pound = '#' ) > +#set( $symbol_dollar = '$' ) > +#set( $symbol_escape = '\' ) > +/* > + * 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 ${package}; > + > +import com.gargoylesoftware.htmlunit.html.HtmlPage; > +import org.apache.myfaces.integrationtest.support.MyFacesIntegrationTest; > +import org.junit.Assert; > +import org.junit.Test; > +import org.junit.runner.RunWith; > +import org.junit.runners.JUnit4; > + > +/** > + * Test cases for ${issueId}. > + */ > +@RunWith(JUnit4.class) > +public class IntegrationTest extends MyFacesIntegrationTest > +{ > + > + @Test > + public void testAction_shouldExpectedResult() throws Exception > + { > + HtmlPage page = webClient.getPage(getBaseURL() + > "pages/index.xhtml"); > + > + // TODO > + } > + > +} > > Added: > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/apt/index.apt > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/apt/index.apt?rev=1161089&view=auto > ============================================================================== > --- > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/apt/index.apt > (added) > +++ > myfaces/myfaces-build-tools/trunk/maven2-archetypes/myfaces-archetype-core-integration-test/src/site/apt/index.apt > Wed Aug 24 13:19:38 2011 > @@ -0,0 +1,46 @@ > + ------ > + MyFaces Core Integration-Test Archetype > + ------ > + > +Overview > + > + This project defines a Maven archetype. Running the archetype > plugin with this archetype will > + create a directory tree containing the files needed to quickly get > started on a new integration > + test for MyFaces core 2.x. > + > +Usage > + > + Use the following maven command and then select > myfaces-archetype-core-integration-test from the options. > + > + > ++------------------------------------------------------------------+ > +mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org > ++------------------------------------------------------------------+ > + > + You will then be prompted for some archetype specific properties, > which will look like this: > + > ++------------------------------------------------------------------+ > +Define value for property 'artifactId': : myfaces-1234-tests > +Define value for property 'environmentType': : 0 > +Define value for property 'issueId': : MYFACES-1234 > ++------------------------------------------------------------------+ > + > + All other properties (like e.g. groupId) will automatically be > configured. As shown above, you need > + to provide 3 properties: > + > + * artifactId is the artifactId for the maven project, you should > use #\{issueId\}-tests as shown above. > + > + * environmentType defines which type of environment should be used. > + > + * 0: servlet 2.5 and el 1.0 > + > + * 1: servlet 2.5 and el 2.2 > + > + * 2: servlet 3.0 and el 2.2 > + > + * issueId is the issue-id of the JIRA issue which this integration > test addresses > + > + [] > + > + The version of the project is automatically set to a default value > (e.g. 2.0.9-SNAPSHOT). If you > + want to test a different version, you have to change this manually > in the pom.xml. > > Modified: myfaces/myfaces-build-tools/trunk/maven2-archetypes/pom.xml > URL: > http://svn.apache.org/viewvc/myfaces/myfaces-build-tools/trunk/maven2-archetypes/pom.xml?rev=1161089&r1=1161088&r2=1161089&view=diff > ============================================================================== > --- myfaces/myfaces-build-tools/trunk/maven2-archetypes/pom.xml (original) > +++ myfaces/myfaces-build-tools/trunk/maven2-archetypes/pom.xml Wed > Aug 24 13:19:38 2011 > @@ -121,6 +121,7 @@ > <module>myfaces-archetype-jsfcomponents20</module> > <module>myfaces-archetype-codi-jsf12</module> > <module>myfaces-archetype-codi-jsf20</module> > + <module>myfaces-archetype-core-integration-test</module> > </modules> > > <distributionManagement> > > > > > > -- > Jakob Korherr > > blog: http://www.jakobk.com > twitter: http://twitter.com/jakobkorherr > work: http://www.irian.at > -- Jakob Korherr blog: http://www.jakobk.com twitter: http://twitter.com/jakobkorherr work: http://www.irian.at