Hi, can you confirm that this is working for you:

1. create a new simple war project:

mvn archetype:create \
    -DarchetypeGroupId=org.apache.maven.archetypes \
    -DarchetypeArtifactId=maven-archetype-webapp \
    -DgroupId=com.mycompany.app \
    -DartifactId=my-webapp

This creates a simple starting point for a war project in the directory my-webapp.

2. Change to that directoty and create the file src/main/resources/test.txt

3. Execute 'mvn package'

Now you should have a file 'my-webapp.jar' in your target directory. It should contain a file 'index.jsp' in the root (originating from src/main/webapp) and the created 'test.text' in 'WEB-INF/classes'.

If this is working for you, start recreating your pom from there stp-by-step and see where it starts failing.

-Tim

Marc A. Donis schrieb:
Thanks, Wendy.

Here is my pom.xml file. I've tried "mvn war:war", "mvn install", "mvn war:war-resources" and probably a few other things over the past couple days. Always the same result: no resources included.

This pom file is just my latest attempt. I'm sure it's overly complicated to do what I need. I agree, this seems like a really simple thing.

Thanks for your help!

Marc

----- Original Message ----- From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "Maven Users List" <[email protected]>
Sent: Sunday, June 24, 2007 23:37
Subject: Re: newbie: trouble packaging resources with war


On 6/24/07, mad7777 <[EMAIL PROTECTED]> wrote:

I am new to Maven, and I'm having a bit of trouble getting my resources
directory to appear in my war file.
...
It seems that no matter what I do, I can't convince maven to include the
contents of ProjectRoot/src/main/resources in my war.

What did you try?  It should just work with no configuration-- look in
WEB-INF/classes for your resources.

On the off chance you're trying to get something into the root of your
webapp (rather than into WEB-INF/classes) then look at webResources
configuration in the plugin docs:
http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to