List Info

Thread: Re: Include source, javadocs, etc in installed artifact




Re: Include source, javadocs, etc in installed artifact
user name
2007-11-05 10:02:12
As part of your plugins configuration, do this;

<plugin>
  <artifactId>maven-source-plugin</artifactId>
  <configuration>
    <aggregate>false</aggregate>
  </configuration>
  <executions>
    <execution>
      <phase>package</phase>
      <goals>
        <goal>jar</goal>
      </goals>
    </execution>
  </executions>
</plugin>

If you're using Eclipse, you can then do this (after closing
eclipse):
mvn eclipse:clean eclipse:eclipse -DdownloadSources=true

Eclipse will parse the JavaDocs for you from the source.
However, if
you still want javadocs, do this in the pom:
<plugin>
  <artifactId>maven-javadoc-plugin</artifactId>
  <configuration>
    <aggregate>true</aggregate>
  </configuration>
</plugin>

Similarly, for Eclipse, you would now add this to the line:
mvn eclipse:clean eclipse:eclipse -DdownloadSource=true
-DdownloadJavadocs=true

Hope this helps.

Yaakov.


On 11/4/07, Dennis Lundberg <dennislapache.org> wrote:
> This was answered on October 31. on this list. Check
the archives for a
> thread titled "Attaching source code".
>
> lightbulb432 wrote:
> > When I run the mvn install, install:install, or
install:install-file command,
> > only the JAR itself is put into my local
repository. How can I get the
> > source, Javadocs, and other things to also be put
into the local repository?
> >
> > I looked at the following link for any parameters
to add, but nothing
> > relating to this was mentioned.
> >
> > http://maven.apache.org/plugins/maven-inst
all-plugin/install-mojo.html
> >
> > Also, what's the difference between the three
types of install commands
> > specified above? "install" is a phase,
while the other two are goals? Does
> > the install phase by default call one of those two
goals?
> >
> > Thanks.
>
>
> --
> Dennis Lundberg
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: users-unsubscribemaven.apache.org
> For additional commands, e-mail: users-helpmaven.apache.org
>
>

------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribemaven.apache.org
For additional commands, e-mail: users-helpmaven.apache.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )