You can look at EclipsePlugin and EclipseUtils in the m2 eclipse plugin:
http://svn.apache.org/viewcvs.cgi/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/
Actually in m2 the code to download a source artifact is simple, using
artifact resolver:
Artifact resolvedArtifact =
artifactFactory.createArtifactWithClassifier( artifact.getGroupId(),
artifact.getArtifactId(), artifact.getVersion(), "java-source",
"sources");
try
{
// resolve in local repo or try to download if not already available
artifactResolver.resolve( resolvedArtifact, remoteRepos,
localRepository );
}
catch ( ArtifactNotFoundException e )
{
// ignore, source jar not found
}
... the same also is valid for javadoc attachements (I recently added
javadoc archives handling to the m2 eclipse plugin too...)
fabrizio
On 1/5/06, Stephane Nicoll <[EMAIL PROTECTED]> wrote:
> Brett,
>
> Yep. Any pointer to the m2 implementation please?
>
> s/
>
> On 1/5/06, Brett Porter <[EMAIL PROTECTED]> wrote:
> >
> > Just one comment if you start to implement download as part of idea:idea
> > or eclipse:eclipse - please make sure it is consistent with the m2
> > implementation.
> >
> > Stephane Nicoll wrote:
> > > dowload is interesting. Example: IDE integration wants to download the
> > > source from the repository. Should not fail if it is not available
> > > though.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> .::You're welcome ::.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]