The moose likes Ant, Maven and Other Build Tools and the fly likes Maven building ear file from war Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven building ear file from war" Watch "Maven building ear file from war" New topic

Maven building ear file from war

Cemil Ozdemir

Joined: Nov 23, 2006
Posts: 11
Hi all,

Can someone help me building an ear file. I am using Maven 2.x

Untill now i have been building a war file using the maven command:
maven compile war:war

I want to auto generate a application.xml file. So i add the ear plugin
to the pom.xml file.

Here is what i added to my pom.xml file:

When i run this command:
mvn ear:generate-application-xml

It complaints with this error:
[INFO] ------------------------------------------------------------------------
[INFO] Artifact[Conversion-1.0-SNAPSHOT.war:generate-application-xml:war] is not a dependency of the project.

Anyone knows what the problem migth be ?

Or has a suggestion...

I think the problem is the groupId and artifactId of the webModule.

But i am not sure what the groupId and artifactId should contain for my webapplication.

Best Regards
[ December 07, 2006: Message edited by: Cemil OZdemir ]
Cemil Ozdemir

Joined: Nov 23, 2006
Posts: 11
Hi all,

I solved this problem by creating an additional pom file that depends on the other project i have.

If anyone is interested i can attach the files i have.

If anyone has a better solution please let me know.

Best Regards
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950


Welcome to the JavaRanch. We especially appreciate people who know Maven. Not many of us are very good at Maven.

But would you please change your display name? We try to maintain a professional environment here, so we ask that people display a "real" name, with first and last names, not something obviously fictitious. For more info, check here: http://www.javaranch.com/name.jsp


Customer surveys are for companies who didn't pay proper attention to begin with.
Cemil Ozdemir

Joined: Nov 23, 2006
Posts: 11
Hi Tim,

Thanks for the reminder.

I changed it as you said.

Best Regards
Arvind K Singal

Joined: Jul 09, 2009
Posts: 1

I have the same requirement. Can you please attach your pom files and your directory structure.

Thanks in advance
I agree. Here's the link: http://aspose.com/file-tools
subject: Maven building ear file from war
Similar Threads
maven ear plugin question
maven2 expert : explode war which is in a ear and then bundle war then bundle ear
Continuous integration - Bamboo, Maven
Ear Building in Maven
Maven Resources Files Not Correct In EAR