DPascalBernard / maven-alfresco-archetypes

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

alfresco-maven-plugin InstallMojo never finds amp dependencies #99

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create new maven war project
2. Add vti-module amp as dependency (found in artifacts.alfresco.com repo)
3. Configure install goal of alfresco-maven-plugin
4. Run mvn clean install

What is the expected output? What do you see instead?
Expected output should be MMT reporting that vti-module is imported into war 
file. Instead, alfresco-maven-plugin outputs 'No WAR file found in <war file> - 
skipping overlay.'

What version of the product are you using? On what operating system?
alfresco-maven-plugin 0.6-SNAPSHOT
maven 3.0.4
Arch Linux

Please provide any additional information below.
The issue stems from line 108 of org.alfresco.maven.mmt.InstallMojo.java. 
MavenProject.getRuntimeArtifacts() is deprecated in maven 3 and also has a TODO 
to not do a classpath check in this call (see  
http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/ap
ache/maven/project/MavenProject.java?view=markup). Since the method is 
deprecated it is unlikely the TODO will be fixed.

So because amp files will never pass the classpath check the call to 
MavenProject.getRuntimeArtifacts() on line 108 will never return a list that 
contains anything with a type of "amp". Consequently, the plugin will never 
pick up amps that are dependencies.

Fix could be to use MavenProject.getArtifacts() and then check for type.

Workaround for now is to use just the singleAmp parameter.

Original issue reported on code.google.com by dmorga...@gmail.com on 2 Oct 2012 at 5:36

GoogleCodeExporter commented 9 years ago
Maurizio, can you check if this is fixed with 0.7?

This should work for final 1.0.0 release of the SDK.

Original comment by colum...@gmail.com on 30 Oct 2012 at 12:27

GoogleCodeExporter commented 9 years ago
This is fixed and tested in 1.0.

Original comment by colum...@gmail.com on 4 Nov 2012 at 11:57