DPascalBernard / maven-alfresco-archetypes

Automatically exported from code.google.com/p/maven-alfresco-archetypes
0 stars 0 forks source link

Clean the way modules depend on each other #152

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Every time we change the version of the project in the pom files (i.e. every 
time we release), the build fails.
That's because there is a kind of circular dependency between modules: 
alfresco-maven-plugin is part of the build, but is referenced in an upstream 
project.

The workaround is to deploy the missing bits once, so that the next build can 
download them:

cd plugins/alfresco-maven-plugin && mvn deploy
mvn deploy -N

Original issue reported on code.google.com by samuel.l...@alfresco.com on 6 Nov 2013 at 12:30

GoogleCodeExporter commented 8 years ago
Sam this seems to be a bug in Maven, rather than a circular dependency (which 
would make the build fail every time, not just on version change).

The problem is that Maven does not resolve projects in the reactor (which would 
have the correct version) if you are depending on them.

Really what's happening here is that:

- alfresco-sdk-parent uses the alfresco-maven-plugin (to provide AMP support)
- alfresco-sdk-parent has a parent reference on alfresco-lifecycle-aggregator
- when building from alfresco-lifecycle-aggregator, it's required to:
    - mvn clean install the alfresco-maven-plugin
    - mvn clean install --non-recursive of the alfresco-lifecycle-aggregator
    - mvn clean install the whole project

I am not sure how we can fix this since the dependency chain if functionally 
required. One more thing: unless you use the -Prelease profile you actually 
have to specify the -DaltDeploymentRepository property to actually be able to 
deploy.

Original comment by colum...@gmail.com on 17 Nov 2013 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by colum...@gmail.com on 17 Nov 2013 at 3:19

GoogleCodeExporter commented 8 years ago
Can we close this issue, now that the -Prelease is part of the parent POM?

Original comment by maurizio...@alfresco.com on 3 Jul 2014 at 11:06

GoogleCodeExporter commented 8 years ago
Lets' bump the version to 2.0, and see how it goes, if you don't mind... 
I'm not quite sure I had fully understood what was going on.

Original comment by samuel.l...@alfresco.com on 3 Jul 2014 at 11:56

GoogleCodeExporter commented 8 years ago
Just bumped the version to 2.0.0-SNAPSHOT, let's how it goes.

Original comment by colum...@gmail.com on 17 Jul 2014 at 10:11

GoogleCodeExporter commented 8 years ago
Scheduling for 2.x and leaving this with you Sam :)

Original comment by colum...@gmail.com on 17 Jul 2014 at 10:12

GoogleCodeExporter commented 8 years ago
Build went fine - let's get rid of this issue :-)
Thanks

Original comment by samuel.l...@alfresco.com on 18 Jul 2014 at 8:49