You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erick Dovale <ed...@carosys.com> on 2006/02/02 22:46:33 UTC

How to install sources

Hi there,
can any one tell how can I install the sources jar of the artifacts in 
the local repository??

thanks..

edovale

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


Re: How to install sources

Posted by rdj <rd...@wizard.net>.
I could not find documentation per se but think I've figured out how to do
it. If you incorporate this into your POM (master or otherwise), it will
regenerate source JARs when reaching the "package" goal and install the
source JAR along with the runtime JAR when reaching either the "install" (to
local repository) or "deploy" (to remote, shared repository) goals:

 &lt;project...&gt;
     ...
     &lt;build&gt;
	&lt;plugins&gt;
	    &lt;plugin&gt;
    	        &lt;artifactId&gt;maven-source-plugin&lt;/artifactId&gt;
    	        &lt;executions&gt;
    	            &lt;execution&gt;
    	                &lt;phase&gt;package&lt;/phase&gt;
    	                &lt;goals&gt;
    	                    &lt;goal&gt;jar&lt;/goal&gt;
    	                &lt;/goals&gt;
    	            &lt;/execution&gt;
    	        &lt;/executions&gt;
    	    &lt;/plugin&gt;
    	    &lt;plugin&gt;
    	        &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
    	        &lt;executions&gt;
    	            &lt;execution&gt;
    	                &lt;phase&gt;deploy&lt;/phase&gt; &lt;!-- also during
install --&gt;
    	                &lt;configuration&gt;
    	                    &lt;performRelease/&gt; &lt;!-- installs source JAR
--&gt;
    	                &lt;/configuration&gt;
    	            &lt;/execution&gt;
    	        &lt;/executions&gt;
    	    &lt;/plugin&gt;
	&lt;/plugins&gt;
    &lt;/build&gt;
    ...
&lt;/project&gt;

-^-rdj-^-


Lee Meador-3 wrote:
> 
> There is no information on how to use the maven-source-plugin at the link
> given. It just shows the name and the config properties.
> 
> There is no mention of the word "performRelease" at the POM document whose
> link is given.
> 
> Does someone know of a place that documents these things?
> 
--
View this message in context: http://www.nabble.com/How-to-install-sources-t1049892.html#a4144741
Sent from the Maven - Users forum at Nabble.com.


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


Re: How to install sources

Posted by Lee Meador <le...@leemeador.com>.
There is no information on how to use the maven-source-plugin at the link
given. It just shows the name and the config properties.

There is no mention of the word "performRelease" at the POM document whose
link is given.

Does someone know of a place that documents these things?

On 2/2/06, Paolo Perrucci <p....@ludonet.it> wrote:
>
> Hi Erick.
>
> you can use the maven-source-plugin
>
> http://maven.apache.org/plugins/maven-source-plugin/
>
> or use the performRelease property that activate the release-profile
> profile defined in the super POM
>
> http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
>
> "mvn -DperformRelease deploy" will install your artifact jar with source
> and javadoc jars.
>
> Bye
> Paolo
>
>
>
> Erick Dovale ha scritto:
>
> > Hi there,
> > can any one tell how can I install the sources jar of the artifacts in
> > the local repository??
> >
> > thanks..
> >
> > edovale
> >
> > ---------------------------------------------------------------------
> > 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
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com

Re: How to install sources

Posted by Paolo Perrucci <p....@ludonet.it>.
Hi Erick.

you can use the maven-source-plugin

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

or use the performRelease property that activate the release-profile 
profile defined in the super POM

http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

"mvn -DperformRelease deploy" will install your artifact jar with source and javadoc jars.

Bye
Paolo



Erick Dovale ha scritto:

> Hi there,
> can any one tell how can I install the sources jar of the artifacts in 
> the local repository??
>
> thanks..
>
> edovale
>
> ---------------------------------------------------------------------
> 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: How to install sources

Posted by Aaron X Bell <aa...@jpmorgan.com>.
Source jars are easy to manually install locally as they are not linked to
any other files. They are not mentioned in POMs, for example - they are
associated simply by existing with the correct name.

Simply put your source in a jar and copy it to the local repo beside the
binary artifact. The only important thing is to name the jar correctly - for
an artifact

mule-1.3-rc2.jar

your sources jar must be named

mule-1.3-rc2-sources.jar

The eclipse plugin (for example) will now detect the existence of your
sources jar and link it in the generated .classpath.
--
View this message in context: http://www.nabble.com/How-to-install-sources-t1049892.html#a4004240
Sent from the Maven - Users forum at Nabble.com.


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


Re: How to install sources

Posted by Erick Dovale <ed...@carosys.com>.
Hi Darryl,
I mean the project's source jar not the dependencies and by install i 
mean to install them in the local repo.
I could use the install plugin to do this but I was wondering if there 
was a way of doing it all together in a single step..

thanks..

erick.

Darryl L. Pierce wrote:

>Erick Dovale wrote:
>
>  
>
>>Hi there,
>>can any one tell how can I install the sources jar of the artifacts in
>>the local repository??
>>    
>>
>
>Do you mean the source files for your dependencies or the source files for
>what you're producing?
>
>  
>

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


Re: How to install sources

Posted by "Darryl L. Pierce" <mc...@gmail.com>.
Erick Dovale wrote:

> Hi there,
> can any one tell how can I install the sources jar of the artifacts in
> the local repository??

Do you mean the source files for your dependencies or the source files for
what you're producing?

-- 
Darryl L. Pierce <mc...@gmail.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly, 
I could have done." - Jon Stewart


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