You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Schulte <cs...@schulte.it> on 2005/12/05 13:11:28 UTC
[m2] Downloading source-code jar files ?
Hi,
how do I make maven fetch e.g. junit-3.8.1-sources.jar so that this file
gets copied into the local repository ? I tried putting a dependency to
it in the root pom like this
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<type>sources.jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
but it seems to be incorrect.
--
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Downloading source-code jar files ?
Posted by Christian Schulte <cs...@schulte.it>.
Jochen Wiedmann schrieb:
> Henry Isidro wrote:
>
>> Try this:
>>
>> <dependencies>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <version>3.8.1-sources</version>
>> <type>jar</type>
>> <scope>provided</scope>
>> </dependency>
>> </dependencies>
>
>
> If you are using the Eclipse plugin, then a more simple trick is
> addding the following to the pom's plugins section. It doesn't depend
> on a certain jar file.
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <downloadSources>true</downloadSources>
> </configuration>
> </plugin>
Hi,
the problem I am having is that I cannot use the eclipse plugin and need
maven to download the source-jars somehow. Currently I am doing it like
<dependency>
<groupId>someGroupId</groupId>
<artifactId>someArtifactId</artifactId>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
but this seems to be incorrect since the sources will be added to the
various classpaths. Is it possible to just download the jars without
putting them in some classpath ?
--
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Downloading source-code jar files ?
Posted by Jochen Wiedmann <jo...@gmail.com>.
Henry Isidro wrote:
> Try this:
>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1-sources</version>
> <type>jar</type>
> <scope>provided</scope>
> </dependency>
> </dependencies>
If you are using the Eclipse plugin, then a more simple trick is addding
the following to the pom's plugins section. It doesn't depend on a
certain jar file.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] Downloading source-code jar files ?
Posted by Henry Isidro <hi...@exist.com>.
Christian Schulte wrote:
> Hi,
>
> how do I make maven fetch e.g. junit-3.8.1-sources.jar so that this
> file gets copied into the local repository ? I tried putting a
> dependency to it in the root pom like this
>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <type>sources.jar</type>
> <scope>provided</scope>
> </dependency>
> </dependencies>
>
> but it seems to be incorrect.
>
Hi Christian,
Try this:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1-sources</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
</dependencies>
HTH,
Henry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org