You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Saloucious <sa...@gmail.com> on 2007/10/30 11:07:33 UTC

Multi-Modules and classifier dependencies

Hi, 
Here is an multi-module example : 

project-parent/
  module1/
  module2/


The module1 generates 2 artifacts, one with classifier "client".
The module2 depends on this artifiact "client".

When I run : "mvn install" from project-parent, during compilation of the
module2, classes from the
module1 "client" artifact are not found on the classpath.

However when i run "mvn install" from module1 then from module2, all works
fine


Any ideas ?
-- 
View this message in context: http://www.nabble.com/Multi-Modules-and-classifier-dependencies-tf4717507s177.html#a13485595
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: Multi-Modules and classifier dependencies

Posted by Saloucious <sa...@gmail.com>.
Each time I have encoutered this behaviour, i used Java ANT Task (antrun
plugin)  to launch sources generation  or a plugin calling a external class
(eg. WSDL2Java)



Saloucious wrote:
> 
> Hi, 
> Here is an multi-module example : 
> 
> project-parent/
>   module1/
>   module2/
> 
> 
> The module1 generates 2 artifacts, one with classifier "client".
> The module2 depends on this artifiact "client".
> 
> When I run : "mvn install" from project-parent, during compilation of the
> module2, classes from the
> module1 "client" artifact are not found on the classpath.
> 
> However when i run "mvn install" from module1 then from module2, all works
> fine
> 
> 
> Any ideas ?
> 

-- 
View this message in context: http://www.nabble.com/Multi-Modules-and-classifier-dependencies-tf4717507s177.html#a13485599
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: Multi-Modules and classifier dependencies

Posted by Gerbrand van Dieijen <ge...@vandieijen.nl>.
Hello,

I have (I think) exactly this problem. I have multiple projects that produce
war artifact (service) and an artifact with classifier client. The
client-jar contains generated (stub)code, for calling the service and so is
different from the classes contained in the war file.

Here's a schematic layout:
* services, project consisting of multiple modules, ua and ac
* ua; produces ua.war and ua-client.jar (ua with classifier client)
* ac depends on ua-client.jar (ua with classifier client), produces ac.war

* cd \services\ua
* mvn install -> succeeds
* cd \services\ac
* mvn install -> succeeds

However:
* cd \services
* mvn install -> fails when maven starts building the ac project. This is
because the ua\target\classes directory seems added to the compile
class-path, instead of the ua-client.jar and ac needs some of the generated
classes as well.

Looks like a bug in Maven: solution would be, the ac would only be build,
when all build-phases of ua are finished, when the project would depend on
artifcact with a specified classifier.



Allen, Daniel wrote:
> 
> No idea from just what you've provided here. Perhaps you could upload
> your POMs to the web and so we could take a look? 
> 
> -----Original Message-----
> From: Saloucious [mailto:saloucious@gmail.com] 
> Sent: Tuesday, February 12, 2008 11:02 AM
> To: users@maven.apache.org
> Subject: Re: Multi-Modules and classifier dependencies
> 
> 
> Any ideas ?
> 
> Saloucious wrote:
>> 
>> Hi, 
>> Here is an multi-module example : 
>> 
>> project-parent/
>>   module1/
>>   module2/
>> 
>> 
>> The module1 generates 2 artifacts, one with classifier "client".
>> The module2 depends on this artifiact "client".
>> 
>> When I run : "mvn install" from project-parent, during compilation of
> the
>> module2, classes from the
>> module1 "client" artifact are not found on the classpath.
>> 
>> However when i run "mvn install" from module1 then from module2, all
> works
>> fine
>> 
>> 
>> Any ideas ?
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/Multi-Modules-and-classifier-dependencies-tp134855
> 95s177p15434511.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
> 
> 
> -- 
> This message may contain confidential, proprietary, or legally privileged
> information. No confidentiality or privilege is waived by any transmission
> to an unintended recipient. If you are not an intended recipient, please
> notify the sender and delete this message immediately. Any views expressed
> in this message are those of the sender, not those of any entity within
> the KBC Financial Products group of companies (together referred to as
> "KBC FP"). 
> 
> This message does not create any obligation, contractual or otherwise, on
> the part of KBC FP. It is not an offer (or solicitation of an offer) of,
> or a recommendation to buy or sell, any financial product. Any prices or
> other values included in this message are indicative only, and do not
> necessarily represent current market prices, prices at which KBC FP would
> enter into a transaction, or prices at which similar transactions may be
> carried on KBC FP's own books. The information contained in this message
> is provided "as is", without representations or warranties, express or
> implied, of any kind. Past performance is not indicative of future
> returns.
> 
> 
> ---------------------------------------------------------------------
> 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/Multi-Modules-and-classifier-dependencies-tp13485595s177p16046770.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: Multi-Modules and classifier dependencies

Posted by "Allen, Daniel" <Da...@kbcfp.com>.
No idea from just what you've provided here. Perhaps you could upload
your POMs to the web and so we could take a look? 

-----Original Message-----
From: Saloucious [mailto:saloucious@gmail.com] 
Sent: Tuesday, February 12, 2008 11:02 AM
To: users@maven.apache.org
Subject: Re: Multi-Modules and classifier dependencies


Any ideas ?

Saloucious wrote:
> 
> Hi, 
> Here is an multi-module example : 
> 
> project-parent/
>   module1/
>   module2/
> 
> 
> The module1 generates 2 artifacts, one with classifier "client".
> The module2 depends on this artifiact "client".
> 
> When I run : "mvn install" from project-parent, during compilation of
the
> module2, classes from the
> module1 "client" artifact are not found on the classpath.
> 
> However when i run "mvn install" from module1 then from module2, all
works
> fine
> 
> 
> Any ideas ?
> 

-- 
View this message in context:
http://www.nabble.com/Multi-Modules-and-classifier-dependencies-tp134855
95s177p15434511.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


-- 
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP"). 

This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.


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


Re: Multi-Modules and classifier dependencies

Posted by Saloucious <sa...@gmail.com>.
Any ideas ?

Saloucious wrote:
> 
> Hi, 
> Here is an multi-module example : 
> 
> project-parent/
>   module1/
>   module2/
> 
> 
> The module1 generates 2 artifacts, one with classifier "client".
> The module2 depends on this artifiact "client".
> 
> When I run : "mvn install" from project-parent, during compilation of the
> module2, classes from the
> module1 "client" artifact are not found on the classpath.
> 
> However when i run "mvn install" from module1 then from module2, all works
> fine
> 
> 
> Any ideas ?
> 

-- 
View this message in context: http://www.nabble.com/Multi-Modules-and-classifier-dependencies-tp13485595s177p15434511.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