You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Victor Okunev <ve...@gmail.com> on 2006/12/04 20:04:12 UTC

setting dependency to a project with pom packaging?

Can I create a dependency to a project with pom packaging? This would
be convenient rather than creating separate dependencies on each
module it contains. I tried but unsuccessfully, it seems that Maven is
looking for a jar.  Perhaps I am missing something?

Victor

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


Re: setting dependency to a project with pom packaging?

Posted by "César V." <cv...@ptbsl.com>.


Victor Okunev wrote:
> 
> Can I create a dependency to a project with pom packaging? This would
> be convenient rather than creating separate dependencies on each
> module it contains. I tried but unsuccessfully, it seems that Maven is
> looking for a jar.  Perhaps I am missing something?
> 
> Victor
> 

I have the same problem with the following pom:
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/mule/transports/mule-transports/1.3.3/mule-transports-1.3.3.pom 
I would like to set up the modules it refers to as dependencies, but I don't
want to list all of them explicitly; I naively expected importing this
parent pom would do, but unfortunately it doesn't. 

César

-- 
View this message in context: http://www.nabble.com/setting-dependency-to-a-project-with-pom-packaging--tf2755761s177.html#a8355781
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: setting dependency to a project with pom packaging?

Posted by Daniel Kulp <da...@iona.com>.
On Monday 04 December 2006 14:13, Wendy Smoak wrote:
> On 12/4/06, Victor Okunev <ve...@gmail.com> wrote:
> > Can I create a dependency to a project with pom packaging? This would
> > be convenient rather than creating separate dependencies on each
> > module it contains. I tried but unsuccessfully, it seems that Maven is
> > looking for a jar.  Perhaps I am missing something?
>
> The default <type> is jar.  You could try <type>pom</type> but I don't
> think it's going to do what you want.
>
> What are you trying to do?  It sounds like you have a pom with
> <modules> and you expect that declaring a dependency on that pom will
> add those modules as dependencies.


Yea, I ran into this this morning as well.    I was hoping to depend on 
a "pom" module so I could then use the dependency 
plugin's "copy-dependencies" or "unpack-dependencies" to grab all of them.   
That didn't work.    I changed the other projects type to "jar" which ends up 
deploying an "empty" jar which works, but that makes that other jar get 
copied/unpacked as well. 


-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com

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


Re: setting dependency to a project with pom packaging?

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/4/06, Victor Okunev <ve...@gmail.com> wrote:
> > What are you trying to do?  It sounds like you have a pom with
> > <modules> and you expect that declaring a dependency on that pom will
> > add those modules as dependencies.
>
> Yes, that's the idea. Is it possible or I misunderstand the purpose of
> projects with pom packaging?

Pom packaging is typically used for
   1) 'parent' poms (a list of modules, dependencyManagement, dependencies)
   2) 'master' poms (organization level defaults, usually no modules)
   3) overriding the default lifecycle by binding plugin executions
where you want them
       (I'm probably missing something...)

Projects are usually split into modules and arranged in a hierarchy
with inherited dependencies.  Or with <dependencyManagement> at the
top level to set the version numbers, and then dependencies declared
in the child poms.

It sounds like you either need the normal pom hierarchy so that your
dependencies will be inherited, or possibly some profiles if you're
trying to use different "sets" of dependencies.

Describe your project and I'm sure someone here can help.

-- 
Wendy

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


Re: setting dependency to a project with pom packaging?

Posted by Victor Okunev <ve...@gmail.com>.
> What are you trying to do?  It sounds like you have a pom with
> <modules> and you expect that declaring a dependency on that pom will
> add those modules as dependencies.

Yes, that's the idea. Is it possible or I misunderstand the purpose of
projects with pom packaging?

--Vic


On 12/4/06, Wendy Smoak <ws...@gmail.com> wrote:
> On 12/4/06, Victor Okunev <ve...@gmail.com> wrote:
>
> > Can I create a dependency to a project with pom packaging? This would
> > be convenient rather than creating separate dependencies on each
> > module it contains. I tried but unsuccessfully, it seems that Maven is
> > looking for a jar.  Perhaps I am missing something?
>
> The default <type> is jar.  You could try <type>pom</type> but I don't
> think it's going to do what you want.
>
> What are you trying to do?  It sounds like you have a pom with
> <modules> and you expect that declaring a dependency on that pom will
> add those modules as dependencies.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


RE: setting dependency to a project with pom packaging?

Posted by Maven Users List <cy...@gmail.com>.
The project that depends on pom artifact will be depending on all this pom's
dependencies. The pom dependency can be a replacement of a group of other
dependencies. I've tried this two years back and I guess this behavior
didn't change in maven 2.0.4

-Jiaqi

-----Original Message-----
From: Wendy Smoak [mailto:wsmoak@gmail.com] 
Sent: Monday, December 04, 2006 11:13 AM
To: Maven Users List
Subject: Re: setting dependency to a project with pom packaging?

On 12/4/06, Victor Okunev <ve...@gmail.com> wrote:

> Can I create a dependency to a project with pom packaging? This would 
> be convenient rather than creating separate dependencies on each 
> module it contains. I tried but unsuccessfully, it seems that Maven is 
> looking for a jar.  Perhaps I am missing something?

The default <type> is jar.  You could try <type>pom</type> but I don't think
it's going to do what you want.

What are you trying to do?  It sounds like you have a pom with <modules> and
you expect that declaring a dependency on that pom will add those modules as
dependencies.

--
Wendy

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


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


Re: setting dependency to a project with pom packaging?

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/4/06, Victor Okunev <ve...@gmail.com> wrote:

> Can I create a dependency to a project with pom packaging? This would
> be convenient rather than creating separate dependencies on each
> module it contains. I tried but unsuccessfully, it seems that Maven is
> looking for a jar.  Perhaps I am missing something?

The default <type> is jar.  You could try <type>pom</type> but I don't
think it's going to do what you want.

What are you trying to do?  It sounds like you have a pom with
<modules> and you expect that declaring a dependency on that pom will
add those modules as dependencies.

-- 
Wendy

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


Re: setting dependency to a project with pom packaging?

Posted by franz see <fr...@gmail.com>.
Good day to you, Victor,

Let me get this straight.

You have a project A which depends on projects B, C, D & E ( for example ).
However, you don't want to declare all those in project A's pom. Instead,
you want a way to declare them as project A's dependency as a group. 

Thus you tried adding a dependency whose modules are projects B, C, D & E. 

I am sorry but that will not work. Modules are not considered as
dependencies. The closest thing I can think of to support your needs is to
create another project whose dependencies are projects B, C, D & E. Then add
that project to project A. This would then make projects B, C, D & E the
dependencies of your project A.

Cheers,
Franz


Victor Okunev wrote:
> 
> Can I create a dependency to a project with pom packaging? This would
> be convenient rather than creating separate dependencies on each
> module it contains. I tried but unsuccessfully, it seems that Maven is
> looking for a jar.  Perhaps I am missing something?
> 
> Victor
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/setting-dependency-to-a-project-with-pom-packaging--tf2755761s177.html#a8372729
Sent from the Maven - Users mailing list archive at Nabble.com.


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