Antwort: Re: Antwort: Re: Maven Shade Plugin

2013-03-01 Thread Jan Engler
Hi,

To prevent any problems, I have now split up the build into two builds 
(api-build and full-jar). I think I will introduce now a third project 
(with pom packaging) that will build up all modules and collect the 
artifacts that are needed. I hope that is a correct strategy to solve the 
problem. I would like to reuse the api.jar and the full.jar as artifacts 
that can be used as dependencies, therefore I take Jörg's comment into 
account, thanks!

Best,
 Jan

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Jörg Schaible joerg.schai...@scalaris.com
An: users@maven.apache.org
Datum:  01.03.2013 08:27
Betreff:Re: Antwort: Re: Maven Shade Plugin



Hi Tim,

Tim Kettler wrote:

 Am 28.02.2013 19:47, schrieb Joachim Durchholz:
 Am 28.02.2013 16:24, schrieb Jan Engler:
 At first: in fact this is only one artifact. The full jar contains all
 classes of the dependecies, the api a reduced set (using filtern in 
the
 shade plugin).

 Is there a (conceivable) Maven build that uses api.jar as a dependency?
 Then it must be the main artifact at its GAV (groupId/artifact/version)
 coordinate.

 Is there a (conceivable) Maven build that uses full.jar as a 
dependency?
 Then it must be the main artifact at its GAV coordinate.

 If both jars need to be main artifacts, they need to go to different 
GAV
 coordinates. Because the dependent projects that need either api.jar or
 full.jar have no way of specifying which of them they actually need, 
the
 dependency section in their poms can only specify the GAV coordinate.
 
 That's not correct. The classifier is part of the artifact coordinates
 just like group, artifact(name) and version. A POM can just as well
 depend on a secondary artifact:
 
dependency
  groupIdfoo/groupId
  artifactIdbar/artifactId
  version1.0/version
  classifierapi/classifier
/dependency
 
 The complete coordinates of an artifact are GAVTC: group,
 artifact(name), version, type (default is jar), classifier (default is
 empty).

That's not the real problem. What actually *is* a problem, if you depend 
on 
different artifacts that bring both jars as transitive dependencies - you 
cannot exclude e.g. the -api, because for exclusions you can only specify 
GA. :-/

- Jörg


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender) 


Antwort: Re: Antwort: Re: Maven Shade Plugin

2013-03-01 Thread Jan Engler
Ok,

working with a split-up build project seems to work. The only problem that 
I face in the moment is that there is not only my 2 shaded jars (api and 
api-sources) but also a file called original-api.jar. The content of 
this jar is only the meta-inf folder and I don't want this file to be 
placed in my nexusAny hints?

Best,
 Jan 

Mit freundlichen Grüßen / Best regards

Jan Engler
Central Research  Development

SICK AG
Erwin-Sick-Str. 1
79183 Waldkirch, Germany

Phone +49 7681 202-3214
mailto:jan.eng...@sick.de
http://www.sick.com





Von:Tim Kettler tim.kett...@udo.edu
An: Maven Users List users@maven.apache.org
Datum:  01.03.2013 09:49
Betreff:Re: Antwort: Re: Maven Shade Plugin



Am 01.03.2013 08:26, schrieb Jörg Schaible:
 Hi Tim,

 Tim Kettler wrote:

 Am 28.02.2013 19:47, schrieb Joachim Durchholz:
 Am 28.02.2013 16:24, schrieb Jan Engler:
 At first: in fact this is only one artifact. The full jar contains 
all
 classes of the dependecies, the api a reduced set (using filtern in 
the
 shade plugin).

 Is there a (conceivable) Maven build that uses api.jar as a 
dependency?
 Then it must be the main artifact at its GAV 
(groupId/artifact/version)
 coordinate.

 Is there a (conceivable) Maven build that uses full.jar as a 
dependency?
 Then it must be the main artifact at its GAV coordinate.

 If both jars need to be main artifacts, they need to go to different 
GAV
 coordinates. Because the dependent projects that need either api.jar 
or
 full.jar have no way of specifying which of them they actually need, 
the
 dependency section in their poms can only specify the GAV coordinate.

 That's not correct. The classifier is part of the artifact coordinates
 just like group, artifact(name) and version. A POM can just as well
 depend on a secondary artifact:

 dependency
   groupIdfoo/groupId
   artifactIdbar/artifactId
   version1.0/version
   classifierapi/classifier
 /dependency

 The complete coordinates of an artifact are GAVTC: group,
 artifact(name), version, type (default is jar), classifier (default is
 empty).

 That's not the real problem. What actually *is* a problem, if you depend 
on
 different artifacts that bring both jars as transitive dependencies - 
you
 cannot exclude e.g. the -api, because for exclusions you can only 
specify
 GA. :-/

Ouch, never ran into this one.

 - Jörg

-Tim


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


 
 
SICK AG - Sitz: Waldkirch i. Br. - Handelsregister: Freiburg i. Br. HRB 
280355 
Vorstand: Dr. Robert Bauer (Vorsitzender)  -  Reinhard Bösl  -  Dr. Martin 
Krämer  -  Markus Paschmann  -  Markus Vatter 
Aufsichtsrat: Gisela Sick (Ehrenvorsitzende) - Klaus M. Bukenberger 
(Vorsitzender)