Re: Attached artifacts and dependencies

2013-01-06 Thread Stephen Connolly
I think the use case is where you need to give a client lib to 3rd parties
not using maven, otherwise the dependency issue will kill you unless you
are doing this from an api-only module

On Saturday, 5 January 2013, Stanimir Stamenkov wrote:

 Sat, 5 Jan 2013 23:52:50 +0100, /Anders Hammar/:

  I always argue for having the API (e.g. ejb client) as a separate module
 and then the impl (e.g. the ejb) as a separate module.


 That's what we're using after all, but I've recently discovered this
 ejb-client option and started wondering if there's something I'm missing
 about how things are supposed to work/be used.

 --
 Stanimir

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




Attached artifacts and dependencies

2013-01-05 Thread Stanimir Stamenkov
Is it true attached artifacts, that is artifacts with a non-empty 
classifier, inherit their dependencies from the main artifact? 
Stated otherwise - is it possible to specify different set of 
dependencies for an attached artifact such that when included in 
another project, that different set of dependencies get resolved for 
it, instead of the dependencies declared for the main artifact?


It doesn't really matter for many of the commonly attached artifacts 
like sources and javadoc, or the main set of dependencies is 
just fine for classes (of a WAR), but here are some cases it makes 
sens if the dependencies for an attached artifact could be specified 
differently from the main one:


1. jar-with-dependencies - an assembly packaging all required 
dependencies in the JAR, already.  In this case no dependencies 
should be resolved for such an artifact, I guess;


2. client - such as produced by the EJB plugin [1].  In this case 
resolving all dependencies from the main implementation is not 
desired.  Adding some runtime dependencies for the attached 
client, not declared for the main implementation, may be desired too.


So is achieving different set of dependencies possible with using 
attached artifacts vs. just different artifacts?


[1] 
http://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html


--
Stanimir

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



Re: Attached artifacts and dependencies

2013-01-05 Thread Manfred Moser
If the dependencies are not applicable for this artifact (e.g. the pom is
not valid for it because it is generated against Maven convention) then it
should not be an artifact in the same coordinates but rather be a
different module with different GAV coordinates

On Sat, January 5, 2013 2:34 pm, Stanimir Stamenkov wrote:
 Is it true attached artifacts, that is artifacts with a non-empty
 classifier, inherit their dependencies from the main artifact?
 Stated otherwise - is it possible to specify different set of
 dependencies for an attached artifact such that when included in
 another project, that different set of dependencies get resolved for
 it, instead of the dependencies declared for the main artifact?

 It doesn't really matter for many of the commonly attached artifacts
 like sources and javadoc, or the main set of dependencies is
 just fine for classes (of a WAR), but here are some cases it makes
 sens if the dependencies for an attached artifact could be specified
 differently from the main one:

 1. jar-with-dependencies - an assembly packaging all required
 dependencies in the JAR, already.  In this case no dependencies
 should be resolved for such an artifact, I guess;

 2. client - such as produced by the EJB plugin [1].  In this case
 resolving all dependencies from the main implementation is not
 desired.  Adding some runtime dependencies for the attached
 client, not declared for the main implementation, may be desired too.

 So is achieving different set of dependencies possible with using
 attached artifacts vs. just different artifacts?

 [1]
 http://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html

 --
 Stanimir

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



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



Re: Attached artifacts and dependencies

2013-01-05 Thread Stanimir Stamenkov

Sat, 5 Jan 2013 14:38:38 -0800, /Manfred Moser/:


If the dependencies are not applicable for this artifact (e.g. the pom is
not valid for it because it is generated against Maven convention) then it
should not be an artifact in the same coordinates but rather be a
different module with different GAV coordinates


All right.  That's pretty much what I've thought, but then revisit 
the EJB plugin case I've given:


http://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html

Seems like not the best practice - why it has been introduced, then?

--
Stanimir

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



Re: Attached artifacts and dependencies

2013-01-05 Thread Manfred Moser
On Sat, January 5, 2013 2:43 pm, Stanimir Stamenkov wrote:
 Sat, 5 Jan 2013 14:38:38 -0800, /Manfred Moser/:

 If the dependencies are not applicable for this artifact (e.g. the pom
 is
 not valid for it because it is generated against Maven convention) then
 it
 should not be an artifact in the same coordinates but rather be a
 different module with different GAV coordinates

 All right.  That's pretty much what I've thought, but then revisit
 the EJB plugin case I've given:

 http://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html

 Seems like not the best practice - why it has been introduced, then?

A mistake? I don't know. But nothing stops you from having two modules
with different coordinates for the ejb and the ejb client from what I
understand.. but I have not used ejb for ages so I might be completely
off.

manfred


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



Re: Attached artifacts and dependencies

2013-01-05 Thread Anders Hammar
I always argue for having the API (e.g. ejb client) as a separate module
and then the impl (e.g. the ejb) as a separate module.

/Anders


On Sat, Jan 5, 2013 at 11:45 PM, Manfred Moser manf...@mosabuam.com wrote:

 On Sat, January 5, 2013 2:43 pm, Stanimir Stamenkov wrote:
  Sat, 5 Jan 2013 14:38:38 -0800, /Manfred Moser/:
 
  If the dependencies are not applicable for this artifact (e.g. the pom
  is
  not valid for it because it is generated against Maven convention) then
  it
  should not be an artifact in the same coordinates but rather be a
  different module with different GAV coordinates
 
  All right.  That's pretty much what I've thought, but then revisit
  the EJB plugin case I've given:
 
 
 http://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html
 
  Seems like not the best practice - why it has been introduced, then?

 A mistake? I don't know. But nothing stops you from having two modules
 with different coordinates for the ejb and the ejb client from what I
 understand.. but I have not used ejb for ages so I might be completely
 off.

 manfred


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




Re: Attached artifacts and dependencies

2013-01-05 Thread Manfred Moser
Totally agree ++

On Sat, January 5, 2013 2:52 pm, Anders Hammar wrote:
 I always argue for having the API (e.g. ejb client) as a separate module
 and then the impl (e.g. the ejb) as a separate module.

 /Anders


 On Sat, Jan 5, 2013 at 11:45 PM, Manfred Moser manf...@mosabuam.com
 wrote:

 On Sat, January 5, 2013 2:43 pm, Stanimir Stamenkov wrote:
  Sat, 5 Jan 2013 14:38:38 -0800, /Manfred Moser/:
 
  If the dependencies are not applicable for this artifact (e.g. the
 pom
  is
  not valid for it because it is generated against Maven convention)
 then
  it
  should not be an artifact in the same coordinates but rather be a
  different module with different GAV coordinates
 
  All right.  That's pretty much what I've thought, but then revisit
  the EJB plugin case I've given:
 
 
 http://maven.apache.org/plugins/maven-ejb-plugin/examples/ejb-client-dependency.html
 
  Seems like not the best practice - why it has been introduced, then?

 A mistake? I don't know. But nothing stops you from having two modules
 with different coordinates for the ejb and the ejb client from what I
 understand.. but I have not used ejb for ages so I might be completely
 off.

 manfred


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





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



Re: Attached artifacts and dependencies

2013-01-05 Thread Stanimir Stamenkov

Sat, 5 Jan 2013 23:52:50 +0100, /Anders Hammar/:


I always argue for having the API (e.g. ejb client) as a separate module
and then the impl (e.g. the ejb) as a separate module.


That's what we're using after all, but I've recently discovered this 
ejb-client option and started wondering if there's something I'm 
missing about how things are supposed to work/be used.


--
Stanimir

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