If you want the dependency to be included in your WAR, you should use
"compile" scope.

The other scopes you mentioned -- "provided" and "system" -- basically
mean "do not include in WAR package". So you're telling Maven to do
the opposite of what you want, and then you're unhappy with the
results.

You really need to review some basic Maven documentation, might I suggest:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
 (especially the Dependency Scope section)

Wayne

On 3/20/08, neo anderson <[EMAIL PROTECTED]> wrote:
>
> How to include library into war file?
>
> First I create web project skeleton by
>
> mvn archetype:create -DgroupId=net.sf.sample -DartifactId=wicket-hello
> -Dversion=1.0 -DarchetypeArtifactId=maven-archetype-webapps
>
>
> Then I modify pom.xml to include the dependency.
>
> <dependency>
> <groupId>org.apache.wicket</groupId>
> <artifactId>wicket</artifactId>
> <version>1.3.2</version>
> <scope>provided</scope>
> <!--scope>system</scope>
> <systemPath>${basedir}/lib/wicket-1.3.2.jar</systemPath-->
> </dependency>
>
> However, I set scope to either provided or system. None of them will make
> the library (i.e., wicket-1.3.2.jar) included into the war.
>
> What should I do in order to include jar file included in the WEB-INF/lib
> directory?
>
> Thanks in advice,
>
> --
> View this message in context:
> http://www.nabble.com/provided-dependency-packaged-into-war-tp8713555s177p16192173.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]
>
>

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

Reply via email to