Rafael, 1st issue is both a bug in m2e-wtp and in WTP : m2e-wtp doesn't set the project's deploy-name according to finalName, but even if it did, then WTP would ignore it anyway : https://bugs.eclipse.org/bugs/show_bug.cgi?id=340918 There *might* be some workaround depending on the reasons why you need a specific ear name deployed on the server, so it would help if you could describe your use case.
2nd issue is not implemented. Please open a JIRA issue at https://issues.sonatype.org/browse/MECLIPSEWTP and attach your sample projects there. It should be pretty straightforward to implement, now that resource filtering is done for web projects. Regards, Fred Bricon 2011/5/12 Rafael Vanderlei <[email protected]> > Hi everyone. > > I found what it seems to be a bug in M2Eclipse (actually perhaps there are > two bugs) and I created a project (attached on the mail) to help you > reproduce the error in order to fix it. > > In summary, the "bugs" are: > > 1. M2Eclipse seems to ignore ${project.build.finalName} to name the EAR > published in the server. > 2. M2Eclipse seems to ignore <filtering>true</filtering> configured in the > maven-ear-plugin > > PS.: I´m using Eclipse Helios, m2e-core 0.12.1.20110112-1712 and m2e-wtp > 0.11.1.201011.08-1810 (I know it is not the latest m2e-wtp release, but I > looked at release notes of the latest version and I could not find any fixes > related to these problems) > > The project structure is as follows: > > - m2ewtp-ear-source-filtering-bug/ > --- pom.xml > --- blank-ejb-module/ > ------ pom.xml > ------ src/main/resources/META-INF/ > --------- MANIFEST.MF > --------- ejb-jar.xml > --- ear-module/ > ------ pom.xml > ------ src/main/application/META-INF/ > --------- application.xml > --------- jboss-service.xml > > I created blank-ejb-module just to insert it into > ear-module/src/main/application/META-INF/application.xml (just because its > DTD requires a module element) > > In ear-module 's pom.xml I have this: > > <project> > ... > > <properties> > <my.custom.mbean.attribute.value>MBean Attribute > Value</my.custom.mbean.attribute.value> > </properties> > > <build> > > <finalName>EarName</finalName> > > <plugins> > <plugin> > <artifactId>maven-ear-plugin</artifactId> > <version>2.5</version> > <configuration> > <filtering>true</filtering> > <modules> > <ejbModule> > <groupId>${project.groupId}</groupId> > <artifactId>blank-ejb-module</artifactId> > </ejbModule> > </modules> > </configuration> > </plugin> > </plugins> > </build> > > ... > </project> > > While in src/main/application/META-INF/jboss-service.xml I have this: > > <?xml version="1.0" encoding="UTF-8"?> > <server> > <mbean name="mbeanName" code="fully.qualified.name"> > <attribute > name="CustomAttribute">${my.custom.mbean.attribute.value}</attribute> > </mbean> > </server> > > When I run ' mvn package ' from CLI I have the expected behavior (Maven > generates a EAR file named "EarName.ear" and changes the property > ${my.custom.mbean.attribute.value} to "MBean Attribute Value". > > But when I use m2e and publish to the server (JBoss in my case), Maven > generates a EAR file named "ear-module.ear" and it does not change the value > of ${my.custom.mbean.attribute.value}. > > > Below there are a few descriptions of the files I am attaching to help you > understand them: > > 1. On the file m2ewtp-ear-source-filtering-bug.rar there is the clean Maven > project (without Eclipse files, just source and pom files) > > 2. On the file EAR generated by Maven CLI.rar there is the result of a > simple ' mvn package ' that I ran from CLI (and which is the result I would > expect from m2e, but it´s failing) > > 3. On the file EAR generated by M2Eclipse.rar there is the failed result of > a simple ' Project > Clean ' followed by ' Server > Publish ' that I ran > from Eclipse (and which is the result I was not expecting, as I expected the > result in file 2 described above) > > So, do you guys have any idea of when this would be fixed and, in the > meanwhile, do you have any workaround to this problem? > > Thanks and regards, > > Rafael Vanderlei. > > _______________________________________________ > m2e-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/m2e-users > > -- "Have you tried turning it off and on again" - The IT Crowd
_______________________________________________ m2e-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/m2e-users
