You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Hauschild, Klaus (EXT)" <kl...@siemens.com> on 2011/02/01 14:03:09 UTC

Attach sources/javadoc to system-scoped dependency

Hi,

we're using a system scoped dependency to jMonkeyEngine3 like this:
    <dependency>
      <groupId>com.jme3</groupId>
      <artifactId>jMonkeyEngine3</artifactId>
      <version>3</version>
      <scope>system</scope>
      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
    </dependency>
The integration by m2e into Eclipse and building packages with Maven are very fine. But in Eclipse there are no sources nor javadoc available without  manipulations by hand. I'm looking for an automatic solution.

Is there a way?

Thanks, Klaus


AW: Attach sources/javadoc to system-scoped dependency

Posted by "Hauschild, Klaus (EXT)" <kl...@siemens.com>.
Sure. But the manual deployment of the sources-jar and javadoc-jar for a newer version of jMonkeyEngine is also needed.

I think I will repack jMonkeyEngine (with sources and javadoc) and unpack on building into target. But it is not very practical because the jar has about 63MB.


-----Ursprüngliche Nachricht-----
Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im Auftrag von Anders Hammar
Gesendet: Dienstag, 1. Februar 2011 15:14
An: Maven Users List
Betreff: Re: Attach sources/javadoc to system-scoped dependency

If you use the repo manager it will be automatic for everyone once it has
been added.
If you use the local repo everyone has to do it, and redo it if they wipe
the local repo. Wrong way to handle these things in a Maven dev environment.

/Anders
On Tue, Feb 1, 2011 at 14:59, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> I only deployed the source and javadoc artifact into my local repository
> unter the right GAV. With an repo manager I haven't tried this way.
> The linkage in Eclipse works after this step fine and how I expect it. But
> I'm looking for an out-of-the-box soloution without manual steps to perform.
>
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Dienstag, 1. Februar 2011 14:43
> An: Maven Users List
> Betreff: Re: Attach sources/javadoc to system-scoped dependency
>
> Without going into a discussion regarding the primary artifact, have you
> tried adding the sources and javadoc artifacts to the repo manager (under
> the correct GAV)? Might work...might not...
>
> /Anders
>
> On Tue, Feb 1, 2011 at 14:34, Hauschild, Klaus (EXT) <
> klaus.hauschild.ext@siemens.com> wrote:
>
> > I expected this answer. My current workaround looks like that: manually
> > deploying the sourecs-jar and the javadoc-jar into my local repo.
> > For jMonkeyEngine it is not possible to convert the jar to a real maven
> > artifact. It is mandatory to address this jar file absolute in the
> machines
> > installation. On execution there will be a lookup for native libraries
> > relative to jMonkeyEnige3.jar
> >
> > Is there no other solution?
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> > Auftrag von Anders Hammar
> > Gesendet: Dienstag, 1. Februar 2011 14:20
> > An: Maven Users List
> > Betreff: Re: Attach sources/javadoc to system-scoped dependency
> >
> > Add the artifact (including javadoc and sources artifacts) to your
> > repository manager and use a normal compile scope. Then it will work
> > automatically.
> > Using system scope is deprecated and highly discouraged as your build is
> > not
> > portable.
> >
> > /Anders
> >
> > On Tue, Feb 1, 2011 at 14:03, Hauschild, Klaus (EXT) <
> > klaus.hauschild.ext@siemens.com> wrote:
> >
> > > Hi,
> > >
> > > we're using a system scoped dependency to jMonkeyEngine3 like this:
> > >    <dependency>
> > >      <groupId>com.jme3</groupId>
> > >      <artifactId>jMonkeyEngine3</artifactId>
> > >      <version>3</version>
> > >      <scope>system</scope>
> > >      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
> > >    </dependency>
> > > The integration by m2e into Eclipse and building packages with Maven
> are
> > > very fine. But in Eclipse there are no sources nor javadoc available
> > without
> > >  manipulations by hand. I'm looking for an automatic solution.
> > >
> > > Is there a way?
> > >
> > > Thanks, Klaus
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Attach sources/javadoc to system-scoped dependency

Posted by Anders Hammar <an...@hammar.net>.
If you use the repo manager it will be automatic for everyone once it has
been added.
If you use the local repo everyone has to do it, and redo it if they wipe
the local repo. Wrong way to handle these things in a Maven dev environment.

/Anders
On Tue, Feb 1, 2011 at 14:59, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> I only deployed the source and javadoc artifact into my local repository
> unter the right GAV. With an repo manager I haven't tried this way.
> The linkage in Eclipse works after this step fine and how I expect it. But
> I'm looking for an out-of-the-box soloution without manual steps to perform.
>
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Dienstag, 1. Februar 2011 14:43
> An: Maven Users List
> Betreff: Re: Attach sources/javadoc to system-scoped dependency
>
> Without going into a discussion regarding the primary artifact, have you
> tried adding the sources and javadoc artifacts to the repo manager (under
> the correct GAV)? Might work...might not...
>
> /Anders
>
> On Tue, Feb 1, 2011 at 14:34, Hauschild, Klaus (EXT) <
> klaus.hauschild.ext@siemens.com> wrote:
>
> > I expected this answer. My current workaround looks like that: manually
> > deploying the sourecs-jar and the javadoc-jar into my local repo.
> > For jMonkeyEngine it is not possible to convert the jar to a real maven
> > artifact. It is mandatory to address this jar file absolute in the
> machines
> > installation. On execution there will be a lookup for native libraries
> > relative to jMonkeyEnige3.jar
> >
> > Is there no other solution?
> >
> >
> > -----Ursprüngliche Nachricht-----
> > Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> > Auftrag von Anders Hammar
> > Gesendet: Dienstag, 1. Februar 2011 14:20
> > An: Maven Users List
> > Betreff: Re: Attach sources/javadoc to system-scoped dependency
> >
> > Add the artifact (including javadoc and sources artifacts) to your
> > repository manager and use a normal compile scope. Then it will work
> > automatically.
> > Using system scope is deprecated and highly discouraged as your build is
> > not
> > portable.
> >
> > /Anders
> >
> > On Tue, Feb 1, 2011 at 14:03, Hauschild, Klaus (EXT) <
> > klaus.hauschild.ext@siemens.com> wrote:
> >
> > > Hi,
> > >
> > > we're using a system scoped dependency to jMonkeyEngine3 like this:
> > >    <dependency>
> > >      <groupId>com.jme3</groupId>
> > >      <artifactId>jMonkeyEngine3</artifactId>
> > >      <version>3</version>
> > >      <scope>system</scope>
> > >      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
> > >    </dependency>
> > > The integration by m2e into Eclipse and building packages with Maven
> are
> > > very fine. But in Eclipse there are no sources nor javadoc available
> > without
> > >  manipulations by hand. I'm looking for an automatic solution.
> > >
> > > Is there a way?
> > >
> > > Thanks, Klaus
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

AW: Attach sources/javadoc to system-scoped dependency

Posted by "Hauschild, Klaus (EXT)" <kl...@siemens.com>.
I only deployed the source and javadoc artifact into my local repository unter the right GAV. With an repo manager I haven't tried this way.
The linkage in Eclipse works after this step fine and how I expect it. But I'm looking for an out-of-the-box soloution without manual steps to perform. 


-----Ursprüngliche Nachricht-----
Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im Auftrag von Anders Hammar
Gesendet: Dienstag, 1. Februar 2011 14:43
An: Maven Users List
Betreff: Re: Attach sources/javadoc to system-scoped dependency

Without going into a discussion regarding the primary artifact, have you
tried adding the sources and javadoc artifacts to the repo manager (under
the correct GAV)? Might work...might not...

/Anders

On Tue, Feb 1, 2011 at 14:34, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> I expected this answer. My current workaround looks like that: manually
> deploying the sourecs-jar and the javadoc-jar into my local repo.
> For jMonkeyEngine it is not possible to convert the jar to a real maven
> artifact. It is mandatory to address this jar file absolute in the machines
> installation. On execution there will be a lookup for native libraries
> relative to jMonkeyEnige3.jar
>
> Is there no other solution?
>
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Dienstag, 1. Februar 2011 14:20
> An: Maven Users List
> Betreff: Re: Attach sources/javadoc to system-scoped dependency
>
> Add the artifact (including javadoc and sources artifacts) to your
> repository manager and use a normal compile scope. Then it will work
> automatically.
> Using system scope is deprecated and highly discouraged as your build is
> not
> portable.
>
> /Anders
>
> On Tue, Feb 1, 2011 at 14:03, Hauschild, Klaus (EXT) <
> klaus.hauschild.ext@siemens.com> wrote:
>
> > Hi,
> >
> > we're using a system scoped dependency to jMonkeyEngine3 like this:
> >    <dependency>
> >      <groupId>com.jme3</groupId>
> >      <artifactId>jMonkeyEngine3</artifactId>
> >      <version>3</version>
> >      <scope>system</scope>
> >      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
> >    </dependency>
> > The integration by m2e into Eclipse and building packages with Maven are
> > very fine. But in Eclipse there are no sources nor javadoc available
> without
> >  manipulations by hand. I'm looking for an automatic solution.
> >
> > Is there a way?
> >
> > Thanks, Klaus
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Attach sources/javadoc to system-scoped dependency

Posted by Anders Hammar <an...@hammar.net>.
Without going into a discussion regarding the primary artifact, have you
tried adding the sources and javadoc artifacts to the repo manager (under
the correct GAV)? Might work...might not...

/Anders

On Tue, Feb 1, 2011 at 14:34, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> I expected this answer. My current workaround looks like that: manually
> deploying the sourecs-jar and the javadoc-jar into my local repo.
> For jMonkeyEngine it is not possible to convert the jar to a real maven
> artifact. It is mandatory to address this jar file absolute in the machines
> installation. On execution there will be a lookup for native libraries
> relative to jMonkeyEnige3.jar
>
> Is there no other solution?
>
>
> -----Ursprüngliche Nachricht-----
> Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im
> Auftrag von Anders Hammar
> Gesendet: Dienstag, 1. Februar 2011 14:20
> An: Maven Users List
> Betreff: Re: Attach sources/javadoc to system-scoped dependency
>
> Add the artifact (including javadoc and sources artifacts) to your
> repository manager and use a normal compile scope. Then it will work
> automatically.
> Using system scope is deprecated and highly discouraged as your build is
> not
> portable.
>
> /Anders
>
> On Tue, Feb 1, 2011 at 14:03, Hauschild, Klaus (EXT) <
> klaus.hauschild.ext@siemens.com> wrote:
>
> > Hi,
> >
> > we're using a system scoped dependency to jMonkeyEngine3 like this:
> >    <dependency>
> >      <groupId>com.jme3</groupId>
> >      <artifactId>jMonkeyEngine3</artifactId>
> >      <version>3</version>
> >      <scope>system</scope>
> >      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
> >    </dependency>
> > The integration by m2e into Eclipse and building packages with Maven are
> > very fine. But in Eclipse there are no sources nor javadoc available
> without
> >  manipulations by hand. I'm looking for an automatic solution.
> >
> > Is there a way?
> >
> > Thanks, Klaus
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

AW: AW: Attach sources/javadoc to system-scoped dependency

Posted by "Hauschild, Klaus (EXT)" <kl...@siemens.com>.
Thanks for the replies, but all doesn't taste like the maven way. 


Gruß
__________________________________________________ 
Dipl.-Inf. (FH) Klaus Hauschild
Junior-Architekt
stoneball
www.stoneball.de

i.A.:
SIEMENS AG
Industry Sector
Building Technologies Division 
I BT LV DS GT
Suedstr. 74 
04178 Leipzig, Germany
Tel. : +49 (341) 4470-657
mailto:klaus.hauschild.ext@siemens.com

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; 
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; 
Wolfgang Dehen, Brigitte Ederer, Heinrich Hiesinger, Joe Kaeser, Barbara Kux, Hermann Requardt, 
Siegfried Russwurm, Peter Y. Solmssen; Registered offices: Berlin and Munich, Germany; 
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; 
WEEE-Reg.-No. DE 23691322

-----Ursprüngliche Nachricht-----
Von: Marc Rohlfs [mailto:pomarize@googlemail.com] 
Gesendet: Dienstag, 1. Februar 2011 16:14
An: Maven Users List
Betreff: Re: AW: Attach sources/javadoc to system-scoped dependency

What do You need the sources and the download JARs for? Guess You like 
to be attached to the library in You IDE project, right?

For Eclipse I see 2 workarounds:

1. This is evil, but it worked for me in a little test project: Deploy 
the JARs (main artifact, sources and javadoc) to the repository. Then 
declare the same dependency twice in Your POM, one with 'system' scope 
and one with 'provided' scope - the 'system' scoped dependency node 
should be declared first.

2. Create a user library for the JAR in Eclipse and configure the 
maven-eclipse-plugin:
  - use the 'classpathContainers' parameter to add the library to the 
project classpath.
  - use the 'excludes' parameter to remove the 'system' scoped library 
from the project classpath instead.


On 01/02/11 14:34, Hauschild, Klaus (EXT) wrote:
> Is there no other solution?

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


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


Re: AW: Attach sources/javadoc to system-scoped dependency

Posted by Marc Rohlfs <po...@googlemail.com>.
What do You need the sources and the download JARs for? Guess You like 
to be attached to the library in You IDE project, right?

For Eclipse I see 2 workarounds:

1. This is evil, but it worked for me in a little test project: Deploy 
the JARs (main artifact, sources and javadoc) to the repository. Then 
declare the same dependency twice in Your POM, one with 'system' scope 
and one with 'provided' scope - the 'system' scoped dependency node 
should be declared first.

2. Create a user library for the JAR in Eclipse and configure the 
maven-eclipse-plugin:
  - use the 'classpathContainers' parameter to add the library to the 
project classpath.
  - use the 'excludes' parameter to remove the 'system' scoped library 
from the project classpath instead.


On 01/02/11 14:34, Hauschild, Klaus (EXT) wrote:
> Is there no other solution?

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


AW: Attach sources/javadoc to system-scoped dependency

Posted by "Hauschild, Klaus (EXT)" <kl...@siemens.com>.
I expected this answer. My current workaround looks like that: manually deploying the sourecs-jar and the javadoc-jar into my local repo.
For jMonkeyEngine it is not possible to convert the jar to a real maven artifact. It is mandatory to address this jar file absolute in the machines installation. On execution there will be a lookup for native libraries relative to jMonkeyEnige3.jar

Is there no other solution?


-----Ursprüngliche Nachricht-----
Von: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] Im Auftrag von Anders Hammar
Gesendet: Dienstag, 1. Februar 2011 14:20
An: Maven Users List
Betreff: Re: Attach sources/javadoc to system-scoped dependency

Add the artifact (including javadoc and sources artifacts) to your
repository manager and use a normal compile scope. Then it will work
automatically.
Using system scope is deprecated and highly discouraged as your build is not
portable.

/Anders

On Tue, Feb 1, 2011 at 14:03, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> Hi,
>
> we're using a system scoped dependency to jMonkeyEngine3 like this:
>    <dependency>
>      <groupId>com.jme3</groupId>
>      <artifactId>jMonkeyEngine3</artifactId>
>      <version>3</version>
>      <scope>system</scope>
>      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
>    </dependency>
> The integration by m2e into Eclipse and building packages with Maven are
> very fine. But in Eclipse there are no sources nor javadoc available without
>  manipulations by hand. I'm looking for an automatic solution.
>
> Is there a way?
>
> Thanks, Klaus
>
>

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


Re: Attach sources/javadoc to system-scoped dependency

Posted by Anders Hammar <an...@hammar.net>.
Add the artifact (including javadoc and sources artifacts) to your
repository manager and use a normal compile scope. Then it will work
automatically.
Using system scope is deprecated and highly discouraged as your build is not
portable.

/Anders

On Tue, Feb 1, 2011 at 14:03, Hauschild, Klaus (EXT) <
klaus.hauschild.ext@siemens.com> wrote:

> Hi,
>
> we're using a system scoped dependency to jMonkeyEngine3 like this:
>    <dependency>
>      <groupId>com.jme3</groupId>
>      <artifactId>jMonkeyEngine3</artifactId>
>      <version>3</version>
>      <scope>system</scope>
>      <systemPath>${env.JME3_HOME}/jMonkeyEngine3.jar</systemPath>
>    </dependency>
> The integration by m2e into Eclipse and building packages with Maven are
> very fine. But in Eclipse there are no sources nor javadoc available without
>  manipulations by hand. I'm looking for an automatic solution.
>
> Is there a way?
>
> Thanks, Klaus
>
>