You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by bandrm <ra...@gmail.com> on 2009/08/27 01:02:05 UTC

Executing Dependency pom.xml

Hello, 

I guess this is very elementary question, here it is. 

I have two projects, Project A (war type) and Project B (jar type). Project
A is dependent on Project B. So, in Project A's pom.xml I mention Project B
as dependent. Now, Project B has just pom.xml and has no jar file generated.
How could I run Project B's pom.xml from Project A's pom.xml, so that
Project B's jar file is generated and is available for Project A?  

Thanks
-- 
View this message in context: http://www.nabble.com/Executing-Dependency-pom.xml-tp25163099p25163099.html
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: Executing Dependency pom.xml

Posted by Anders Hammar <an...@hammar.net>.
I'd rather suggest the newer book "Maven: The definitive Guide" by Sonatype.
Better and newer...
And yes, it's free. You can find it here:
http://www.sonatype.com/documentation/books

/Anders

On Thu, Aug 27, 2009 at 03:29, Wayne Fay <wa...@gmail.com> wrote:

> > I have two projects, Project A (war type) and Project B (jar type).
> Project
> > A is dependent on Project B. So, in Project A's pom.xml I mention Project
> B
> > as dependent. Now, Project B has just pom.xml and has no jar file
> generated.
> > How could I run Project B's pom.xml from Project A's pom.xml, so that
> > Project B's jar file is generated and is available for Project A?
>
> Short answer: You can't.
>
> Longer answer: You can with the new reactor plugin, but I don't think
> you really want to do this. Instead I'd set a parent pom up that both
> inherit from, and set both as <modules> in it, and build from the top
> parent.
>
> You would also benefit from reading "Better Builds with Maven" which
> is a free PDF ebook that talks about things like this.
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Executing Dependency pom.xml

Posted by Wayne Fay <wa...@gmail.com>.
> I have two projects, Project A (war type) and Project B (jar type). Project
> A is dependent on Project B. So, in Project A's pom.xml I mention Project B
> as dependent. Now, Project B has just pom.xml and has no jar file generated.
> How could I run Project B's pom.xml from Project A's pom.xml, so that
> Project B's jar file is generated and is available for Project A?

Short answer: You can't.

Longer answer: You can with the new reactor plugin, but I don't think
you really want to do this. Instead I'd set a parent pom up that both
inherit from, and set both as <modules> in it, and build from the top
parent.

You would also benefit from reading "Better Builds with Maven" which
is a free PDF ebook that talks about things like this.

Wayne

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


Re: AW: Executing Dependency pom.xml

Posted by bandrm <ra...@gmail.com>.

Yes, project B does contain Java classes, it is <packaging>jar</packaging>. 

Thanks


Lewis, Eric-2 wrote:
> 
> Hi
> 
> I think your message is a bit confusing. Is project B a JAR type (does the
> project contain Java classes?) or just a POM type (contains only a
> pom.xml)?
> 
> Best regards,
> Eric 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: bandrm [mailto:rajivbandaru@gmail.com] 
>> Gesendet: Donnerstag, 27. August 2009 01:02
>> An: users@maven.apache.org
>> Betreff: Executing Dependency pom.xml
>> 
>> 
>> Hello, 
>> 
>> I guess this is very elementary question, here it is. 
>> 
>> I have two projects, Project A (war type) and Project B (jar 
>> type). Project
>> A is dependent on Project B. So, in Project A's pom.xml I 
>> mention Project B
>> as dependent. Now, Project B has just pom.xml and has no jar 
>> file generated.
>> How could I run Project B's pom.xml from Project A's pom.xml, so that
>> Project B's jar file is generated and is available for Project A?  
>> 
>> Thanks
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Executing-Dependency-pom.xml-tp25163099p
>> 25163099.html
>> 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
>> 
>> 
> ---------------------------------------------------------------------
> 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/Executing-Dependency-pom.xml-tp25163099p25174675.html
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


AW: Executing Dependency pom.xml

Posted by "Lewis, Eric" <Er...@ipi.ch>.
Hi

I think your message is a bit confusing. Is project B a JAR type (does the project contain Java classes?) or just a POM type (contains only a pom.xml)?

Best regards,
Eric 

> -----Ursprüngliche Nachricht-----
> Von: bandrm [mailto:rajivbandaru@gmail.com] 
> Gesendet: Donnerstag, 27. August 2009 01:02
> An: users@maven.apache.org
> Betreff: Executing Dependency pom.xml
> 
> 
> Hello, 
> 
> I guess this is very elementary question, here it is. 
> 
> I have two projects, Project A (war type) and Project B (jar 
> type). Project
> A is dependent on Project B. So, in Project A's pom.xml I 
> mention Project B
> as dependent. Now, Project B has just pom.xml and has no jar 
> file generated.
> How could I run Project B's pom.xml from Project A's pom.xml, so that
> Project B's jar file is generated and is available for Project A?  
> 
> Thanks
> -- 
> View this message in context: 
> http://www.nabble.com/Executing-Dependency-pom.xml-tp25163099p
> 25163099.html
> 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
> 
> 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org