Hello: Thanks so much for the response. Yes, I agree that it would be ideal if the name of the generated jar/war/ear file is kept same as the project directory name -- I believe that's what finalName does as per the docs (?). However, my teammates responsible for maven builds don't like the idea at all.. tried really hard to convince otherwise even before we ran into this issue. They want the generated file name template to contain project POM version, e.g. given POM project name "myproject" and POM version 1.0, the name of the generated JAR file will be myproject-1.0.jar. Same goes for WAR and EAR modules. And as soon as version'd project names are used, where the physical directory name does not contain POM version numbers obviously, it causes RAD 6/7 loose configuration to fail miserably, in context of WebSphere v6.1 runtime.
Since you brought up maven-eclipse-plugin 2.5, it seems like it's pretty close to being officially realized. Do you have the exact timeframe as to when it will be? Days.. weeks.. months? I will take a look at the maven-eclipse-plugin 2.5 SNAPSHOT code. The alternative is to recompile maven-eclipse-plugin 2.4 with the one-line code change as outlined earlier.. which I plan on doing today. Any thoughts on this approach? Regards Salman Moghal ----- Original Message ---- From: Siarhei Dudzin <[EMAIL PROTECTED]> To: Maven Users List <[email protected]> Sent: Wednesday, February 27, 2008 5:01:44 AM Subject: Re: maven-eclipse-plugin 2.4 & versioned project I've done quite some troubleshooting around RAD6+maven. I would advise to override the finalName for the artifact so it doesn't have version at the end. It's even better if those match the project directory names. maven-eclipse-plugin 2.5-SNAPSHOT has quite a lot of improvements in RAD6/7 support. It is currently only 1 jira issue away from being released. Siarhei On Wed, Feb 27, 2008 at 9:04 AM, Salman Moghal <[EMAIL PROTECTED]> wrote: > 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.EclipseWtpComponentWriterclass > (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.EclipseWtpComponentWriterclass: > > writer.addAttribute( ATTR_DEPLOY_NAME, config.getEclipseProjectName() > ); > > Please advise.. > > -- > Salman Moghal > > ----- Original Message ----- > From: "Salman Moghal" <[EMAIL PROTECTED]> > To: <[email protected]> > 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 > > <addVersionToProjectName>true</addVersionToProjectName> 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 > > <wb-module deploy-name=".....">. 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 <wb-module deploy-name= entry > 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/<EAR > > 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: > > > > <!-- maven-eclipse-plugin config for generating WTP 1.5 resources for > WAR > > and EARs --> > > <plugin> > > <groupId>org.apache.maven.plugins</groupId> > > <artifactId>maven-eclipse-plugin</artifactId> > > > > <configuration> > > <manifest> > > ${basedir}/src/main/resources/META-INF/MANIFEST.MF > > </manifest> > > > > <addVersionToProjectName>true</addVersionToProjectName> > > <useProjectReferences>false</useProjectReferences> > > > > <wtpmanifest>true</wtpmanifest> > > <wtpapplicationxml>true</wtpapplicationxml> > > <wtpversion>1.5</wtpversion> > > > > <additionalBuildcommands> > > > > <buildcommand>com.ibm.etools.common.migration.MigrationBuilder > </buildcommand> > > <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand> > > > > <buildcommand>org.eclipse.wst.common.project.facet.core.builder > </buildcommand> > > > > <buildcommand>org.eclipse.wst.validation.validationbuilder > </buildcommand> > > </additionalBuildcommands> > > <additionalProjectnatures> > > > > <projectnature>org.eclipse.wst.common.project.facet.core.nature > </projectnature> > > <projectnature>org.eclipse.jdt.core.javanature</projectnature> > > > > <projectnature>org.eclipse.wst.common.modulecore.ModuleCoreNature > </projectnature> > > > > <projectnature>org.eclipse.jem.workbench.JavaEMFNature</projectnature> > > </additionalProjectnatures> > > <classpathContainers> > > > > <classpathContainer>org.eclipse.jst.j2ee.internal.module.container > </classpathContainer> > > </classpathContainers> > > </configuration> > > > > </plugin> > > <!-- maven-eclipse-plugin --> > > > > > > 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] > >
