I managed to exclude direct dependencies and add them to the manifest
classpath as per
http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

--but it still puts all transitive dependencies in WEB-INF/lib.

For example. Project A is <packaging>jar</packaging>

Project A artifact is jar, and it has a bunch of dependencies.

Project B is <packaging>war</packaging> and depends on project A like this:

<dependency>
   <groupId>blah</groupId>
   <artifactId>A</artifactId>
   <version>blah</version>
   <optional>true</optional>
</dependency>

Then I configure maven war plugin like this:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
                <version>2.0</version>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

What I want is that project A and all its transitive dependencies end
up in the Manifest classpath, but are not included in WEB-INF/lib.
What ends up happening with this configuration is that project-A.jar
is excluded from WEB-INF/lib, but it is in the Manifest classpath.
However, all project A's transitive dependencies are included in
WEB-INF/lib and they are in the Manifest classpath.  I want the latter
but not the former.  What am I missing?

Thanks in advance,
Davis

On Thu, Mar 5, 2009 at 7:27 PM, Davis Ford <[email protected]> wrote:
> Hi, so I have a <packaging>war</packaging> project, with some
> dependencies, and I made all the deps be <scope>provided</scope>, but
> when I run:
>
> $ mvn package
>
> It still creates a war file with all the deps and transitive deps
> under WEB-INF/lib/ - what am I doing wrong?  Do I need to use the
> maven war plugin?
>
> Thanks in advance,
> Davis
>
> --
> Zeno Consulting, Inc.
> home: http://www.zenoconsulting.biz
> blog: http://zenoconsulting.wikidot.com
> p: 248.894.4922
> f: 313.884.2977
>



-- 
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to