This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
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 Elasticsearch in Action this week in the Big Data 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: 16471


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:


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
Don't get me started about those stupid light bulbs.
subject: Maven building ear file from war