cancel
Showing results for 
Search instead for 
Did you mean: 

Dependency Management in distro

bernd_ruecker
Champ in-the-making
Champ in-the-making
Hey guys.

Since we currently include Cycle in the distro we faced the fact, that dependency management in the distro (Ant Build) is completely decoupled from Maven-Dependency-Management. This causes a lot of trouble, since you have to do dependency management twice and always face missing jar problems…

We discussed it briefly and we think, that is crap 🙂 Isn't there a way to use the Maven dependencies correctly wen building the distro or what was the reason for skipping that? Maybe it is enough to handle some SPECIAL requirements in the ant build an use the stuff from Maven otherwise?

What do you think?

Cheers
Bernd
8 REPLIES 8

tombaeyens
Champ in-the-making
Champ in-the-making
You are talking about the setup installer scripts that install Activiti into e.g. Tomcat right?  Afaict, maven doesn't contain the knowledge on which are the precise runtime dependencies.  Maven also doesn't know which libs are already in tomcat or e.g. jboss.   So I don't see from the top of my head how we can do that with maven.  But I didn't gave it much thought.  So maybe there is a solution that I overlooked.  Do you know how we could do it with maven in a way that later also we can deal with installation setup of other app servers then just tomcat?

bernd_ruecker
Champ in-the-making
Champ in-the-making
I think the way should be somehow to define (in the pom.xml or some other place) which dependency is provided in which environment. And then this can be excluded by maven or deleted by ant.

And there could be a Maven way of doing it, since it is not a new problem. I try to ask a maven god I know…

bernd_ruecker
Champ in-the-making
Champ in-the-making
The recommondation was what I had in mind as well: use different profiles and profile dependent dependencies (http://maven.apache.org/pom.html#Profiles). Could that be a Maven compatible solution? For the long run I think it would be the cleaner alternative.

tombaeyens
Champ in-the-making
Champ in-the-making
First question is still unanswered.  If this is about stuff happening in the setup, then there is no maven at that point.  So maven can't help us there.  There is only ant in the setup.

bernd_ruecker
Champ in-the-making
Champ in-the-making
But doesn't the setup calls the maven build?
Another solution could be to have different target artifact pre-built by maven and then include the right ones in the distro?

Maybe not that easy, but I think worth a try, since currently it is really a bit hacky. And by the way: Currently the activiti-engine.jar ends up in the Tomcat lib folder, which I think is not really nice, or?

tombaeyens
Champ in-the-making
Champ in-the-making
But doesn't the setup calls the maven build?

Nope.  Setup is based on ant only.

Another solution could be to have different target artifact pre-built by maven and then include the right ones in the distro?

Maybe not that easy, but I think worth a try, since currently it is really a bit hacky. And by the way: Currently the activiti-engine.jar ends up in the Tomcat lib folder, which I think is not really nice, or?

Surely not that easy 😞  First it's hard to get all that fine grained semantics in the pom.  Maven is not very flexible in that respect, but probably maven hackers will always find some way of combining profiles, properties and executions to make it work 🙂  Then you don't want to duplicate jars in the distro.  So basically you don't want the lib packages but *the dependency information* to be somehow passed to the ant setup scripts so that it can automatically from the maven distill the right stuff.

I think it's going to be waaaaaaaaaayyyyyyyyyyyy 🙂 easier to deal with the setup scripts separately then trying to get all that automated based on the poms.

bernd_ruecker
Champ in-the-making
Champ in-the-making
Hmm, and if we at least do it the other way round: Just REMOVING the libraries which we do not need for a place (instead of deleting all and re-adding)? Then at least transitive dependencies are resolved and added automatically? But maybe that's much more LOC in the build.xml?

tombaeyens
Champ in-the-making
Champ in-the-making
Can you be more precise about what you want to duo in mvn, what in ant and which problem that solves?