You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by monkeyden <mo...@monkeyden.com> on 2009/12/01 18:42:42 UTC

maven-war-plugin: including jars

I am trying to include several jars into my war file's WEB-INF/lib directory. 
They are set to the default scope, which I believe is "compile".  The build
runs without errors but only one is included in the resulting war.  Is there
something similar to <webModule> or <ejbModule> I should be using?  My
understanding is that intransitive dependencies would be included when their
scope is "compile", and any transitive dependencies would be subject to the
rules of the table shown here:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

a subset of the dependencies....
<dependencies>
	<!--Axis2 Jars-->  *INCLUDED CORRECTLY
	<dependency>
		<groupId>org.apache.axis2</groupId>
		<artifactId>axis2</artifactId>
		<version>1.3</version>
	</dependency>
	<dependency> *NOT INCLUDED
		<groupId>org.apache.ws.commons.axiom</groupId>
		<artifactId>axiom-api</artifactId>
		<version>1.2.5</version>
	</dependency>
        ....
</dependencies>

and the build....
<build>
	<plugins>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-war-plugin</artifactId>
			<version>2.1-alpha-1</version>
			<configuration>
				<webResources>
					<webResource>
						<directory>${basedir}/src/main/webapp/WEB-INF</directory>
						<includes>
							<include>components.xml</include>
							<include>pages.xml</include>
						</includes>
						<targetPath>WEB-INF</targetPath>
						<filtering>true</filtering>
					</webResource>
				</webResources>
			</configuration>
		</plugin>
	</plugins>
</build>


Thanks
-- 
View this message in context: http://old.nabble.com/maven-war-plugin%3A-including-jars-tp26594796p26594796.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: maven-war-plugin: including jars

Posted by monkeyden <mo...@monkeyden.com>.
Thanks for replying (again) Wayne.  You seem to be here all the time.  :) 
Alas, it was an oversight on my part.  I had another entry with scope
"provided" which was overriding.  Thanks again.


Wayne Fay wrote:
> 
>> They are set to the default scope, which I believe is "compile".  The
>> build
>> runs without errors but only one is included in the resulting war.  Is
>> there
> 
> What does "mvn help:effective-pom" show? There may be a parent pom or
> depMgmt section that is preventing the axiom-api artifact from landing
> in your WAR as you expect.
> 
> You could also just add <scope>compile</scope> to the dependency
> declaration in your WAR project.
> 
> Wayne
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/maven-war-plugin%3A-including-jars-tp26594796p26597320.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: maven-war-plugin: including jars

Posted by Wayne Fay <wa...@gmail.com>.
> They are set to the default scope, which I believe is "compile".  The build
> runs without errors but only one is included in the resulting war.  Is there

What does "mvn help:effective-pom" show? There may be a parent pom or
depMgmt section that is preventing the axiom-api artifact from landing
in your WAR as you expect.

You could also just add <scope>compile</scope> to the dependency
declaration in your WAR project.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org