You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Gabriele Catania <ga...@gmail.com> on 2013/02/17 11:02:30 UTC

maven eclipse plugin and source bundles

Hi all,

the current implementation of maven-eclipse-plugin's to-maven mojo does not
follow maven conventions regarding source bundles.

Given the following two bundles:

org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
org.eclipse.osgi.source_3.4.3.R34x_v20081215-1030.jar


according to maven conventions, the mojo should create two artifacts with
the same groupId, artifactId and version, using the classifier "source" for
the second bundle, that is:

org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030
org.eclipse:osgi:jar:*source*:3.4.3.R34x_v20081215-1030


Instead, it creates these two (completely unrelated) artifacts:


org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030
org.eclipse.osgi:source:jar:3.4.3.R34x_v20081215-1030


This creates problems when using -DdownloadSources=true, and when trying to
create target platform sources. I have created issue
MECLIPSE-719<https://jira.codehaus.org/browse/MECLIPSE-719> a
while ago and attached a patch, could you please shed some light on wheter
my reasoning is correct?
Thanks

Gabriele

Re: maven eclipse plugin and source bundles

Posted by Barrie Treloar <ba...@gmail.com>.
On 18 February 2013 00:50, Gabriele Catania <ga...@gmail.com> wrote:
> The problem here is that the maven-eclipse-plugin's to-maven mojo, which is
> intended to serve as the default tool to create maven artifact from eclipse
> distributions

Here is where you are reasoning is incorrect.

"to-maven" was always a stop-gap measure until Eclipse started hosting
with their artifacts as a Maven Repository.
See
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=283745 "Provide Maven
repositories of stuff built at Eclipse "
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=312656 "Publish Helios
as a Maven repository" [Resolved as WONT]

But we are still waiting.

Given PDE Maven Plugin has been End-Of-Life'd your only other option
is to build via Tycho (http://eclipse.org/tycho/)

Attempting to use to-maven will probably cause you grief.

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


Re: maven eclipse plugin and source bundles

Posted by Gabriele Catania <ga...@gmail.com>.
Hi Martin,

I am well aware that for maven, by default, build.finalName is
${artifactId}-${version}-${classifier}.${type}.
Unfortunately, if you take a look at how eclipse packages their source
artifacts, this is all but a corner case. Take for example this snippet
from the list of bundles in the plugins directory for eclipse 3.4
classic<http://www.eclipse.org/downloads/packages/eclipse-classic-342/ganymedesr2>
:

org.apache.commons.el_1.0.0.v200806031608.jar
org.apache.commons.el.*source*_1.0.0.v200806031608.jar
org.apache.commons.logging_1.0.4.v20080605-1930.jar
org.apache.commons.logging.*source*_1.0.4.v20080605-1930.jar
org.apache.jasper_5.5.17.v200806031609.jar
org.apache.jasper.*source*_5.5.17.v200806031609.jar
org.eclipse.core.expressions_3.4.1.r342_v20081203-0800.jar
org.eclipse.core.expressions.*source*_3.4.1.r342_v20081203-0800.jar
org.eclipse.core.filebuffers_3.4.0.v20080603-2000.jar
org.eclipse.core.filebuffers.*source*_3.4.0.v20080603-2000.jar

The problem here is that the maven-eclipse-plugin's to-maven mojo, which is
intended to serve as the default tool to create maven artifact from eclipse
distributions<http://maven.apache.org/plugins/maven-eclipse-plugin/to-maven-mojo.html>,
is not correctly recognizing bundles that end with the source suffix as
source artifact for the corresponding java artifact, and is instead
creating new java artifacts (that do not contain compiled java classes, but
just the java sources).
Under the assumption that we cannot ask the eclipse guys to completely
revamp their builds to account for maven's build.finalName defaults, would
it be possible to fix the maven-eclipse-plugin to generate correct maven
classifications for eclipse source bundles? The patch attached to
issue MECLIPSE-719
provides a possibile fix, would it be possible to apply it?
Thanks

Gabriele


On Sun, Feb 17, 2013 at 2:50 PM, Martin Gainty <mg...@hotmail.com> wrote:

> Gabriele
> classifier always comes after the version e.g:
> artifact-name-1.0-bin.jar
> artifact-name-1.0-dev.jar
> artifact-name-1.0-prod.jar
> From the above artifact names, classifiers can be located between the
> version and extension name of the artifact.
> It appears that in this specific corner case the eclipse devs somehow
> packaged their distro incorrectly
> Martin-
> ______________________________________________
> Place long-winded disclaimer here
> ----------------------------------------
> > Date: Sun, 17 Feb 2013 11:02:30 +0100
> > Subject: maven eclipse plugin and source bundles
> > From: gabriele.ctn@gmail.com
> > To: dev@maven.apache.org
> >
> > Hi all,
> >
> > the current implementation of maven-eclipse-plugin's to-maven mojo does
> not
> > follow maven conventions regarding source bundles.
> >
> > Given the following two bundles:
> >
> > org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
> > org.eclipse.osgi.source_3.4.3.R34x_v20081215-1030.jar
> >
> >
> > according to maven conventions, the mojo should create two artifacts with
> > the same groupId, artifactId and version, using the classifier "source"
> for
> > the second bundle, that is:
> >
> > org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030
> > org.eclipse:osgi:jar:*source*:3.4.3.R34x_v20081215-1030
> >
> >
> > Instead, it creates these two (completely unrelated) artifacts:
> >
> >
> > org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030
> > org.eclipse.osgi:source:jar:3.4.3.R34x_v20081215-1030
> >
> >
> > This creates problems when using -DdownloadSources=true, and when trying
> to
> > create target platform sources. I have created issue
> > MECLIPSE-719<https://jira.codehaus.org/browse/MECLIPSE-719> a
> > while ago and attached a patch, could you please shed some light on
> wheter
> > my reasoning is correct?
> > Thanks
> >
> > Gabriele
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

RE: maven eclipse plugin and source bundles

Posted by Martin Gainty <mg...@hotmail.com>.
Gabriele
classifier always comes after the version e.g:
artifact-name-1.0-bin.jar
artifact-name-1.0-dev.jar
artifact-name-1.0-prod.jar
>From the above artifact names, classifiers can be located between the version and extension name of the artifact.
It appears that in this specific corner case the eclipse devs somehow packaged their distro incorrectly
Martin-
______________________________________________
Place long-winded disclaimer here
----------------------------------------
> Date: Sun, 17 Feb 2013 11:02:30 +0100
> Subject: maven eclipse plugin and source bundles
> From: gabriele.ctn@gmail.com
> To: dev@maven.apache.org
>
> Hi all,
>
> the current implementation of maven-eclipse-plugin's to-maven mojo does not
> follow maven conventions regarding source bundles.
>
> Given the following two bundles:
>
> org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
> org.eclipse.osgi.source_3.4.3.R34x_v20081215-1030.jar
>
>
> according to maven conventions, the mojo should create two artifacts with
> the same groupId, artifactId and version, using the classifier "source" for
> the second bundle, that is:
>
> org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030
> org.eclipse:osgi:jar:*source*:3.4.3.R34x_v20081215-1030
>
>
> Instead, it creates these two (completely unrelated) artifacts:
>
>
> org.eclipse:osgi:jar:3.4.3.R34x_v20081215-1030
> org.eclipse.osgi:source:jar:3.4.3.R34x_v20081215-1030
>
>
> This creates problems when using -DdownloadSources=true, and when trying to
> create target platform sources. I have created issue
> MECLIPSE-719<https://jira.codehaus.org/browse/MECLIPSE-719> a
> while ago and attached a patch, could you please shed some light on wheter
> my reasoning is correct?
> Thanks
>
> Gabriele 		 	   		  
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org