You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Craig S. Cottingham" <cr...@cottingham.net> on 2003/09/19 00:45:31 UTC

Controlling snapshot or not in POM or properties?

I have several jars I'm developing simultaneously. There are
dependencies between them (B depends on A, C depends on A and B, D
depends on B, etc.), but there are no circular dependencies.

Currently, I when I make changes to one jar, I rebuild it and any that
depend on it by hand, keeping track of the dependency order in my head.
Naturally, this is getting tedious, and depends too much on information
between my ears. Judging from messages posted here, it looks like the
multiproject plugin may be a solution.

Since all of the jars are still in flux, I'm generating snapshots with
the jar:install-snapshot goal. For the short term, it looks like I could
continue doing that by calling the multiproject:install-snapshot goal.
However, I need to start freezing these jars soon, and as each one
freezes I'd like to stop generating a snapshot for it. The problem is
that, for each frozen jar, I need to call the :install goal instead of
the :install-snapshot goal.

Is there something I can add to project.xml or project.properties that
will control whether or not a snapshot is generated? Does it help that
I've adopted the convention of ending the value of the currentVersion
tag in project.xml with "-dev" for those jars in flux, while those which
are frozen will not end with "-dev"?

-- 
Craig S. Cottingham
craig@cottingham.net


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


Re: Controlling snapshot or not in POM or properties?

Posted by "Craig S. Cottingham" <cr...@cottingham.net>.
On Fri, 2003-09-19 at 01:51, Rafal Krzewski wrote:
> Craig S. Cottingham wrote:
> 
> > Is there something I can add to project.xml or project.properties that
> > will control whether or not a snapshot is generated? Does it help that
> > I've adopted the convention of ending the value of the currentVersion
> > tag in project.xml with "-dev" for those jars in flux, while those which
> > are frozen will not end with "-dev"?
> 
> There's nothing in Maven to deal with this for you, but I think this is
> a good idea. Would you please file a Jira issue for it?

I will. I think I found a workaround in the meantime.

Add maven.xml to the basedir of every jar. (Most, if not all, of them
have a maven.xml already.) Add a goal to each one like this:

    <goal name="install">
        <attainGoal name="jar:install-snapshot" />
    </goal>

Call the multiproject:goal goal, and tell it to call "install" in all
subprojects. As a jar is frozen, change its maven.xml to attain
"jar:install" instead.

This is off the top of my head, so it may be wrong in some details. I'll
have to try this later.

-- 
Craig S. Cottingham
craig@cottingham.net


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


Re: Controlling snapshot or not in POM or properties?

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Craig S. Cottingham wrote:

> Is there something I can add to project.xml or project.properties that
> will control whether or not a snapshot is generated? Does it help that
> I've adopted the convention of ending the value of the currentVersion
> tag in project.xml with "-dev" for those jars in flux, while those which
> are frozen will not end with "-dev"?

There's nothing in Maven to deal with this for you, but I think this is
a good idea. Would you please file a Jira issue for it?

R.




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