You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefan Eder <st...@ebuconnect.de> on 2011/05/14 17:24:05 UTC
maven-eclipse-plugin:to-maven
Hi,
First: Thanks!
I am using Maven since years and my enthusiasm is still growing, on an
already very high level.
Very fine work, great software, makes software development a pleasure.
On of the things I appreciate very much, working with Maven, Eclipse and
M2E is "sources at your fingertips".
Occasionally I am using a debugger ;~)
And that is also the reason for my suggestion to improve
maven-eclipse-plugin: I have noticed, that the to-maven goal of the
maven-eclipse-plugin does not honour Eclipse sources as sources.
In the Eclipse nomenclature the symbolic name of a source bundle is the
symbolic name of the corresponding binary bundle suffixed with ".source".
maven-eclipse-plugin:to-maven derives the groupId and artifactId from
the bundles symbolic name by taking the right part of the symbolic name
split by the last dot as artifactId and the left part as groupId.
So far so good, but in case of a source bundle, it should cut of the
".source" suffix before and install/deploy the bundle as secondary
artifact with classifier "sources".
One consequence of the actual plugins behaviour is, that each and every
source bundle gets the artifactId "source".
I made a q&d hack with the plugin and was surprised how well it worked
for me.
The hack filters out source bundles from the file list for primary
artifact candidates and puts them in a map for later retrieval.
Then for each primary (binary) artifact it looks into that map, and if
found attaches the jar as secondary artifact with classifier sources and
removes it from the map.
And, that was the surprise, at the end, the map was empty. And I got
what I wanted, Eclipse bundles as Maven artifacts with the sources attached.
If you are interested, I can send you the hack and spend some more time
to make it more reliable and introduce some comments.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-eclipse-plugin:to-maven
Posted by Barrie Treloar <ba...@gmail.com>.
On Sun, May 15, 2011 at 12:54 AM, Stefan Eder <st...@ebuconnect.de> wrote:
> Hi,
>
> First: Thanks!
> I am using Maven since years and my enthusiasm is still growing, on an
> already very high level.
> Very fine work, great software, makes software development a pleasure.
>
> On of the things I appreciate very much, working with Maven, Eclipse and M2E
> is "sources at your fingertips".
> Occasionally I am using a debugger ;~)
>
> And that is also the reason for my suggestion to improve
> maven-eclipse-plugin: I have noticed, that the to-maven goal of the
> maven-eclipse-plugin does not honour Eclipse sources as sources.
>
> In the Eclipse nomenclature the symbolic name of a source bundle is the
> symbolic name of the corresponding binary bundle suffixed with ".source".
> maven-eclipse-plugin:to-maven derives the groupId and artifactId from the
> bundles symbolic name by taking the right part of the symbolic name split by
> the last dot as artifactId and the left part as groupId.
> So far so good, but in case of a source bundle, it should cut of the
> ".source" suffix before and install/deploy the bundle as secondary artifact
> with classifier "sources".
> One consequence of the actual plugins behaviour is, that each and every
> source bundle gets the artifactId "source".
> I made a q&d hack with the plugin and was surprised how well it worked for
> me.
> The hack filters out source bundles from the file list for primary artifact
> candidates and puts them in a map for later retrieval.
> Then for each primary (binary) artifact it looks into that map, and if found
> attaches the jar as secondary artifact with classifier sources and removes
> it from the map.
> And, that was the surprise, at the end, the map was empty. And I got what I
> wanted, Eclipse bundles as Maven artifacts with the sources attached.
>
> If you are interested, I can send you the hack and spend some more time to
> make it more reliable and introduce some comments.
to-maven is a hack and not well supported.
The mapping from Eclipse OSGi bundles to Maven needs a lot more work,
there should be plenty of archives about this topic.
Work is being done with Eclipse to help them populate a maven
repository from the ant generated artifacts.
A first cut of exposing Eclipse artifacts is available at
https://repository.sonatype.org/content/repositories/eclipse but it
only contains 3.2 and 3.3 artifacts from the looks.
But we have been waiting many years to get this solved properly.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org