Since you say "I always want bar to use the latest release of foo"
then you might as well release them together.

http://www.sonatype.com/books/mvnex-book/reference/multimodule.html

Or, if you feel it's not appropriate to have them be part of the same
project (for example, if 'foo' changes infrequently but 'bar' changes
frequently), you may want to automate use of the
versions-maven-plugin, which will seek out updates for you.

http://mojo.codehaus.org/versions-maven-plugin/

Zac

On Tue, Jan 4, 2011 at 4:59 AM, Leon Rosenberg <rosenberg.l...@gmail.com> wrote:
> On Tue, Jan 4, 2011 at 12:11 PM, Anders Hammar <and...@hammar.net> wrote:
>> I recommend "1.0.1", as I dislike ranges (might break reproducible builds
>> and is just to much automagic in my taste).
>> "RELEASE", "LATEST" is depracted and should not be used.
>>
>> When ever a new release is available you need to update the bar pom.
>
> Well in practice I have like 10 projects, so I will probably have to
> update 9 poms in worst case. For now I moved dependency management
> into parent.pom.
>
>>
>> Or, you could keep both projects together with an aggregating project and
>> have one release lifecycle for them (same version in both,
>> "${project.version}").
>
>  <version>${project.version}</version> ?
> I tried it in a module in an aggregated project (another one) and get
>
> Project build error: Resolving expression: '${project.version}':
> Detected the following recursive expression cycle:
> []      pom.xml /distributeme-runtime   line 1  Maven Problem
> Project build error: Resolving expression: '${version}': Detected the
> following recursive expression cycle:
> [version]       pom.xml /distributeme-runtime   line 1  Maven Problem
>
> regards
> Leon
>
>
>>
>> /Anders
>>
>> On Tue, Jan 4, 2011 at 11:46, Leon Rosenberg <rosenberg.l...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> say I have two projects,
>>> foo and bar, and bar depends on foo. My question is how should I
>>> properly declare this dependency.
>>> From the maintainers point of view (and I'm the maintainer of both) I
>>> always want bar to use the newest release of foo.
>>> So, I have a released version of foo - 1.0.1, which is known to me at
>>> the moment I'm writing the pom for bar.
>>> Do I reference foo in bar as:
>>>
>>> 1.0.1
>>> or
>>> [1.0.1,)
>>> or
>>> [1.0.1]
>>> or
>>> RELEASE
>>> or
>>> ... ?
>>>
>>> regards
>>> Leon
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>>> For additional commands, e-mail: users-h...@maven.apache.org
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

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

Reply via email to