maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: One project depends on another, how to declare dependency, again...
Date Tue, 04 Jan 2011 13:14:15 GMT
Using depMgmt to specify the version is the way to go when you have several
projects where you want to ensure that the exact same version is used.

No clue about your problem with project.version. But there seems to be a
cyclic issue.

/Anders

On Tue, Jan 4, 2011 at 13:59, Leon Rosenberg <rosenberg.leon@gmail.com>wrote:

> On Tue, Jan 4, 2011 at 12:11 PM, Anders Hammar <anders@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.leon@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-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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message