You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by aidanb5 <ai...@gmail.com> on 2008/05/19 12:20:30 UTC

duplicate war directory inside WEB-INF/classes

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">

	<modelVersion>4.0.0</modelVersion>
	<parent>
		<artifactId>base-project</artifactId>
		<groupId>com.sms</groupId>
		<version>1.0</version>
	</parent>
	<groupId>com.sms.iforms2.forms</groupId>
	<artifactId>sjawar</artifactId>
	<packaging>war</packaging>
	<name>SJA war</name>

	<dependencies>
	</dependencies>
	<version>1.0</version>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: duplicate war directory inside WEB-INF/classes

Posted by Tim Kettler <ti...@udo.edu>.
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">
> 
> 	<modelVersion>4.0.0</modelVersion>
> 	<parent>
> 		<artifactId>base-project</artifactId>
> 		<groupId>com.sms</groupId>
> 		<version>1.0</version>
> 	</parent>
> 	<groupId>com.sms.iforms2.forms</groupId>
> 	<artifactId>sjawar</artifactId>
> 	<packaging>war</packaging>
> 	<name>SJA war</name>
> 
> 	<dependencies>
> 	</dependencies>
> 	<version>1.0</version>
> 
> 	<build>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org