duplicate war directory inside WEB-INF/classes

2008-05-19 Thread aidanb5

Hi, I'm trying to build a simple war using maven 2 the structure follows the
standard directory layout:

sja/src/main/resources contains a property file
sja/src/main/webapp contains the webapp and has the following subdirs

./css
./WEB-INF/defs
./WEB-INF/beans
./WEB-INF/flows
./WEB-INF/jsps

my pom is as follows:

project xmlns=http://maven.apache.org/POM/4.0.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/xsd/maven-4.0.0.xsd;

modelVersion4.0.0/modelVersion
parent
artifactIdbase-project/artifactId
groupIdcom.sms/groupId
version1.0/version
/parent
groupIdcom.sms.iforms2.forms/groupId
artifactIdsjawar/artifactId
packagingwar/packaging
nameSJA war/name

dependencies
/dependencies
version1.0/version

build
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration

/configuration
/plugin
/plugins
/build
/project

base project just contains the pointer to a maven proxy repository - no
actual application configuration.


when i run the build (mvn clean package) I get a war file but within the
WEB-INF/classes directory is another nested copy of the entire war so in
effect i end with with:

sjawar-1.0.war/web-inf/classes/sjawar-1.0/web-inf   etc

Could someone please help me with this as I'm totally stuck.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/duplicate-war-directory-inside-WEB-INF-classes-tp17315650p17315650.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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



Re: duplicate war directory inside WEB-INF/classes

2008-05-19 Thread Tim Kettler

Hi,

I just tried with your POM (obviously without parent) and a simple test 
project:


  .
  |-- pom.xml
  `-- src
  `-- main
  |-- resources
  |   `-- test.properties
  `-- webapp
  |-- WEB-INF
  |   |-- beans
  |   |-- defs
  |   |-- flows
  |   |-- jsps
  |   `-- web.xml
  |-- css
  `-- index.jsp

and the war created by 'mvn package' (maven 2.0.9, war-plugin 
2.1-alpha-1) looks just as it should, no duplicate entries:


  .
  |-- META-INF
  |-- WEB-INF
  |   |-- beans
  |   |-- classes
  |   |   `-- test.properties
  |   |-- defs
  |   |-- flows
  |   |-- jsps
  |   `-- web.xml
  |-- css
  `-- index.jsp

It seems, there is something wrong on your side, not mavens. I would 
suggest that you just copy the project structure to a new directory 
iteratively, checking when the error starts happening.


By the way, the war plugin definition with the empty configuration in 
your pom.xml is redundant, the war plugin is executed by default if you 
specify packaging 'war'.


-Tim

aidanb5 schrieb:

Hi, I'm trying to build a simple war using maven 2 the structure follows the
standard directory layout:

sja/src/main/resources contains a property file
sja/src/main/webapp contains the webapp and has the following subdirs

./css
./WEB-INF/defs
./WEB-INF/beans
./WEB-INF/flows
./WEB-INF/jsps

my pom is as follows:

project xmlns=http://maven.apache.org/POM/4.0.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/xsd/maven-4.0.0.xsd;

modelVersion4.0.0/modelVersion
parent
artifactIdbase-project/artifactId
groupIdcom.sms/groupId
version1.0/version
/parent
groupIdcom.sms.iforms2.forms/groupId
artifactIdsjawar/artifactId
packagingwar/packaging
nameSJA war/name

dependencies
/dependencies
version1.0/version

build
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration

/configuration
/plugin
/plugins
/build
/project

base project just contains the pointer to a maven proxy repository - no
actual application configuration.


when i run the build (mvn clean package) I get a war file but within the
WEB-INF/classes directory is another nested copy of the entire war so in
effect i end with with:

sjawar-1.0.war/web-inf/classes/sjawar-1.0/web-inf   etc

Could someone please help me with this as I'm totally stuck.

Thanks!



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