Sounds good to me ! -Vishwa
On Thu, Dec 6, 2012 at 1:36 PM, Romain Manni-Bucau <rmannibu...@gmail.com>wrote: > great! > > thinking to it i think a very simple crud with jsf front can be the > expected quickstart > > wdyt? > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: http://fr.linkedin.com/in/rmannibucau > Github: https://github.com/rmannibucau > > > > 2012/12/6 Vishwanath Krishnamurthi <tovishwan...@gmail.com>: > > Hi Romain, > > > > Would be nice to have these added to it. > > I'll get started with this, this evening. > > > > -Vishwa > > > > On Thu, Dec 6, 2012 at 2:54 AM, Romain Manni-Bucau < > rmannibu...@gmail.com>wrote: > > > >> Hi guys, > >> > >> with JL we got as feedback we were missing a real archetype with tomee > >> maven plugin etc configured. > >> > >> i pushed a simple one > >> > >> i commented all the arquillian stuff (to avoid to need to pull it if not > >> used) > >> > >> currently it only contain a servlet, and a beans.xml > >> > >> wonder if > >> 1) we should put some basic persistence (1 entity + 1 persistence.xml > >> + openjpa-maven-plugin to enhance the entity) > >> 2) add a cdi bean and inject it in the servlet > >> 3) add an ejb > >> 4) add a test > >> ... > >> > >> any help on such a topic is welcomed > >> > >> Romain Manni-Bucau > >> Twitter: @rmannibucau > >> Blog: http://rmannibucau.wordpress.com/ > >> LinkedIn: http://fr.linkedin.com/in/rmannibucau > >> Github: https://github.com/rmannibucau > >> > >> > >> > >> > >> ---------- Forwarded message ---------- > >> From: <rmannibu...@apache.org> > >> Date: 2012/12/5 > >> Subject: svn commit: r1417653 - in /openejb/trunk/openejb/maven: ./ > >> tomee-webapp-archetype/ tomee-webapp-archetype/src/ > >> tomee-webapp-archetype/src/main/ > >> tomee-webapp-archetype/src/main/resources/ > >> tomee-webapp-archetype/src/main/resources/META-INF/ tomee-webapp-... > >> To: comm...@openejb.apache.org > >> > >> > >> Author: rmannibucau > >> Date: Wed Dec 5 21:19:35 2012 > >> New Revision: 1417653 > >> > >> URL: http://svn.apache.org/viewvc?rev=1417653&view=rev > >> Log: > >> TOMEE-630 basic maven artifact (to enhance) > >> > >> Added: > >> openejb/trunk/openejb/maven/tomee-webapp-archetype/ > >> openejb/trunk/openejb/maven/tomee-webapp-archetype/pom.xml > >> openejb/trunk/openejb/maven/tomee-webapp-archetype/src/ > >> openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/ > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/Index.java > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/resources/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/java/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/ > >> > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml > >> Modified: > >> openejb/trunk/openejb/maven/pom.xml > >> > >> Modified: openejb/trunk/openejb/maven/pom.xml > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/pom.xml?rev=1417653&r1=1417652&r2=1417653&view=diff > >> > >> > ============================================================================== > >> --- openejb/trunk/openejb/maven/pom.xml (original) > >> +++ openejb/trunk/openejb/maven/pom.xml Wed Dec 5 21:19:35 2012 > >> @@ -15,7 +15,6 @@ > >> 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/xsd/maven-4.0.0.xsd"> > >> @@ -41,6 +40,7 @@ > >> <module>maven-util</module> > >> <module>spi-helper-maven-plugin</module> > >> <module>spi-helper-jee6-profile</module> > >> + <module>tomee-webapp-archetype</module> > >> </modules> > >> > >> <dependencyManagement> > >> > >> Added: openejb/trunk/openejb/maven/tomee-webapp-archetype/pom.xml > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/pom.xml?rev=1417653&view=auto > >> > >> > ============================================================================== > >> --- openejb/trunk/openejb/maven/tomee-webapp-archetype/pom.xml (added) > >> +++ openejb/trunk/openejb/maven/tomee-webapp-archetype/pom.xml Wed Dec > >> 5 21:19:35 2012 > >> @@ -0,0 +1,30 @@ > >> +<?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/xsd/maven-4.0.0.xsd"> > >> + <parent> > >> + <artifactId>maven</artifactId> > >> + <groupId>org.apache.openejb.maven</groupId> > >> + <version>1.0.1-SNAPSHOT</version> > >> + </parent> > >> + <modelVersion>4.0.0</modelVersion> > >> + > >> + <artifactId>tomee-webapp-archetype</artifactId> > >> + <name>OpenEJB :: Maven Plugins :: TomEE Webapp Archetype</name> > >> +</project> > >> > >> Added: > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml?rev=1417653&view=auto > >> > >> > ============================================================================== > >> --- > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml > >> (added) > >> +++ > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/META-INF/archetype.xml > >> Wed Dec 5 21:19:35 2012 > >> @@ -0,0 +1,32 @@ > >> +<?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 xmlns=" > >> http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0" > >> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> + xsi:schemaLocation=" > >> http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 > >> + > >> http://maven.apache.org/xsd/archetype-1.0.0.xsd"> > >> + <id>quickstart</id> > >> + <sources> > >> + <source>src/main/java/Index.java</source> > >> + </sources> > >> + <resources> > >> + <resource>src/main/webapp/WEB-INF/beans.xml</resource> > >> + </resources> > >> + <testResources> > >> + <resource>src/test/resources/arquillian.xml</resource> > >> + </testResources> > >> +</archetype> > >> > >> Added: > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml?rev=1417653&view=auto > >> > >> > ============================================================================== > >> --- > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml > >> (added) > >> +++ > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/pom.xml > >> Wed Dec 5 21:19:35 2012 > >> @@ -0,0 +1,119 @@ > >> +<?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> > >> + > >> + <groupId>${groupId}</groupId> > >> + <artifactId>${artifactId}</artifactId> > >> + <version>${version}</version> > >> + <packaging>war</packaging> > >> + <name>${artifactId} TomEE Webapp</name> > >> + <url>http://tomee.apache.org</url> > >> + > >> + <dependencies> > >> + <dependency> > >> + <groupId>org.apache.openejb</groupId> > >> + <artifactId>javaee-api</artifactId> > >> + <version>6.0-4</version> > >> + <scope>provided</scope> > >> + </dependency> > >> + > >> + <!-- to test with TomEE and Arquillian > >> + <dependency> > >> + <groupId>org.apache.openejb</groupId> > >> + <artifactId>arquillian-tomee-remote</artifactId> > >> + <version>1.5.1-SNAPSHOT</version> > >> + <scope>test</scope> > >> + </dependency> > >> + <dependency> > >> + <groupId>org.jboss.arquillian.junit</groupId> > >> + <artifactId>arquillian-junit-container</artifactId> > >> + <version>1.0.3.Final</version> > >> + <scope>test</scope> > >> + </dependency> > >> + <dependency> > >> + <groupId>junit</groupId> > >> + <artifactId>junit</artifactId> > >> + <version>4.11</version> > >> + <scope>test</scope> > >> + </dependency> > >> + --> > >> + > >> + <!-- to test with OpenEJB embedded and Arquillian > >> + <dependency> > >> + <groupId>org.apache.openejb</groupId> > >> + <artifactId>arquillian-openejb-embedded-4</artifactId> > >> + <version>4.5.1-SNAPSHOT</version> > >> + <scope>test</scope> > >> + </dependency> > >> + <dependency> > >> + <groupId>org.jboss.arquillian.junit</groupId> > >> + <artifactId>arquillian-junit-container</artifactId> > >> + <version>1.0.3.Final</version> > >> + <scope>test</scope> > >> + </dependency> > >> + <dependency> > >> + <groupId>junit</groupId> > >> + <artifactId>junit</artifactId> > >> + <version>4.11</version> > >> + <scope>test</scope> > >> + </dependency> > >> + --> > >> + </dependencies> > >> + > >> + <build> > >> + <plugins> > >> + <plugin> > >> + <groupId>org.apache.maven.plugins</groupId> > >> + <artifactId>maven-compiler-plugin</artifactId> > >> + <version>2.5.1</version> > >> + </plugin> > >> + <plugin> > >> + <groupId>org.apache.maven.plugins</groupId> > >> + <artifactId>maven-surefire-plugin</artifactId> > >> + <version>2.12.4</version> > >> + </plugin> > >> + <plugin> > >> + <groupId>org.apache.maven.plugins</groupId> > >> + <artifactId>maven-war-plugin</artifactId> > >> + <version>2.3</version> > >> + <configuration> > >> + <failOnMissingWebXml>false</failOnMissingWebXml> > >> + </configuration> > >> + </plugin> > >> + <plugin> > >> + <groupId>org.apache.openejb.maven</groupId> > >> + <artifactId>tomee-maven-plugin</artifactId> > >> + <version>1.0.1-SNAPSHOT</version> > >> + </plugin> > >> + </plugins> > >> + </build> > >> + > >> + <repositories> > >> + <repository> > >> + <id>apache-snapshot</id> > >> + <name>Apache Snapshot Repository</name> > >> + <url>https://repository.apache.org/content/groups/snapshots/ > </url> > >> + </repository> > >> + </repositories> > >> + > >> + <properties> > >> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > >> + </properties> > >> +</project> > >> > >> Added: > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/Index.java > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/Index.java?rev=1417653&view=auto > >> > >> > ============================================================================== > >> --- > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/Index.java > >> (added) > >> +++ > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/java/Index.java > >> Wed Dec 5 21:19:35 2012 > >> @@ -0,0 +1,33 @@ > >> +/* > >> + * 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 ${groupId}; > >> + > >> +import java.io.IOException; > >> +import javax.servlet.ServletException; > >> +import javax.servlet.annotation.WebServlet; > >> +import javax.servlet.http.HttpServlet; > >> +import javax.servlet.http.HttpServletRequest; > >> +import javax.servlet.http.HttpServletResponse; > >> + > >> +@WebServlet(urlPatterns = "/index") > >> +public class Index extends HttpServlet { > >> + @Override > >> + protected void service(final HttpServletRequest request, final > >> HttpServletResponse response) > >> + throws ServletException, IOException { > >> + response.getWriter().write("Index"); > >> + } > >> +} > >> \ No newline at end of file > >> > >> Added: > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml?rev=1417653&view=auto > >> > >> > ============================================================================== > >> --- > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml > >> (added) > >> +++ > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/beans.xml > >> Wed Dec 5 21:19:35 2012 > >> @@ -0,0 +1,22 @@ > >> +<?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. > >> +--> > >> +<beans 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/beans_1_0.xsd" /> > >> > >> Added: > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml > >> URL: > >> > http://svn.apache.org/viewvc/openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml?rev=1417653&view=auto > >> > >> > ============================================================================== > >> --- > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml > >> (added) > >> +++ > >> > openejb/trunk/openejb/maven/tomee-webapp-archetype/src/main/resources/archetype-resources/src/test/resources/arquillian.xml > >> Wed Dec 5 21:19:35 2012 > >> @@ -0,0 +1,47 @@ > >> +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> > >> +<!-- > >> + > >> + 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. > >> +--> > >> +<arquillian > >> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > >> + xsi:schemaLocation="http://jboss.org/schema/arquillian > >> http://jboss.org/schema/arquillian/arquillian_1_0.xsd"> > >> + <!-- if you decided to use openejb embedded adapter in the pom > >> + <container qualifier="openejb-embedded" default="true"> > >> + <configuration> > >> + <property name="properties"> > >> + my-datasource = new://Resource?type=DataSource > >> + my-datasource.JdbcUrl = jdbc:hsqldb:mem:my-datasource > >> + my-datasource.UserName = sa > >> + my-datasource.Password = > >> + </property> > >> + </configuration> > >> + </container> > >> + --> > >> + <!-- if you decided to use tomee adapter in the pom > >> + <container qualifier="tomee" default="true"> > >> + <configuration> > >> + <property name="httpPort">-1</property> > >> + <property name="stopPort">-1</property> > >> + <property name="ajpPort">-1</property> > >> + <property name="version">${tomee.version}</property> > >> + <property name="dir">target/apache-tomee-remote</property> > >> + <property > >> name="appWorkingDir">target/arquillian-test-working-dir</property> > >> + <property name="properties" /> > >> + </configuration> > >> + </container> > >> + --> > >> +</arquillian> > >> >