maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Profile activation with maven & subsystems
Date Tue, 16 Feb 2010 07:04:18 GMT
First, the pdf is missing. Without that I'm not sure I fully understand your
thoughts.

In general, having your dependencies defined by a profile being active is
IMHO bad practice. The biggest reason for this, however possible not so
important for you if you have a "subsystem", is that if some other artifact
has a dependency to your artifact, they will not the get the correct
transitive dependencies (or different ones dependending on whatever). This
is not portability or reproducibility.

I'm wondering why you just don't simply keep the version of the depmgmt pom
(I guess you use import scope for this one?) as a property and update this
property as you need. If you want to try a different version it is possible
to override a property value from CLI. However, NEVER override for a
release! The pom should then always contain the correct config.

/Anders
On Tue, Feb 16, 2010 at 07:33, Moser, Christian <cmo@metrohm.com> wrote:

>  We’ve trouble creating a concept for maven using subsystems.
>
>
>
> In the attached pdf you can see a  maven/subsystem concept. In short, we’ve
> got a component based software which is based on quiet a lot of components
> (each component is a maven project). Those components are bundled in
> subsystems. Every subsystem features a parent pom which contains all
> components of this subsystem as a snapshot version.
>
> The snapshot versions are managed by the pom depmgmt-*dev*-*x* in all
> subsystems.
>
> The release versions are managed by the pom depmgmt-*rel*-*x* in all
> subsystems.
>
>
>
> As you can see project Z retrieves dependecy versions from depmgmt-*dev*-x
> & depmgmt-*rel*-x from the subsystems *X* & *Y*. Our plan is that we only
> want the subsystem a developer currently is working with snapshot versions,
> all other needed subsystems by the project, in this case project Z, are only
> available with their released components.
>
>
>
> e.g for working with subystem *X*, you need to set in user settings.xml:
>
> <activeProfile>subsystem-*x*</activeProfile>
>
>
>
> In this case profile subsystem-x gets activated in Z(parent) and resolves
> the snapshot dependencies versions from depmgmt-*dev*-*x* & the released
> dependencies versions from depmgmt-*rel*-*y *by dependency management.
>
>
>
> This is simular to the „reproduce example project“ I’ve uploaded in
> http://jira.codehaus.org/browse/MNG-4538. Not exactely the same, though.
>
>
>
> I was told activating dependencies by settings.xml isn’t a good idea and
> like the issue above demonstrates, it doesn’t work properly, either. So I
> could go ahead and activate the profile „subsystem-x“ by a CLI property.
> This would also work, but isn’t really comfortable to working with in IDE’s
> because you had to set this for every component by hand or the IDE won’t
> find any dependency version. Setting these properties in the settings.xml
> for profile activation won’t work, it’s also not by design.
>
>
>
> So how to easily activate profile „subsystem-*x*“ for maven & maven
> embedder in IDE’s? Do you have any best practice tip for solving our
> problem?
>
>
>
> I would really appreciate your help & please ask if my description of the
> diagram is too unclear
>
> Chris
>
>
>
>
> ---------------------------------------------------------------------
> 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