maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <>
Subject AW: AW: AW: Artifact with different sets of dependencies switched by profiles
Date Tue, 01 Jul 2014 09:42:06 GMT
Hey ... now that looks promissing :-) 

I'll give that a spin as soon as I have time.

I didn't know that you could use variables in the scope (But I think that's just some old
info probably stored in my brain ages ago).


Von: Jörg Schaible <>
Gesendet: Sonntag, 29. Juni 2014 15:16
Betreff: Re: AW: AW: Artifact with different sets of dependencies switched by profiles

Hi Christoper,

Christofer Dutz wrote:

> Hi Ron,
> I think you got what I'm trying to do a little wrong. It's not two
> different set of dependencies, it's two different ways of linking the same
> set of libraries. If I were to translate this into java, imagine that the
> default way an application was built would be to include all Classes
> needed by the application to be bundled in the application Jar (The
> classes not needed aren't included). Now in modular applications I am able
> to switch to something exactly the same as in Java ... no code is included
> in the Application jar, but the referenced libraries are deployed in
> parallel to the application jar, so the JVM can pull them in as needed (In
> Flex this type is called rsl (runtime shared library).
> So in principal I have the same set of dependencies, but in the
> rsl-linking type these dependencies have an additional "scope=rsl"
> setting. Up until now there was only one pom with the default set of
> dependencies. If the users wanted to utilize rsl linking they would have
> to manually add each dependency and set that's scope to rsl. I would like
> to make it easier for users to switch.
> So the profiles is bad, the pom with classifier doesn't work ... I would
> really like to avoid to have something like an "flramework" artifact and
> one "framework-rsl" for the rsl linking.

What's the default value for the scope? "compile"? Then you can do all you
need with properties. You might use a profile, but it is not necessary:

Declare your dependencies just like before (either in depMgmt or directly):

============== %< =================
============== %< =================

Then you can simply redefine "flexmojo.scope" from command line. This will
also affect inherited dependencies, if they are declared in the same way in
the repository or if you delcare them in a common parent with a
dependencyManagement section. You might even overwrite the property in a

============== %< =================
============== %< =================

Unfortunately, I don't know nothing about flexmojo. If it works like in the
world of C where I can use the same libraries (.lib files) to link an
application either static or dynamically (then requiring runtime libs as
well), then it is possible to do this. Therefore is is fine for an project
creating such an application at the end of a build chain.

However, if the libraries differ if build with rsl or not, then you will
create a very bad user experience, because - just as Stephen already said -
the build process will use whatever it finds in the local repository, it
cannot separate between artifacts built with rsl or without. Your users
might get a wild mix during build time.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message