You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Donald Smith <do...@gmail.com> on 2012/05/18 20:44:18 UTC

Deploying war to archiva without dependencies

I have a project that is a basic web app archetype. It only contains
JavaScript files. Lets call it MyJSLib web project. In the pom I have a
dependency to another third party JavaScript library that is located on an
internal archiva repository. I am trying to achieve the following:


   - Deploy MyJSLib web project to archiva without including the third
   party JavaScript library since it already is deployed to the same archiva
   repository.
   - Create a new web project that includes MyJSLib as dependency overlay.
   - The dependencies for both the third party JavaScript library and
   MyJSLib are resolved in the new web project.

Also, I want to be able to test MyJSLib locally which requires that the
third party lib gets overlayed.

I have tried using <scope>runtime</scope> as well as provided, but both
have downsides.

Using Provided:

If I use provided the war file will not contain the third party library and
can be uploaded to archiva, but the third party library is not resolved
when MyJSLib is added as a dependency to a new web project.

Using Runtime:

The third party library is included and therefore is uploaded twice to
archiva. The original artifact is on archiva already and now inside
MyJSLib, but I am able to test MyJSLib locally.

I know that other projects deal with these transitive dependencies because
when I include them I see maven resolving all of dependencies for the
artifact.

I currently cannot locate any information on how to do this, any help is
greatly appreciated. I