You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maven User <ma...@gmail.com> on 2012/01/27 17:43:05 UTC

Maven release plugin suggestions

Hi all -

I have a quick question about the release plugin.

If your aggregate pom is NOT a parent pom, can you execute the release from
there?

I keep running into an issue where because my modules are not directories
under the aggregate pom, the commit and tag of the scm project is failing.

For instance:

aggregate/pom.xml
= module -> ../jar

in the jar/pom.xml it has an entirely different parent.

Any suggestions?

I'm just trying to use the aggregate pom to group up things I need the
maven release to run against....

Re: Maven release plugin suggestions

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 30.01.2012 17:46, schrieb Maven User:
> I think the difference between the drools plugin and what I'm trying to do
> is, I'm trying to manage several different maven modules that are released
> together, but live in different repositories.
>From my experience, this does not work. If you want to release it
together, you must version it together as one repository.

Your setup *might* work with SVN and other, directory/file-based version
control systems. AFAIK, they won't work with repository-based DVCS like
hg and git.

If you want to release them together, put all your modules plus the
aggregator pom into *the same* hg/git repository.

If you want to release them independently, make each module a dedicated
repository.

Best regards

Ansgar

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


Re: Maven release plugin suggestions

Posted by Maven User <ma...@gmail.com>.
Cool -

Here's the exact error:

hg commit --message "[maven-release-plugin] prepare release
some-new-tag-cool-jar-aggregate-1.0" C:\views\buildsource\jar-A\pom.xml"
abort: C:\views\buildsource\jar-A\pom.xml not under root

I think the difference between the drools plugin and what I'm trying to do
is, I'm trying to manage several different maven modules that are released
together, but live in different repositories.

So when my aggregate project which lists the modules runs, it's aggregating
several scm targets into one directory.

Does that make sense (it makes sense typing it, but reading it, not so
much)?

On Fri, Jan 27, 2012 at 7:33 PM, Ansgar Konermann <
ansgar.konermann@googlemail.com> wrote:

> Am 27.01.2012 18:02, schrieb Maven User:
> > But the push is trying to push the "aggregate" repository, NOT the "jar"
> > repository.
> >
> > Any suggestions?
>
> AFAIK, that's the way it works with DVCS like Git. Not done a release
> with a HG-based project though.
>
> DVCS version the whole repository, not single files. So if you push
> something, you always push the whole repo.
>
> This means, you'll have to release everything from a repo or nothing.
> You cannot release "only a subdirectory of an aggregator project".
>
> If you're using a multimodule project with an aggregator pom, you'll get
> all the child modules released at once. AFAIK, you cannot release a
> single child module.
>
> Kind regards
>
> Ansgar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven release plugin suggestions

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 27.01.2012 18:02, schrieb Maven User:
> But the push is trying to push the "aggregate" repository, NOT the "jar"
> repository.
>
> Any suggestions?

AFAIK, that's the way it works with DVCS like Git. Not done a release
with a HG-based project though.

DVCS version the whole repository, not single files. So if you push
something, you always push the whole repo.

This means, you'll have to release everything from a repo or nothing.
You cannot release "only a subdirectory of an aggregator project".

If you're using a multimodule project with an aggregator pom, you'll get
all the child modules released at once. AFAIK, you cannot release a
single child module.

Kind regards

Ansgar

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


Re: Maven release plugin suggestions

Posted by Maven User <ma...@gmail.com>.
I tried adding "*commitByProject<http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#commitByProject>"
and that got me a bit further.

I can see it commit properly, but the push step is failing because it's
trying to push a repo that hasn't had any changes in it yet.

For instance, during the release prepare step, the build is started in the
"aggregate" directory and a pom in ../jar is altered.

But the push is trying to push the "aggregate" repository, NOT the "jar"
repository.

Any suggestions?
*
On Fri, Jan 27, 2012 at 11:43 AM, Maven User <ma...@gmail.com> wrote:

> Hi all -
>
> I have a quick question about the release plugin.
>
> If your aggregate pom is NOT a parent pom, can you execute the release
> from there?
>
> I keep running into an issue where because my modules are not directories
> under the aggregate pom, the commit and tag of the scm project is failing.
>
> For instance:
>
> aggregate/pom.xml
> = module -> ../jar
>
> in the jar/pom.xml it has an entirely different parent.
>
> Any suggestions?
>
> I'm just trying to use the aggregate pom to group up things I need the
> maven release to run against....
>

Re: Maven release plugin suggestions

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 28.01.2012 00:23, schrieb Maven User:
> Really?
>
> Every time I do this, I get a message about things NOT being in the root
> project...

Could you possibly post the actual error message?

>
> Are you using mercurial or git or something entirely different?

Git. If you want, have a look at an example git repository:

https://github.com/maven-drools/plugin.maven-drools-plugin

Many of the child modules use a standard parent pom.


Regards

Ansgar

>
> I'm slowly starting to think this is an issue with the mercurial scm
> implementation, NOT the release plugin....
>
> Oh and THANK you for your reply!  I appreciate it!
>
> On Fri, Jan 27, 2012 at 5:50 PM, Ansgar Konermann <
> ansgar.konermann@googlemail.com> wrote:
>
>> Am 27.01.2012 17:43, schrieb Maven User:
>>> If your aggregate pom is NOT a parent pom, can you execute the release
>> from
>>> there?
>> Yes. This works. Doing it all the time in my projects. You can use any
>> POM which is available from a Maven repository as parent of your child
>> modules. It does not need to be the aggregator pom.
>>
>> Best regards
>>
>> Ansgar
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>


Re: Maven release plugin suggestions

Posted by Maven User <ma...@gmail.com>.
Really?

Every time I do this, I get a message about things NOT being in the root
project...

Are you using mercurial or git or something entirely different?

I'm slowly starting to think this is an issue with the mercurial scm
implementation, NOT the release plugin....

Oh and THANK you for your reply!  I appreciate it!

On Fri, Jan 27, 2012 at 5:50 PM, Ansgar Konermann <
ansgar.konermann@googlemail.com> wrote:

> Am 27.01.2012 17:43, schrieb Maven User:
> > If your aggregate pom is NOT a parent pom, can you execute the release
> from
> > there?
> Yes. This works. Doing it all the time in my projects. You can use any
> POM which is available from a Maven repository as parent of your child
> modules. It does not need to be the aggregator pom.
>
> Best regards
>
> Ansgar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven release plugin suggestions

Posted by Ansgar Konermann <an...@googlemail.com>.
Am 27.01.2012 17:43, schrieb Maven User:
> If your aggregate pom is NOT a parent pom, can you execute the release from
> there?
Yes. This works. Doing it all the time in my projects. You can use any
POM which is available from a Maven repository as parent of your child
modules. It does not need to be the aggregator pom.

Best regards

Ansgar

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