[jbosstools-issues] [JBoss JIRA] Commented: (JBDS-804) Maven integration issues: setting facets on maven projects and deploying ear on JBoss

Alexander Lengson (JIRA) jira-events at lists.jboss.org
Wed Jul 29 05:10:42 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBDS-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12478034#action_12478034 ] 

Alexander Lengson commented on JBDS-804:
----------------------------------------

Snjezana, 
Specifying the version of Java helps. Problems View is clear from Errors after setting Java compiler version.

However, I believe that other issues I pointed out still exist.
My hope is that Maven Integration will allow people use JBoss AS Tools with Maven projects as easy as it is with Ant.
They differ in that all actions which Ant people have to do manually and explicitly, Maven people have by default, but in particular and specific way. Consequently, Ant people are forced to perform manual settings either in ant scripts or Eclipse project or both.
Maven, on the other side, stands as the single place of project's configuration, and Eclipse project with all its settings could be generated from pom.xml.
That's why I pointed out the libraries' issue (last one):
* for prj-ear: Maven plugin maven-ear-plugin has the option to put all referenced libraries into Lib directory when building the target.
This is part of the config for the plugin: 
<groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-ear-plugin</artifactId> 
<version>2.3.2</version> 
<configuration> 
<includeLibInApplicationXml>true</includeLibInApplicationXml> 
... 
That config builds the EAR which contains lib/ folder inside and all references libs like: 
drools-api-5.0.1.jar 
drools-core-5.0.1.jar 
hsqldb-1.8.0.10.jar 
joda-time-1.6.jar 
mvel2-2.0.10.jar 
prj-jar-1.0-SNAPSHOT.jar 

That can be assured by running command: 
container>mvn install 

Eclipse does not put those libraries into deploy dir while making "Full Publish" which causes server startup errors. 
It's reasonable to engage and copy these libraries onto server when deploying the project using JBoss Server View and debugging server from Eclipse. 
I've also added some explanations to each of the item below:

This one is just convenient:
* for prj-ear: Java EE module dependencies are not checked (they may be suggested from the pom.xml) 
People don't have to set up config for each project each time they have been checked out from repository.


I'm not sure, but I guess that "JBoss Maven Integration" should be set for Maven projects. This is for:
* for prj-jar: 0.0.1-SNAPSHOT "JBoss Maven Integration" facet is not checked. After checking further configuration suggests "0.0.1-SNAPSHOT" instead of "1.0-SNAPSHOT" as declared in pom.xml already. 
* for prj-ejb: the same, i.e. 0.0.1-SNAPSHOT "JBoss Maven Integration" facet is not checked. After checking further configuration suggests "0.0.1-SNAPSHOT" instead of "1.0-SNAPSHOT" as declared in pom.xml already. 
* for prj-ear: the same.
This also notes that suggested default value is not in sync with what specified in pom.xml.


For the following:
* for prj-ejb: when I check EJB 3.0 and then click Further Configuration, it does not propose sensible defaults (instead they are as always: src for sources, build/classes for compiled) 
* for prj-ejb: If I provided values for src and build folder mistakenly, it does not allow to change them (even uncheck/check again shows only form with all fields greyed) 
I could not determine whether this is a Maven Integration business, or another plugin, but I discovered this in the context of trying Maven integration. I suppose that automatic generation of full Eclipse project from pom.xml won't be possible if these defaults are not correct.


> Maven integration issues: setting facets on maven projects and deploying ear on JBoss
> -------------------------------------------------------------------------------------
>
>                 Key: JBDS-804
>                 URL: https://jira.jboss.org/jira/browse/JBDS-804
>             Project: Developer Studio
>          Issue Type: Bug
>         Environment: Eclipse 3.5 
> m2eclipse (0.9.9.20090720)
> JBoss Tools AS M3 developer version
> Subclipse SVN plugin 1.6.3
>            Reporter: Alexander Lengson
>            Assignee: Snjezana Peco
>         Attachments: container.zip
>
>
> Using Maven command line, I created four projects:
> container - the parent Maven project. It also serves as a container for other projects
> prj-jar - a shared library used by all other EJBs
> prj-ejb - sample EJB
> prj-ear - EE container for jar and ejb
> Apache plugins for Maven (both for ejb and ear) are used. 
> I've performed the following steps:
> * imported container into SVN
> * opened Eclipse 3.5 with M3 JBoss AS Tools and dev version of m2eclipse (0.9.9.20090720)
> * right-clicked on container and chosen "Checkout as Maven project"
> * waited for the process to be finished
> And the following likely are bugs and/or open questions:
> * for prj-jar: 0.0.1-SNAPSHOT "JBoss Maven Integration" facet is not checked. After checking further configuration suggests "0.0.1-SNAPSHOT" instead of "1.0-SNAPSHOT" as declared in pom.xml already.
> * for prj-ejb: the same, i.e. 0.0.1-SNAPSHOT "JBoss Maven Integration" facet is not checked. After checking further configuration suggests "0.0.1-SNAPSHOT" instead of "1.0-SNAPSHOT" as declared in pom.xml already.
> * for prj-ear: the same.
> * for container: "JBoss Maven Integration" facet is not set and can not be selected. What another facet should be set to meet requirements?
> * for prj-ejb: there is no Project Facet checked at all.
> * for prj-ejb: when I check EJB 3.0 and then click Further Configuration, it does not propose sensible defaults (instead they are as always: src for sources, build/classes for compiled)
> * for prj-ejb: If I provided values for src and build folder mistakenly, it does not allow to change them (even uncheck/check again shows only form with all fields greyed)
> * for prj-ejb: after checking Java 6.0 and EJB 3.0, there are still errors in Problems View:
> 	EJB Module 3.0 requires Java 5.0 or newer.	prj-ejb		line 1	Maven Problem --- disappears after Eclipse restart
> 	One or more constraints have not been satisfied.	prj-ejb		line 1	Maven Problem --- disappears after Eclipse restart
> 	Java compiler level does not match the version of the installed Java project facet.	prj-ejb		Unknown	Faceted Project Problem (Java Version Mismatch) --- survives Eclipse restart
> * for prj-ear: Java EE module dependencies are not checked (they may be suggested from the pom.xml) 
> * for prj-ear: Maven plugin maven-ear-plugin has the option to put all referenced libraries into Lib directory:
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-ear-plugin</artifactId>
> 				<version>2.3.2</version>
> 				<configuration>
> 					<includeLibInApplicationXml>true</includeLibInApplicationXml>
> 					...
> 		That builds the EAR which contains lib/ folder inside and all references libs like:
> 	drools-api-5.0.1.jar
> 	drools-core-5.0.1.jar
> 	hsqldb-1.8.0.10.jar
> 	joda-time-1.6.jar
> 	mvel2-2.0.10.jar
> 	prj-jar-1.0-SNAPSHOT.jar
> 	That can be assured by running command:
> 	container>mvn install
> 	Eclipse does not put those libraries into deploy dir while making "Full Publish" which causes server startup errors.
> 	It's reasonable to copy these libraries onto server when using JBoss Server View and debugging server from Eclipse.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list