You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Fabien KRUBA <fa...@gmail.com> on 2009/05/15 19:26:26 UTC

system dependencies in a dependant pom

Hi,

just noticed a strange behaviour ( maven 2.1.0)

I wanted to create a pom (joined) project to reference Websphere Application
Server jars as system dependencies as I'm not completly sure that IBM
license authorize jar share on an artifact manager. (if I was sure about
license, I put all the jars on the Artifact Manager and that's all )

I wanted to put a property for defining the "root" of the websphere
installation in my settings file  (activated in a default profile)

<properties>
        <was61home>C:/Program Files/IBM/SDP70/runtimes/base_v61</was61home>
</properties>

and each dependency is referenced like that:

 <dependency>
          <groupId>com.ibm.websphere.appserver</groupId>
          <artifactId>com.ibm.mqjms</artifactId>
          <version>6.1</version>
          <scope>system</scope>

<systemPath>${was61home}/lib/WMQ/java/lib/com.ibm.mqjms.jar</systemPath>
</dependency>

mvn install of the pom worked.

When I want to use the pom as a dependency:
like
        <dependency>
            <groupId>com.ibm.websphere.appserver</groupId>
            <artifactId>runtime</artifactId>
            <version>6.1</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>


It doesn't resolve the ${was61home} placeholder even if the profile
containing the property is activated ( mvn help:activeprofiles is my
witness)

But if I add the -Dwas61home=C:/Program Files/IBM/SDP70/runtimes/base_v61 on
the command line it works....

As adding the -Dxxx parameter on the command line is not quite confortable I
wanted to know if it's an issue or a normal behaviour?

Re: system dependencies in a dependant pom

Posted by Fabien KRUBA <fa...@gmail.com>.
Thanks Wayne,
I was my original idea but i tried to "emulate" the Eclipse/Rad Libraries
concept.. even if it's not the best way


On Fri, May 15, 2009 at 1:44 PM, Wayne Fay <wa...@gmail.com> wrote:

> > I wanted to create a pom (joined) project to reference Websphere
> Application
> > Server jars as system dependencies as I'm not completly sure that IBM
> > license authorize jar share on an artifact manager. (if I was sure about
> > license, I put all the jars on the Artifact Manager and that's all )
>
> Avoid all of this and just install the artifact into your local repo
> cache (under ~/.m2/repository) and tell your coworkers to do the same.
> Or just deploy them to your Corporate Repository.
>
> If you are customers of Websphere, I cannot imagine they would have a
> problem with you sharing Jars around with other developers in your
> company.
>
> The "system" scope you're using should be avoided. Its a bad idea most
> times and gives inconsistent/unexpected results.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: system dependencies in a dependant pom

Posted by Wayne Fay <wa...@gmail.com>.
> I wanted to create a pom (joined) project to reference Websphere Application
> Server jars as system dependencies as I'm not completly sure that IBM
> license authorize jar share on an artifact manager. (if I was sure about
> license, I put all the jars on the Artifact Manager and that's all )

Avoid all of this and just install the artifact into your local repo
cache (under ~/.m2/repository) and tell your coworkers to do the same.
Or just deploy them to your Corporate Repository.

If you are customers of Websphere, I cannot imagine they would have a
problem with you sharing Jars around with other developers in your
company.

The "system" scope you're using should be avoided. Its a bad idea most
times and gives inconsistent/unexpected results.

Wayne

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