Discussion:
Tycho and maven-assembly-plugin
(too old to reply)
Mickael Istria
2012-12-19 10:05:21 UTC
Permalink
Hi all,

I'm currently making some experiments on how Tycho and
maven-assembly-plugin mix together. The goal is to be able to generate a
folder containing content from a p2-repo (defined in category.xml + the
transitive dependencies. I've tried using the maven-assembly-plugin, but
if you know a better approach, I'd be glad to hear it.
So, when using assembly plugin with dependencySets and
useTransitiveDependencies=true, it seems like the aseembly plugins tries
to do what I expect: get all dependencies. However, it's not totally
working and telling me:
"
[ERROR] Artifact:
p2.eclipse-feature:org.eclipse.jst.enterprise_userdoc.feature:jar:3.3.100.v201105122000-62FUGBgJ9EA9aEeHRHc
has no file.
"
for all bundles.

I think that's so because the artifact is a p2 one, not a maven one; and
hence does not have full Maven metadata to actually copy the jar.

Does anyone have a hint on how to get it working? or almost working?
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Mickael Istria
2012-12-19 10:23:11 UTC
Permalink
PS: I know about the includeAllDependencies flag, but since I don't want
to alter the "normal" output of the repo, I'd prefer to find another
way; or a way to generate 2 repos: one without deps, and one with
transitive deps.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Jeff MAURY
2012-12-19 12:34:49 UTC
Permalink
If you do want to copy the dependencies only, why don't you use the
dependency plugin ?

Regards
Jeff
Post by Mickael Istria
PS: I know about the includeAllDependencies flag, but since I don't want
to alter the "normal" output of the repo, I'd prefer to find another way;
or a way to generate 2 repos: one without deps, and one with transitive
deps.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets<http://twitter.com/mickaelistria>
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Jeff MAURY


"Legacy code" often differs from its suggested alternative by actually
working and scaling.
- Bjarne Stroustrup

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.twitter.com/jeffmaury
Mickael Istria
2012-12-19 17:41:56 UTC
Permalink
Post by Jeff MAURY
If you do want to copy the dependencies only, why don't you use the
dependency plugin ?
Thanks, it works.
As often, the simpler the better ;)
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
Mikhail Kalkov
2012-12-19 14:13:50 UTC
Permalink
Have you tried the mirror goal of tycho-p2-extras-plugin? I don't think you can give it directly category.xml but otherwise it can generate a p2 repo with dependencies.

As far as I understood from your description, I have a similar use case and when asked about it on p2-dev mailing list, Klaus Kopecz has additionally suggested to use B3 Aggregator to generate p2 repos: http://dev.eclipse.org/mhonarc/lists/p2-dev/msg04980.html


/Mikhail

----- Original Message -----

From: "Mickael Istria" <***@redhat.com>
To: tycho-***@eclipse.org
Sent: Wednesday, December 19, 2012 11:23:11 AM
Subject: Re: [tycho-user] Tycho and maven-assembly-plugin

PS: I know about the includeAllDependencies flag, but since I don't want to alter the "normal" output of the repo, I'd prefer to find another way; or a way to generate 2 repos: one without deps, and one with transitive deps.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets
_______________________________________________
tycho-user mailing list
tycho-***@eclipse.org
https://dev.eclipse.org/mailman/listinfo/tycho-user
Nick Boldt
2012-12-19 14:42:33 UTC
Permalink
I've used both maven and ant to produce a mirror. IMHO, while it's
harder to invoke Eclipse's antRunner than to simply run `mvn verify`,
the script is much easier to read and maintain. (And no, you can't pass
tycho-p2-extras-plugin:mirror a category.xml, but you can give it a list
of IUs to include.)

Compare:

http://download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml

vs.

http://download.jboss.org/jbosstools/updates/requirements/m2eclipse/pom.xml

And if you then have to use Ant for any post-processing steps, like to
remove external references to the original update site, or regenerate
the content.jar / artifacts.jar, you'll have to use maven's antRun anyway.

http://download.jboss.org/jbosstools/updates/requirements/pmd/build.xml

If you want an example of filtering by IU, here's a script that includes
an explicit list of features, rather than mirroring everything:

http://download.jboss.org/jbosstools/updates/requirements/mylyn/build.xml

$0.02,

Nick
Post by Mikhail Kalkov
Have you tried the mirror goal of tycho-p2-extras-plugin? I don't think
you can give it directly category.xml but otherwise it can generate a p2
repo with dependencies.
As far as I understood from your description, I have a similar use case
and when asked about it on p2-dev mailing list, Klaus Kopecz has
http://dev.eclipse.org/mhonarc/lists/p2-dev/msg04980.html
/Mikhail
------------------------------------------------------------------------
*Sent: *Wednesday, December 19, 2012 11:23:11 AM
*Subject: *Re: [tycho-user] Tycho and maven-assembly-plugin
PS: I know about the includeAllDependencies flag, but since I don't want
to alter the "normal" output of the repo, I'd prefer to find another
way; or a way to generate 2 repos: one without deps, and one with
transitive deps.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat <http://www.jboss.org/tools>
My blog <http://mickaelistria.wordpress.com> - My Tweets
<http://twitter.com/mickaelistria>
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
https://dev.eclipse.org/mailman/listinfo/tycho-user
--
Nick Boldt :: http://nick.divbyzero.com
Continue reading on narkive:
Loading...