You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by youhaodeyi <yo...@gmail.com> on 2008/05/09 15:03:33 UTC

How to build sub-module without parent pom?

Sometimes a project has many sub-modules and each of them may have
sub-sub-modules. I don't want to get all the source codes. How can I work on
a sub-module without its parent pom file? 
-- 
View this message in context: http://www.nabble.com/How-to-build-sub-module-without-parent-pom--tp17147483p17147483.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: How to build sub-module without parent pom?

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
You can simply mvn deploy. You never want mvn deploy:deploy...this makes
me think you have the plugin:goal and lifecycle phases confused. You
should look at the initial chapters of http://www.sonatype.com/book to
get a better picture.

-----Original Message-----
From: youhaodeyi [mailto:youhaodeyi@gmail.com] 
Sent: Saturday, June 14, 2008 10:23 PM
To: users@maven.apache.org
Subject: Re: How to build sub-module without parent pom?


I can install the parent module into local repository. but how to deploy
it 
to remote repository? The parent module is packaging of pom. So when I
run
mvn deploy:deploy I will get this error: The packaging for this project
did
not assign a file to the build artifact.


Olivier Dehon-2 wrote:
> 
> On Fri, 2008-05-09 at 06:03 -0700, youhaodeyi wrote:
>> Sometimes a project has many sub-modules and each of them may have
>> sub-sub-modules. I don't want to get all the source codes. How can I
work
>> on
>> a sub-module without its parent pom file? 
> 
> If the parent in installed in your local repository of if it is in one
> of the remote repositories you have configured in your settings.xml,
> then you can simply check the module out and build it, the parent pom
> will be retrieved for you like any other dependency.
> 
> -Olivier
> 
> 
> ---------------------------------------------------------------------
> 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/How-to-build-sub-module-without-parent-pom--tp1714
7483p17845799.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


Re: How to build sub-module without parent pom?

Posted by youhaodeyi <yo...@gmail.com>.
I can install the parent module into local repository. but how to deploy it 
to remote repository? The parent module is packaging of pom. So when I run
mvn deploy:deploy I will get this error: The packaging for this project did
not assign a file to the build artifact.


Olivier Dehon-2 wrote:
> 
> On Fri, 2008-05-09 at 06:03 -0700, youhaodeyi wrote:
>> Sometimes a project has many sub-modules and each of them may have
>> sub-sub-modules. I don't want to get all the source codes. How can I work
>> on
>> a sub-module without its parent pom file? 
> 
> If the parent in installed in your local repository of if it is in one
> of the remote repositories you have configured in your settings.xml,
> then you can simply check the module out and build it, the parent pom
> will be retrieved for you like any other dependency.
> 
> -Olivier
> 
> 
> ---------------------------------------------------------------------
> 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/How-to-build-sub-module-without-parent-pom--tp17147483p17845799.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: How to build sub-module without parent pom?

Posted by Olivier Dehon <od...@gmail.com>.
On Fri, 2008-05-09 at 06:03 -0700, youhaodeyi wrote:
> Sometimes a project has many sub-modules and each of them may have
> sub-sub-modules. I don't want to get all the source codes. How can I work on
> a sub-module without its parent pom file? 

If the parent in installed in your local repository of if it is in one
of the remote repositories you have configured in your settings.xml,
then you can simply check the module out and build it, the parent pom
will be retrieved for you like any other dependency.

-Olivier


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


Re: How to build sub-module without parent pom?

Posted by youhaodeyi <yo...@gmail.com>.
Do you mean I should add the parent in the sub-module's dependency?


simon.kitching@chello.at wrote:
> 
> youhaodeyi schrieb:
>> Sometimes a project has many sub-modules and each of them may have
>> sub-sub-modules. I don't want to get all the source codes. How can I work
>> on
>> a sub-module without its parent pom file? 
>>   
> The parent pom just needs to be in a repository that can be seen when
> you are building the sub-module.
> 
> So if the sub-module is referencing a "released" parent pom, there
> should be no problem. The released pom will be in a repository.
> 
> If the sub-module is referencing a "snapshot" version of a parent pom,
> then someone needs to set up a snapshot repository somewhere, and deploy
> that parent pom into the snapshot repository. Then when building the
> sub-module, you just need to have that snapshot repository defined,
> either by having it in the pom.xml for the sub-module, or by adding it
> to your personal ~/.m2/settings.xml file. Of course you won't see any
> changes that people make to that parent pom until they deploy the
> modified version to the snapshot repository again.
> 
> Regards, Simon
> 
> 
> ---------------------------------------------------------------------
> 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/How-to-build-sub-module-without-parent-pom--tp17147483p17163006.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: How to build sub-module without parent pom?

Posted by "simon.kitching@chello.at" <si...@chello.at>.
youhaodeyi schrieb:
> Sometimes a project has many sub-modules and each of them may have
> sub-sub-modules. I don't want to get all the source codes. How can I work on
> a sub-module without its parent pom file? 
>   
The parent pom just needs to be in a repository that can be seen when
you are building the sub-module.

So if the sub-module is referencing a "released" parent pom, there
should be no problem. The released pom will be in a repository.

If the sub-module is referencing a "snapshot" version of a parent pom,
then someone needs to set up a snapshot repository somewhere, and deploy
that parent pom into the snapshot repository. Then when building the
sub-module, you just need to have that snapshot repository defined,
either by having it in the pom.xml for the sub-module, or by adding it
to your personal ~/.m2/settings.xml file. Of course you won't see any
changes that people make to that parent pom until they deploy the
modified version to the snapshot repository again.

Regards, Simon


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