Re: maven-eclipse-plugin 2.4 & versioned projects
Salman Moghal wrote: > > > Hello Salman! Finally, I've got it working, almost! So, I want to share it...it's gonna be a bit long, though! I just explain the steps how it's working over here. I've been using Subclipse with the newly released M2 Plugin (Version 0.9.0). Actually, the old M2 version 0.0.12 works too, however, I wanted to stay on the edge. I also use the M2-Subclipse integration, that generates the basic Eclipse files (.classpath, .project with the maven builders, dependencies and staff) on checking out the sources. So, I checkout the parent project in a first step and then checkout the it's submodules in another step. Therefore, eclipse will see a flat project layout, actually, I've been using 2 hierarchies (Parent-Modules), since I want to use the release-plugin on the multiproject. To make the maven multiprojects working properly in eclipse, I add "../" to the module path in the parent pom. So the M2 Plugin sees the submodule checkout in the workspace. All right! I've got a working workspace with m2 and multiprojects. Next, I apply eclipse:eclipse on the multiproject and generate the WTP descriptors. My own compiled snapshot version of maven-eclipse-plugin 2.5 works much better, than the old stable release. Though, this version as a sort of linking issue and doesn't work with the new M2 eclipse plugin. So, I fire this goal in the command prompt. With eclipse:m2eclipse I didn't success, by the way, since it doesn't generate the "depended-module"s as required. There is still one little problem with the generated application.xml, though! There is something wrong with the xml namespace definition: http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://java.sun.com/xml/ns/j2ee"; version="1.4"> Websphere rejects to deploy this descriptor. While following definition generated with the ear-plugin is working perfectly: http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"; version="1.4"> I'll create a bug report afterwards. That's it, everything is working ;-} And you gave me the right hint. Thank you very much. By the way, I also tried versioned projects - it's working too. But I think I don't need. Thanks again. Kuno Here are my poms: [Parent POM] 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";> 4.0.0 sample-ear mca-sample pom 0.0.1-SNAPSHOT mca-sample mca-sample-ear mca-sample-web mca-sample-compo1 junit junit 3.8.1 test maven-compiler-plugin 1.5 1.5 org.apache.maven.plugins maven-release-plugin clean install maven-source-plugin attach-sources verify jar [/Parent POM] [EAR POM] 4.0.0 sample-ear mca-sample 0.0.1-SNAPSHOT sample-ear mca-sample-ear ear 0.0.1-SNAPSHOT mca-sample-ear sample-ear mca-sample-web 0.0.1-SNAPSHOT war log4j log4j 1.2.7 sample-ear mca-sample-compo1 0.0.1-SNAPSHOT org.apache.maven.plugins
Re: maven-eclipse-plugin 2.4 & versioned projects
Hello there: I've been using maven-eclipse-plugin v2.4 (a customized version that I compiled for version'ed project support). It's been working well. Can you share your EAR's and WAR/JAR pom.xml? I'm not sure why you are having this issue. One thing to be careful, for RAD/Eclipse and WTP 1.5, is to use "eclipse:rad" mojo of maven-eclipse-plugin. When you generate your WTP resources, issue "mvn eclipse:rad" command. I've noticed that using the default "eclipse:eclipse" or "eclipse:m2eclipse" mojo won't do a good job of generating WTP resources that are RAD/Eclipse friendly. Later on, through RAD/Eclipse, using M2Eclipse plugin, I then enable the "Dependancy Management" for all the projects, which gives me the Maven Library container. You have to ensure to perform "Update Source" path through M2Eclipse plugin after you enable "Dependancy Management" for a project. I must admit that I have to tweak the component files for some JAR projects but that's because developers aren't coding the pom.xml properly. Other than that it seems to work well. I'm attaching maven-eclipse-plugin for my project. Hope it helps.. The root pom.xml contains the following maven-eclipse-plugin config: org.apache.maven.plugins maven-eclipse-plugin ${basedir}/src/main/resources/META-INF/MANIFEST.MF true false true true 1.5 com.ibm.etools.common.migration.MigrationBuilder org.eclipse.jdt.core.javabuilder org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jem.workbench.JavaEMFNature My EAR pom.xml is as follows org.apache.maven.plugins maven-ear-plugin false org.apache.maven.plugins maven-eclipse-plugin org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.common.modulecore.ModuleCoreNature WAR pom.xml: org.apache.maven.plugins maven-eclipse-plugin org.eclipse.jst.j2ee.internal.module.container org.eclipse.jst.j2ee.internal.web.container Regards -- Salman Moghal ----- Original Message ----- From: "qnob" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 12, 2008 12:43 PM Subject: Re: maven-eclipse-plugin 2.4 & versioned projects Hi again, here my plugin configuration. Actually, it's the example given by the post of Salman. I've added new version of the eclipse plugin and uncommented a part I didn't understand if need it. Though, I tried versioned projects too. : org.apache.maven.plugins maven-eclipse-plugin 2.5-SNAPSHOT true true 1.5 org.eclipse.jdt.core.javabuilder org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.launching.JRE_CONTAINER org.eclipse.jst.j2ee.internal.module.container org.apache.maven.plugins maven-ear-plugin ${project.name}-${project.version} ${project.description} 1.4 sample-ear mca-sample-web mca-sample-web -- View this message in context: http://www.nabble.com/maven-eclipse-plugin-2.4---versioned-projects-tp15699476s177p16007425.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-eclipse-plugin 2.4 & versioned projects
Hi again, here my plugin configuration. Actually, it's the example given by the post of Salman. I've added new version of the eclipse plugin and uncommented a part I didn't understand if need it. Though, I tried versioned projects too. : org.apache.maven.plugins maven-eclipse-plugin 2.5-SNAPSHOT true true 1.5 org.eclipse.jdt.core.javabuilder org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.wst.common.project.facet.core.nature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.launching.JRE_CONTAINER org.eclipse.jst.j2ee.internal.module.container org.apache.maven.plugins maven-ear-plugin ${project.name}-${project.version} ${project.description} 1.4 sample-ear mca-sample-web mca-sample-web -- View this message in context: http://www.nabble.com/maven-eclipse-plugin-2.4---versioned-projects-tp15699476s177p16007425.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-eclipse-plugin 2.4 & versioned projects
Hello! I've got RAD7, maven-eclipse-plugin 2.5-Snapshot and m2eclipse 0.0.12. I've been trying for 2 frustrating days to integrate those tools together without success. Did any body of you guys succeed this task? I reckon that your are on the same task as I am. More precisely, there the generation of the wb-module parts are missing in the .settings/org.eclipse.wtp.common.component. In the WAR and EAR project. Here is my project layout: --mca-sample ¦ ¦- mca-sample-ear ¦- mca-sample-web In my web pom I've got defined a dependency to log4j. However, there is no entry in the component file. Also, in the ear project, I'd expect something like: [CODE] WebModule_1204874797874 uses [CODE] but I get: [CODE] [CODE] The dependency to the web module is completely missing. I can add manually as J2EE Component, however, then I get error related to an missing or malformed application.xml file. Thanks in advance. Kuno -- View this message in context: http://www.nabble.com/maven-eclipse-plugin-2.4---versioned-projects-tp15699476s177p16005544.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-eclipse-plugin 2.4 & versioned projects
I've been pouring through maven-eclipse-plugin 2.4 code and realized that there is potentially a problem with org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriter class (line 125), IMHO: writer.addAttribute( ATTR_DEPLOY_NAME, config.getProject().getArtifactId() ); It seems like the code above assumes deploy-name cannot contain version numbers, project name templates etc. It would be great if the code could follow similar structured approach for setting/getting the project name as in org.apache.maven.plugin.eclipse.writers.EclipseProjectWriter (line 169), which generates .project file: writer.writeText( config.getEclipseProjectName() ); Here the project name is set during configuration/dependancy resolution phase by org.apache.maven.plugin.eclipse.EclipsePlugin and later used by the EclipseProjectWriter class. So I'm curious if this issue could be resolved by simply using getEclipseProjectName() method in org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpComponentWriter class: writer.addAttribute( ATTR_DEPLOY_NAME, config.getEclipseProjectName() ); Please advise.. -- Salman Moghal - Original Message - From: "Salman Moghal" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 26, 2008 3:38 PM Subject: maven-eclipse-plugin 2.4 & versioned projects Hello: I'm using maven-eclipse-plugin v2.4 to generate WTP 1.5 resource for Eclipse 3.2.x / RAD v6.x environment. The goal of this exercise is to take advantage of Eclipse 3.2 / RAD v6.x integrated development, debugging, and hot code deployment features. The runtime environment is WebSphere Application Server v6.1. Eclipse / RAD also have M2Eclipse plugin installed for dependency management, etc. There is one slight issue that has me scratching my head for a few days. It has to do with generated WTP v1.5 files. Essentially, maven eclipse plugin goal "eclipse:m2eclipse" generates all WTP 1.5 files correctly. However, once true is added to plugin config, .settings/org.eclipse.wst.common.component contains an incorrect entry. The goal generates the .project WTP file properly with a project name containing the POM version number, but the corresponding .settings/org.eclipse.wst.common.component contains an incorrect value for . The value of deploy-name= does not contain a POM version number along with the project name. The reason why having a version number in important is because if the EAR / WAR module is deployed to WebSphere runtime in "loose configuration" mode, the runtime complains about not being able to locate corresponding modules. Loose configuration allows the class files to reside in Eclipse / RAD workspace and speeds up the EAR deployment process many folds since no real EAR is generated and installed into WebSphere. Eclipse / RAD loose config file is located under WORKSPACE/.metadata/.plugins/com.ibm.etools.wrd.websphere/looseconfigurations/NAME>/looseconfig.xmi. Note that if I manually make the change to the generated .settings/org.eclipse.wst.common.component file by adding version number along with the project name, the runtime doesn't complain and everything works well in loose configuration mode. May be I'm missing something in maven-eclipse-plugin configuration. Here's what I have: org.apache.maven.plugins maven-eclipse-plugin ${basedir}/src/main/resources/META-INF/MANIFEST.MF true false true true 1.5 com.ibm.etools.common.migration.MigrationBuilder org.eclipse.jdt.core.javabuilder org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jem.workbench.JavaEMFNature org.eclipse.jst.j2ee.internal.module.container Is there any way to manipulate or affect entries in .settings/org.eclipse.wst.common.component via maven-eclipse-plugin configuration? to If you guys have any clues / pointers / recommendations, please do share. Regards Salman Moghal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-eclipse-plugin 2.4 & versioned projects
Yes, RAD 6 is based on Eclipse 3.2.1-xx and it honors WTP 1.5 resources. RAD 7 provide backward compatability for RAD 6 projects, so by that definition RAD 7 can also work with WTP 1.5 resources. If memory serves me, WTP 1.0 resources are for the older Eclipse v2.x (?) versions. Now I'm not sure what wtpversion=R7 is for.. Regards Salman Moghal - Original Message - From: "Olivier Dehon" <[EMAIL PROTECTED]> To: "Maven Users List" Sent: Tuesday, February 26, 2008 9:55 PM Subject: Re: maven-eclipse-plugin 2.4 & versioned projects Sorry to reply to your question with another question, but does RAD6 really supports WTP 1.5 ? I was under the impression that RAD7 only supported that version. -Olivier On Tue, 2008-02-26 at 12:38 -0800, Salman Moghal wrote: Hello: I'm using maven-eclipse-plugin v2.4 to generate WTP 1.5 resource for Eclipse 3.2.x / RAD v6.x environment. The goal of this exercise is to take advantage of Eclipse 3.2 / RAD v6.x integrated development, debugging, and hot code deployment features. The runtime environment is WebSphere Application Server v6.1. Eclipse / RAD also have M2Eclipse plugin installed for dependency management, etc. There is one slight issue that has me scratching my head for a few days. It has to do with generated WTP v1.5 files. Essentially, maven eclipse plugin goal "eclipse:m2eclipse" generates all WTP 1.5 files correctly. However, once true is added to plugin config, .settings/org.eclipse.wst.common.component contains an incorrect entry. The goal generates the .project WTP file properly with a project name containing the POM version number, but the corresponding .settings/org.eclipse.wst.common.component contains an incorrect value for . The value of deploy-name= does not contain a POM version number along with the project name. The reason why having a version number in is important is because if the EAR / WAR module is deployed to WebSphere runtime in "loose configuration" mode, the runtime complains about not being able to locate corresponding modules. Loose configuration allows the class files to reside in Eclipse / RAD workspace and speeds up the EAR deployment process many folds since no real EAR is generated and installed into WebSphere. Eclipse / RAD loose config file is located under WORKSPACE/.metadata/.plugins/com.ibm.etools.wrd.websphere/looseconfigurations/NAME>/looseconfig.xmi. Note that if I manually make the change to the generated .settings/org.eclipse.wst.common.component file by adding version number along with the project name, the runtime doesn't complain and everything works well in loose configuration mode. May be I'm missing something in maven-eclipse-plugin configuration. Here's what I have: org.apache.maven.plugins maven-eclipse-plugin ${basedir}/src/main/resources/META-INF/MANIFEST.MF true false true true 1.5 com.ibm.etools.common.migration.MigrationBuilder org.eclipse.jdt.core.javabuilder org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jem.workbench.JavaEMFNature org.eclipse.jst.j2ee.internal.module.container Is there any way to manipulate or affect entries in .settings/org.eclipse.wst.common.component via maven-eclipse-plugin configuration? to If you guys have any clues / pointers / recommendations, please do share. Regards Salman Moghal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven-eclipse-plugin 2.4 & versioned projects
Sorry to reply to your question with another question, but does RAD6 really supports WTP 1.5 ? I was under the impression that RAD7 only supported that version. -Olivier On Tue, 2008-02-26 at 12:38 -0800, Salman Moghal wrote: > Hello: > > I'm using maven-eclipse-plugin v2.4 to generate WTP 1.5 resource for Eclipse > 3.2.x / RAD v6.x environment. The goal of this exercise is to take advantage > of Eclipse 3.2 / RAD v6.x > integrated development, debugging, and hot code deployment features. The > runtime environment is WebSphere Application Server v6.1. Eclipse / RAD also > have M2Eclipse plugin installed for dependency management, etc. There is one > slight issue that has me scratching my head for a few days. It has to do > with generated WTP v1.5 files. > > Essentially, maven eclipse plugin goal "eclipse:m2eclipse" generates all WTP > 1.5 files correctly. However, once > true is added to plugin > config, .settings/org.eclipse.wst.common.component contains an incorrect > entry. The goal generates the .project WTP file properly with a project name > containing the POM version number, but the corresponding > .settings/org.eclipse.wst.common.component contains an incorrect value for > . The value of deploy-name= does not contain > a POM version number along with the project name. > > The reason why having a version number in important is because if the EAR / WAR module is deployed to WebSphere runtime > in "loose configuration" mode, the runtime complains about not being able to > locate corresponding modules. Loose configuration allows the class files to > reside in Eclipse / RAD workspace and speeds up the EAR deployment process > many folds since no real EAR is generated and installed into WebSphere. > Eclipse / RAD loose config file is located under > WORKSPACE/.metadata/.plugins/com.ibm.etools.wrd.websphere/looseconfigurations/ NAME>/looseconfig.xmi. > > Note that if I manually make the change to the generated > .settings/org.eclipse.wst.common.component file by adding version number > along with the project name, the runtime doesn't complain and everything > works well in loose configuration mode. > > May be I'm missing something in maven-eclipse-plugin configuration. Here's > what I have: > > > >org.apache.maven.plugins >maven-eclipse-plugin > > > >${basedir}/src/main/resources/META-INF/MANIFEST.MF > > > true > false > > true > true > 1.5 > > > > com.ibm.etools.common.migration.MigrationBuilder > org.eclipse.jdt.core.javabuilder > > org.eclipse.wst.common.project.facet.core.builder > > org.eclipse.wst.validation.validationbuilder > > > > org.eclipse.wst.common.project.facet.core.nature > org.eclipse.jdt.core.javanature > > org.eclipse.wst.common.modulecore.ModuleCoreNature > > org.eclipse.jem.workbench.JavaEMFNature > > > > org.eclipse.jst.j2ee.internal.module.container > > > > > > > > Is there any way to manipulate or affect entries in > .settings/org.eclipse.wst.common.component via maven-eclipse-plugin > configuration? to If you guys have any clues / pointers / recommendations, > please do share. > > Regards > Salman Moghal > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]