Thank you very much guys.
I've created a dependency in the pom.xml of the module_2 that uses the
package defined in the module_1 and it works well.
I don't know if it is the most efficient solution, but for now it is ok... ;)

This Maven is a bit complex at the beginning, but it is very
attractive when different development teams work together... :)
Have a nice day.

Mauro.


On Mon, Aug 20, 2012 at 9:30 PM, Brian Topping <[email protected]> wrote:
> Hi Mauro,
>
> You are very close, just need one dependency defined in the POM for module_2 
> to module_1.  So assuming you created everything with the Maven project 
> archetypes, you'll have some examples of dependencies in your POMs for jUnit, 
> just duplicate one of those in module_2 and change the GAV (group, artifact, 
> version) to the GAV of module_1 (defined at the top of that file).
>
> What you call the main_module is really just a means of project inheritance 
> and containment, it has no artifacts other than the POM itself.  POM 
> packaging projects such as this are called "aggregator" projects in the 
> documentation.
>
> Hope that helps, welcome to Maven!
>
> Brian
>
> On Aug 20, 2012, at 10:19 PM, Mauro Dragoni <[email protected]> wrote:
>
>> Good morning to everyone.
>> I am quite new to Maven and I have a problem that I am not able to solve.
>> I have my project structured in this way:
>>
>> main_module
>> |--- module_1
>> |--- module_2
>> |--- module_3
>>
>> and for each module I have created its pom.xml file.
>> I have the following questions:
>> 1) I saw that in the main_module there is not any folder for putting
>> the source code file, but from the manual I read that it is right
>> because it has been created as main project. Is it right?
>> 2) I have defined a package in "module_1" that I would like to re-use
>> in "module_2", but it does not see it. How can I do this?
>>
>> Thanks in advance for any help.
>> Have a nice day.
>>
>> Mauro.
>>
>> --
>> Dr. Mauro Dragoni
>> Ph.D. in Computer Science.
>> Post-Doc Researcher at Fondazione Bruno Kessler (FBK-IRST), Trento, Italy.
>>
>> My Research Site: https://dkm.fbk.eu/index.php/Mauro_Dragoni
>> My Business Site: http://www.dragotechpro.com
>> My News-Project Site: http://www.dragotimes.com
>>
>>
>> Confidentially Notice. This electronic mail transmission may contain
>> legally privileged and/or confidential information. Do not read this,
>> if you are not the person named to.
>> Any use, distribution, copying or disclosure by any other person is
>> strictly prohibited.
>> If you received this transmission in error, please notify the sender
>> and delete the original transmission and its attachments without
>> reading or saving it in any manner.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>



-- 
Dr. Mauro Dragoni
Ph.D. in Computer Science.
Post-Doc Researcher at Fondazione Bruno Kessler (FBK-IRST), Trento, Italy.

My Research Site: https://dkm.fbk.eu/index.php/Mauro_Dragoni
My Business Site: http://www.dragotechpro.com
My News-Project Site: http://www.dragotimes.com


Confidentially Notice. This electronic mail transmission may contain
legally privileged and/or confidential information. Do not read this,
if you are not the person named to.
Any use, distribution, copying or disclosure by any other person is
strictly prohibited.
If you received this transmission in error, please notify the sender
and delete the original transmission and its attachments without
reading or saving it in any manner.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to