[ http://jira.codehaus.org/browse/MGWT-131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=202729#action_202729 ]
Richard Allen edited comment on MGWT-131 at 12/15/09 12:22 PM: --------------------------------------------------------------- @nicolas: I'm surprised you consider executing a maven plugin from a pom project a "hack". Maven was designed to make that possible. @Daniel: The following is a very shortened version of our project structure. It provides for very good sharing of code between projects. Both project1 and project2 are web applications (they compose {{.war}} files). The projects under the {{apps/}} directories are Java WebStart apps that communicate with the web application. The projects under the {{modules/}} directories are projects with a WAR structure (portions of the overall WAR), which we once used the maven-war-plugin to overlay on top of another war project to form the final war file (e.g., {{project1.war}} and {{project2.war}}). Now we use the pom project in the {{webapp/}} directories to assemble the project. We copy the {{src/main/webapp}} directory as you suggested. The resulting JAR ({{src/main/resources}} and {{src/main/java}}) from the {{modules}} projects end up in {{WEB-INF/lib}}. It's much more flexible, and much faster. {noformat} pom/ |- pom.xml (pom parent for all projects) | common/ |- pom.xml (pom parent for common projects) | |- util/ | |- pom.xml (jar project with common utility code) | |- src/main/resources | \- src/main/java | |- app/ | |- pom.xml (jar project with common domain code) | |- src/main/resources | \- src/main/java | |- web/ | |- pom.xml (jar project with common JEE code) | |- src/main/resources | \- src/main/java | |- gwt/ | |- pom.xml (jar project with common GWT widgets) | |- src/main/resources | \- src/main/java | modules/ |- pom.xml (pom parent for common web modules - WAR projects) | |- common-feature1-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | |- common-feature2-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | project1/ |- pom.xml (pom parent for project1) | |- common/ | |- pom.xml (pom parent for project1 common JAR projects) | | | |- app/ | | |- pom.xml (jar project with project1 common domain code) | | |- src/main/resources | | \- src/main/java | | | |- web/ | | |- pom.xml (jar project with project1 common JEE code) | | |- src/main/resources | | \- src/main/java | | | \- gwt/ | |- pom.xml (jar project with project1 common GWT widgets) | |- src/main/resources | \- src/main/java | |- apps/ | |- pom.xml (pom parent for project1 WebStart application projects) | | | |- app1/ | | |- pom.xml (jar project - Java WebStart application) | | |- src/main/resources | | \- src/main/java | | | \- app2/ | |- pom.xml (jar project - Java WebStart application) | |- src/main/resources | \- src/main/java | |- modules/ | |- pom.xml (pom parent for project1 web modules - WAR projects) | | | |- project1-feature1-module/ | | |- pom.xml (war type project) | | |- src/main/resources | | |- src/main/java | | \- src/main/webapp | | | \- project1-feature2-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | |- webapp/ | \- pom.xml (pom project with <modules> to build project1.war) | project2/ |- pom.xml (pom parent for project2) | |- common/ | |- pom.xml (pom parent for project2 common JAR projects) | | | |- app/ | | |- pom.xml (jar project with project2 common domain code) | | |- src/main/resources | | \- src/main/java | | | |- web/ | | |- pom.xml (jar project with project2 common JEE code) | | |- src/main/resources | | \- src/main/java | | | \- gwt/ | |- pom.xml (jar project with project2 common GWT widgets) | |- src/main/resources | \- src/main/java | |- apps/ | |- pom.xml (pom parent for project2 WebStart application projects) | | | |- app1/ | | |- pom.xml (jar project - Java WebStart application) | | |- src/main/resources | | \- src/main/java | | | \- app2/ | |- pom.xml (jar project - Java WebStart application) | |- src/main/resources | \- src/main/java | |- modules/ | |- pom.xml (pom parent for project2 web modules - WAR projects) | | | |- project2-feature1-module/ | | |- pom.xml (war type project) | | |- src/main/resources | | |- src/main/java | | \- src/main/webapp | | | \- project2-feature2-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | |- webapp/ | \- pom.xml (pom project with <modules> to build project2.war) | ... {noformat} was (Author: richard.allen): @nicolas: I'm surprised you consider executing a maven plugin from a pom project a "hack". Maven was designed to make that possible. @Daniel: The following is a very shortened version of our project structure. It provides for very good sharing of code between projects. Both project1 and project2 are web applications (they compose {{.war}} files). The projects under the {{apps/}} directories are Java WebStart apps that communicate with the web application. The projects under the {{modules/}} directories are projects with a WAR structure (portions of the overall WAR), which we once used the maven-war-plugin to overlay on top of another war project to form the final war file (e.g., {{project1.war}} and {{project2.war}}). Now we use the pom project in the {{webapp/}} directories to assemble the project. We copy the {{src/main/webapp}} directory as you suggested. The resulting JAR ({{src/main/resources}} and {{src/main/java}}) from the {{modules}} projects end up in {{WEB-INF/lib}}. It's much more flexible, and much faster. {noformat} pom/ |- pom.xml (pom parent for all projects) | common/ |- pom.xml (pom parent for common projects) | |- util/ | |- pom.xml (jar project with common utility code) | |- src/main/resources | \- src/main/java | |- app/ | |- pom.xml (jar project with common domain code) | |- src/main/resources | \- src/main/java | |- web/ | |- pom.xml (jar project with common JEE code) | |- src/main/resources | \- src/main/java | |- gwt/ | |- pom.xml (jar project with common GWT widgets) | |- src/main/resources | \- src/main/java | modules/ |- pom.xml (pom parent for common web modules - WAR projects) | |- user-admin-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | project1/ |- pom.xml (pom parent for project1) | |- common/ | |- pom.xml (pom parent for project1 common JAR projects) | | | |- app/ | | |- pom.xml (jar project with project1 common domain code) | | |- src/main/resources | | \- src/main/java | | | |- web/ | | |- pom.xml (jar project with project1 common JEE code) | | |- src/main/resources | | \- src/main/java | | | \- gwt/ | |- pom.xml (jar project with project1 common GWT widgets) | |- src/main/resources | \- src/main/java | |- apps/ | |- pom.xml (pom parent for project1 WebStart application projects) | | | |- app1/ | | |- pom.xml (jar project - Java WebStart application) | | |- src/main/resources | | \- src/main/java | | | \- app2/ | |- pom.xml (jar project - Java WebStart application) | |- src/main/resources | \- src/main/java | |- modules/ | |- pom.xml (pom parent for project1 web modules - WAR projects) | | | |- feature1-module/ | | |- pom.xml (war type project) | | |- src/main/resources | | |- src/main/java | | \- src/main/webapp | | | \- feature2-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | |- webapp/ | \- pom.xml (pom project with <modules> to build project1.war) | project2/ |- pom.xml (pom parent for project2) | |- common/ | |- pom.xml (pom parent for project2 common JAR projects) | | | |- app/ | | |- pom.xml (jar project with project2 common domain code) | | |- src/main/resources | | \- src/main/java | | | |- web/ | | |- pom.xml (jar project with project2 common JEE code) | | |- src/main/resources | | \- src/main/java | | | \- gwt/ | |- pom.xml (jar project with project2 common GWT widgets) | |- src/main/resources | \- src/main/java | |- apps/ | |- pom.xml (pom parent for project2 WebStart application projects) | | | |- app1/ | | |- pom.xml (jar project - Java WebStart application) | | |- src/main/resources | | \- src/main/java | | | \- app2/ | |- pom.xml (jar project - Java WebStart application) | |- src/main/resources | \- src/main/java | |- modules/ | |- pom.xml (pom parent for project2 web modules - WAR projects) | | | |- feature1-module/ | | |- pom.xml (war type project) | | |- src/main/resources | | |- src/main/java | | \- src/main/webapp | | | \- feature2-module/ | |- pom.xml (war type project) | |- src/main/resources | |- src/main/java | \- src/main/webapp | |- webapp/ | \- pom.xml (pom project with <modules> to build project2.war) | ... {noformat} > Plugin attempts to compile projects with 'pom' packaging > -------------------------------------------------------- > > Key: MGWT-131 > URL: http://jira.codehaus.org/browse/MGWT-131 > Project: Maven 2.x GWT Plugin > Issue Type: Bug > Affects Versions: 2.0 > Environment: Fedora 11, Java 1.6.0_16, Maven 2.2.1, GWT 1.7.1 > Reporter: Daniel Scott > Assignee: nicolas de loof > Priority: Minor > Fix For: 1.2 > > > When the GWT compile goal is enabled for projects which have the 'pom' > packaging type, maven attempts to compile the project and fails because no > source code is available. The compilation should be disabled by default for > projects which have the 'pom' packaging type. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email