Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-wtp-dev] Fw: application.xml overwritten?

Bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=392455  created

Thanks

Roberto Sanchez Herrera

From:        Fred Bricon <fbricon@xxxxxxxxx>
To:        M2E-WTP Developers mailing list <m2e-wtp-dev@xxxxxxxxxxx>
Date:        10/15/2012 04:50 AM
Subject:        Re: [m2e-wtp-dev] application.xml overwritten
Sent by:m2e-wtp-dev-bounces@xxxxxxxxxxx        ?



This is kinda expected indeed. Unchecking the "Generate" checkbox makes m2e-wtp generate the files in the source directory, overwriting any existing files.

I think there are 2 non-exclusive approaches to the problem :
- either add some preferences to keep the original application.xml during conversion (meaning adding <generateApplicationXml>false<generateApplicationXml> to the pom.xml)
- the ear conversion participant should at least extract the security roles from the original application.xml and convert them as maven-ear-plugin configuration. However, the modules would still be removed, since the conversion mechanism doesn't currently support dependency conversion.

could you please open a feature request in BZ?

Fred

PS : thanks for using the right ML :-)

On Fri, Oct 12, 2012 at 7:21 PM, Roberto Sanchez Herrera/Mexico/IBM <rsanchez@xxxxxxxxxxx> wrote:
Hi,
Correct, I had both  Preferences > Maven  > Java EE Integration > "Generate application.xml under the build directory" and  Preferences > Maven  > Java EE Integration > "Maven Archiver generates files under  the build directory" unchecked.


I attach a sample workspace consisting on a EAR with a web project. Both have deployment descriptor: the EAR's deployment descriptor has the web module and a security role, and the Web project's deployment descriptor has a context parameter and a list of welcome pages.


To recreate, I did this:

1. Uncheck both options under Preferences > Maven  > Java EE Integration

2. Import the projects in the attached file

3. Convert the Web project to maven (Configure > Convert to Maven project). Use war for packaging. The deployment descriptor is left untouched (which is fine)

4. Convert the EAR project to maven, using ear for packaging. The original deployment descriptor is replaced by a new one, which has only the display name.  So the security roles and the modules are lost.


Is the result in point 4 the expected behavior?
  I'm using m2e 1.2,0, m2e-wtp 0.16.0 and Java EE package for Juno SR1.





Note: the original main was sent to m2e-dev mail list, but I believe this is more related to m2e-wtp, therefore I'm sending this to m2e-wtp-dev mail list.


Regards


Roberto Sanchez Herrera



From: Fred Bricon <fbricon@xxxxxxxxx>
To: Roberto Sanchez Herrera/Mexico/IBM@IBMMX, Maven Integration for Eclipse developers mailing list <m2e-dev@xxxxxxxxxxx>
Date: 12-10-12 04:19
Subject: application.xml overwritten?






Hi,

I just saw a question Roberto's asked on IRC yesterday (sorry I missed it) : "Have you seen in the past, or recently, problems when converting an EAR project to Maven? Specifically, if the EAR has deploymentt descriptor with contents, it gets overwritten by a new deployment descriptor with no content"

Only thing I can think of is if you unchecked Preferences > Maven  > Java EE Integration > "Generate application.xml under the build directory". But even then, the application.xml should have some content (at least the <application> root).

Roberto, can you try reproducing the error with a sample project?

Fred

--
"Have you tried turning it off and on again" - The IT Crowd



_______________________________________________
m2e-wtp-dev mailing list

m2e-wtp-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/m2e-wtp-dev




--
"Have you tried turning it off and on again" - The IT Crowd
_______________________________________________
m2e-wtp-dev mailing list
m2e-wtp-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/m2e-wtp-dev



Back to the top