-
1. Re: broken jboss tools - generated maven seam project?
jjfraney Nov 9, 2010 8:56 PM (in response to bohl)1 of 1 people found this helpfulI've been playing with this feature over the last few weeks. I am not a seam developer; I'm an outsider.
I see the same behavior and have a manual fix to work around. I have not looked for or filed a bug against jboss tools.
I see the behavior in jboss tools for seam 3.2.0.v20101020-1701-H111-Beta2. I use maven 3 on the command line.
I think the normal way to build a maven project after generating by seam is to change dir to the parent directory and run maven there.
My fix is to edit the other pom's to provide a path to the parent pom. The poms that declare the parent project as the pom parent should be edited to look something like this:
<parent><artifactId>try3-parent</artifactId><groupId>org.jjflyboy</groupId><version>0.0.1-SNAPSHOT</version><relativePath>../try3-parent</relativePath></parent><project>
..
<parent>
<artifactId>your-artififact</artifactId>
<groupId>your-group</groupId>
<version>yyy.zzz</version>
<relativePath>../xxxx-parent</relativePath>
</parent>
...
</project>
I don't know if that is the 'Right thing' except it works. The projects find the parent pom by the path given in the relativePath tag. Once this is done, maven can build the project.
Have fun.
-
2. Re: broken jboss tools - generated maven seam project?
bohl Nov 10, 2010 4:20 AM (in response to jjfraney)Thanks John, I can build the projects "xxxx-ejb" and "xxxx" now. However, mvn-install still fails for "xxxx-test", "xxxx-ear" and "xxxx-parent". Apparently, the root cause is that "xxxx-ear", which the other two depend on, doesn't compile, and that is because it has a dependency on "xxxx" with a packaging type of "war". Here's a snippet from the pom.xml of "xxxx-ear":
<dependency><groupId>de.xplace.myxplace</groupId><artifactId>myxplace3.0</artifactId><version>0.0.1-SNAPSHOT</version><type>war</type><scope>runtime</scope></dependency><dependency>
<artifactId>xxxx</artifactId>
<groupId>my.group</groupId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
and here's a snippet from the pom of "xxxx":
<project>
...
<artifactId>xxxx</artifactId>
<groupId>my.group</groupId>
<version>0.0.1-SNAPSHOT</version>
<packaging>ear</packaging>
...
</project>
I think the problem is that xxxx-ear depends on a project with <type>war</war>, but xxxx has <packaging>ear</packaging>. I tried changing the dependency declaration to <type>ear</type>, but get the following error message:
"Failed to execute goal org.apache.maven.plugins:maven-ear-plugin:2.3.1:generate-application-xml
Artifact[war:my.group:xxxx] is not a dependency of the project."
I have done some Java SE maven projects, but I'm new to web development with maven, and I haven't got a clue how to fix that.
-
3. Re: broken jboss tools - generated maven seam project?
snjeza Nov 10, 2010 4:45 AM (in response to bohl)1 of 1 people found this helpfulThe mentioned issues have been fixed within https://jira.jboss.org/browse/JBIDE-7011
-
4. Re: broken jboss tools - generated maven seam project?
bohl Nov 10, 2010 5:43 AM (in response to snjeza)Hi Snjezana, I'm glad you found this thread. I think I'm already using the latest version of JBossAS Tools (2.2.0.v201016-0359-H111-Beta1) as you can see in one of the screenshots I uploaded in the original post ("screen20.png"). Or do I have to update another eclipse feature, apart from JBossAS Tools?
update: I just realized that I need beta2 instead of beta1, sorry. Will update this again in case I get it working now.
-
5. Re: broken jboss tools - generated maven seam project?
maxandersen Nov 10, 2010 5:48 AM (in response to bohl)...and all of this does not relate to JBoss AS tools afaics - so its the seam and maven integration you need updating.
-
6. Re: broken jboss tools - generated maven seam project?
snjeza Nov 10, 2010 5:49 AM (in response to bohl)The changes are included in the nightly build (http://download.jboss.org/jbosstools/updates/nightly/trunk/),
You would also have to update m2eclipse to the latest version using https://repository.sonatype.org/content/repositories/forge-sites/m2e/0.12.0/S/0.12.0.20101102-1505/ and https://repository.sonatype.org/content/repositories/forge-sites/m2eclipse-wtp/0.12.0/N/0.12.0.201011031615/ update sites.
-
7. Re: broken jboss tools - generated maven seam project?
bohl Nov 10, 2010 7:37 AM (in response to snjeza)
Hi all, I updated jbosstools and m2e from the update sites like snjezana said (the "m2eclipse-wtp" update site didn't work for me, eclipse didn't find any packages in there). Unfortunately, I still can't build all of the generated projects. I get an error after clicking "Finish" in the last window of the "create project"-wizard (screenshot01.png). Projects xxxx and xxxx-ejb can be build with "maven-install", but Eclipse doesn't know about the seam jars (see class Authenticator in screenshot02.png), and project xxxx-ear lacks a pom.xml (screenshot02.png), so that and the dependent projects xxxx-test and xxxx-parent cannot be built.screenshot02.png (I hope this doesn't get scaled down too much, why can't there be a file upload like for the original post?)
-
8. Re: broken jboss tools - generated maven seam project?
jjfraney Nov 10, 2010 7:46 AM (in response to bohl)Lars,
The following applies to the maven issue. Perhaps I should not post as this is a jboss ide forum, but jboss ide did not generate these errors, in my experience.
The pom in the ear project should specify the dependency on the web component as a war, not an ear. In other words, your original content of the ear pom is correct:
<dependency>
<artifactId>xxxx</artifactId>
<groupId>my.group</groupId>
<version>0.0.1-SNAPSHOT</version>
<type>war</type>
</dependency>
The pom you posted for the war is not correct. Its packaging should be 'war' not 'ear'.
John
-
9. Re: broken jboss tools - generated maven seam project?
snjeza Nov 10, 2010 8:22 AM (in response to bohl)> the "m2eclipse-wtp" update site didn't work for me, eclipse didn't find any packages in there
You have to uncheck "Group items by category"
-
10. Re: broken jboss tools - generated maven seam project?
bohl Nov 10, 2010 12:44 PM (in response to snjeza)Hi,
I just installed a fresh copy of eclipse "helios" and then installed m2e, m2eclipse-wtp, "JBoss Maven Seam Integration" and JBossAS Tools (in that order), all from the links snjezana posted. Result: Same problem as before: The xxxx-ear project can't be built with maven (missing dependency on the "war"-packaged project "xxxx", which has a declared packaging "ear"). Also, the application.xml in the target folder of project xxxx has no modules listed (might be a consequence of the other problem).
-
11. Re: broken jboss tools - generated maven seam project?
snjeza Nov 10, 2010 4:21 PM (in response to bohl)m2eclipse doesn't support workspace resolution for a flat layot project.
You can do the following:- call some maven action on *-parent project
or
- install *-ejb and *-war projects and then call some maven action on *-ear project
-
12. Re: broken jboss tools - generated maven seam project?
bohl Nov 11, 2010 2:45 AM (in response to snjeza)> call some maven action on *-parent project
you mean command line maven?
> install *-ejb and *-war projects and then call some maven action on *-ear project
There is no "*-war" project. There are 5 projects called "xxxx", "xxxx-ear", "xxxx-ejb", "xxxx-parent" and "xxxx-test". Also, as mentioned before, the "xxxx-ear" project is broken (no "pom.xml").
-
13. Re: broken jboss tools - generated maven seam project?
snjeza Nov 11, 2010 4:57 AM (in response to bohl)> you mean command line maven?
You can use command line maven or right-click the project and call Run As>Maven clean/package/build/install ...
> There is no "*-war" project. There are 5 projects called "xxxx", "xxxx-ear", "xxxx-ejb", "xxxx-parent" and "xxxx-test". Also, as mentioned before, the
> "xxxx-ear" project is broken (no "pom.xml").war (web) project is a project without a suffix (xxxx).
There is also a problem with generating the application.xml file. See https://jira.jboss.org/browse/JBIDE-4809. Will fix it today. As a workaround, you can change the line:
<generateApplicationXml>false</generateApplicationXml>
to
<generateApplicationXml>true</generateApplicationXml>
<earSourceExcludes>**/application.xml, **/jboss-app.xml</earSourceExcludes>in the pom.xml of the EAR project.
-
14. Re: broken jboss tools - generated maven seam project?
bohl Nov 11, 2010 6:06 AM (in response to snjeza)Snjezana,
here's the full tree of the generated EAR project. It has only 3 files and lacks a pom.xml.
update: I just uploaded the tarred project.
-
xxxx.tgz 147.1 KB
-