I can't get it working. I tried this in my pom:

<build>
...
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
</plugins>
</pluginManagement>
</build>

And then 'mvn install' or 'mvn deploy', but that only creates the normal
jar, not the sources jar.

Other question: Does the idea plugin also support attaching the sources?

regards,

Wim

2005/11/15, Brett Porter <[EMAIL PROTECTED]>:
>
> Put it in the parent outside of pluginManagement, and without the
> inherited flags (which is the default) - it should work.
>
> Alternatively, always deploy with -DperformRelease=true, as that will
> activate source and javadoc in the same way from the super pom.
>
> - Brett
>
> On 11/15/05, Peschier J. (Jeroen) <[EMAIL PROTECTED]> wrote:
> >
> >
> > Thanks, this does indeed what I needed! This introduced two other issues
> > though:
> >
> > 1) Is there a way to exclude certain dependencies from downloadSources?
> > Many artifacts have no source attachment in the 
> > ibiblio.org<http://ibiblio.org>repository
> > causing M2 to hang 10 secs on each attempt to fetch the source jar from
> > its repositories. Well, on my slow connection anyway :). I rather not
> > disable the ibiblio.org <http://ibiblio.org> repo...
> >
> > 2) I want include the source jar for every install/deploy of an
> > artifact. Thus, I put this in the parent POM:
> >
> > <pluginManagement>
> > <plugins>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-source-plugin</artifactId>
> > <inherited>true</inherited>
> > <executions>
> > <execution>
> > <phase>verify</phase> <!-- makes sure the source jar is build
> > before install or compile -->
> > <goals>
> > <goal>jar</goal>
> > </goals>
> > <inherited>true</inherited>
> > </execution>
> > </executions>
> > <configuration>
> > <attach>true</attach>
> > </configuration>
> > </plugin>
> > </plugins>
> > </pluginManagement>
> >
> >
> > Note that I have specified the inherited-tag twice. I tried different
> > permutations, but it did not auto inherit to the child projects. When I
> > put the following in the child project it works:
> >
> > <build>
> > <pluginManagement>
> > <plugins>
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-source-plugin</artifactId>
> > </plugin>
> > </plugins>
> > </pluginManagement>
> > </build>
> >
> > However, I rather not repeat this in 50+ subprojects... Is it possible
> > to configure the maven-source-plugin to be executed without it being
> > referenced in every child project? From the docs it was my understanding
> > the inherited-tag tells M2 to let the plugin configuration in the parent
> > propagate to child POMs.
> >
> >
> > Oorspronkelijk bericht-----
> > Van: Fabrizio Giustina [mailto:[EMAIL PROTECTED]
> > Verzonden: maandag 14 november 2005 15:23
> > Aan: Maven Users List
> > Onderwerp: Re: Deploy source jar to repository
> >
> > On 11/14/05, Peschier J. (Jeroen) <[EMAIL PROTECTED]> wrote:
> > > A) install/deploy the source jar to the repository, and
> >
> > Just run mvn deploy after the source jar generation:
> > mvn source:jar deploy
> >
> > > B) link the source jar to its corresponding ejb/war/jar-artifact in
> > the
> > > repository, and
> >
> > Handled by the deploy goal, the source jar will sit near to the binary
> > artifact with a -sources suffix.
> >
> > > C) have the maven-eclipse-plugin generate an Eclipse classpath where
> > > each dependency will have the appropriate source jar referenced.
> >
> > run mvn -Declipse.downloadSources=true eclipse:eclipse
> > (the current released version has a bug so that sources already
> > available in the local repo are not added if you don't specify
> > eclipse.downloadSources=true)
> >
> >
> > fabrizio
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to