You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by anjibman <an...@hotmail.com> on 2012/12/18 02:34:09 UTC

Getting code from dependency

Hi All,

I am trying to find a tag/way so that I can get the source code for the
dependency in Maven. I have dependency as 

<dependency>
  <groupId>my-group</groupId>
  <artifactId>my-artifact</artifactId>
  <version>${my-version}</version>
</dependency>

I have other dependencies also but I want source code from this dependency
only.

Thanks



--
View this message in context: http://maven.40175.n5.nabble.com/Getting-code-from-dependency-tp5738980.html
Sent from the Maven - Users mailing list archive at Nabble.com.

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


Re: Getting code from dependency

Posted by jinwei zhu <zh...@gmail.com>.
hi, you can use dependency plugin like "mvn dependency:sources
-DdownloadSources=true".


2012/12/18 anjibman <an...@hotmail.com>:
> Hi All,
>
> I am trying to find a tag/way so that I can get the source code for the
> dependency in Maven. I have dependency as
>
> <dependency>
>   <groupId>my-group</groupId>
>   <artifactId>my-artifact</artifactId>
>   <version>${my-version}</version>
> </dependency>
>
> I have other dependencies also but I want source code from this dependency
> only.
>
> Thanks
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Getting-code-from-dependency-tp5738980.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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: Getting code from dependency

Posted by Arnaud Héritier <ah...@gmail.com>.
in my-artifact module you configure the source lugin to deploy the jar with
these sources and then in your project you use it with the classifier
sources

<dependency>
  <groupId>my-group</groupId>
  <artifactId>my-artifact</artifactId>
  <version>${my-version}</version>
  <classifier>sources</classifier>
</dependency>

http://maven.apache.org/plugins/maven-source-plugin/index.html


On Tue, Dec 18, 2012 at 2:34 AM, anjibman <an...@hotmail.com> wrote:

> Hi All,
>
> I am trying to find a tag/way so that I can get the source code for the
> dependency in Maven. I have dependency as
>
> <dependency>
>   <groupId>my-group</groupId>
>   <artifactId>my-artifact</artifactId>
>   <version>${my-version}</version>
> </dependency>
>
> I have other dependencies also but I want source code from this dependency
> only.
>
> Thanks
>
>
>
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Getting-code-from-dependency-tp5738980.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
-----
Arnaud Héritier
http://aheritier.net
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier

Re: Getting code from dependency

Posted by Benson Margulies <bi...@gmail.com>.
Source code where? sitting in a jar? Accessible in an IDE?

On Mon, Dec 17, 2012 at 8:34 PM, anjibman <an...@hotmail.com> wrote:
> Hi All,
>
> I am trying to find a tag/way so that I can get the source code for the
> dependency in Maven. I have dependency as
>
> <dependency>
>   <groupId>my-group</groupId>
>   <artifactId>my-artifact</artifactId>
>   <version>${my-version}</version>
> </dependency>
>
> I have other dependencies also but I want source code from this dependency
> only.
>
> Thanks
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/Getting-code-from-dependency-tp5738980.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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