AnsweredAssumed Answered

Unresolvable Build Extension: Pamp-to-war

Question asked by funwithwhips on Nov 3, 2016
Latest reply on Nov 10, 2016 by jego

I have a development copy of our corporate DMS Alfresco 5.1.f community edition on Win7 64bit and am using Maven 3.3.9 alongside jdk8.0_112.

 

I'm new to alfresco, java and maven but have been developing in c# and php for over 12 years.  I have been following the SDK setup and trying to get this to work for about 2 days now with no success. 

 

Problem 1:  When I first tried to generate an alfresco archetype I received the error "No plugin found for prefix 'archetype' in the current project and in the  plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories"  

 

This was a bit puzzling as I am NOT using a proxy, which seems the accepted solution (I double checked using tracert), but I was eventually able to get the archetype to generate by adding the repo1.maven path as a mirror to my .m2 settings.xml file. This worked fine and I generated the archetype successfully. 

 

Problem 2:  I tried running the command mvn integration-test "-Pamp-to-war" (in the windows PS). Everything downloads fine for about two minutes, and then it falls over with the error message:

 

"[ERROR] Unresolveable build extension: Plugin org.alfresco.maven.plugin:alfresco-maven-plugin:2.2.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.alfresco.maven.plugin:alfresco-maven-plugin:jar:2.2. 0 -> org.alfresco:alfresco-mmt:jar:5.1.e @" 

 

This always occurs at the same line in the script: 

 

"Downloading: http://repo1.maven.org/maven2/org/alfresco/alfresco-platform-distribution/5.1.e/alfresco-platform-distribution-5.1.e.pom"  

 

I checked the path in my browser and the alfresco-platform-distribution directory doesn't appear to exist. I have no idea how maven resolves dependencies, but this doesn't look right.

 

I have tried various settings, edited the pom file and changed versions to 5.1.f, even completely starting again rebuilding maven and recreating the environmental variables. It always falls over at the same line.  I am using v2.2.0 and have tried building All-in-one, repository and AMP options. I have even tried the same procedure in the cmd window in case it was a PS issue.

 

Any help really appreciated here. After two days of grinding the gears I can find nothing in Stack Overflow, and I'm getting nowhere. I understand the problem is somewhere in my configuration or settings but I can't understand why this doesn't work straight from the box.

 

The rest of the stack:

 

[ERROR] Non-resolvable import POM: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.1.e fro

m/to alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public): sun.security.validator.ValidatorExcep

tion: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certif

ication path to requested target @ line 69, column 25

@

[ERROR] The build could not read 1 project -> [Help 1]

[ERROR]

[ERROR]   The project paragon7:paragon7-repo:1.0-SNAPSHOT (C:\alfresco_dev\paragon7-repo\pom.xml) has 2 errors

[ERROR]     Unresolveable build extension: Plugin org.alfresco.maven.plugin:alfresco-maven-plugin:2.2.0 or one of its de

pendencies could not be resolved: Failed to collect dependencies at org.alfresco.maven.plugin:alfresco-maven-plugin:jar:

2.2.0 -> org.alfresco:alfresco-mmt:jar:5.1.e: Failed to read artifact descriptor for org.alfresco:alfresco-mmt:jar:5.1.e

: Could not transfer artifact org.alfresco:alfresco-mmt:pom:5.1.e from/to sonatype-public (http://oss.sonatype.org/conte

nt/groups/public): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.

SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 2]

[ERROR]     Non-resolvable import POM: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.1.e

from/to alfresco-public (https://artifacts.alfresco.com/nexus/content/groups/public): sun.security.validator.ValidatorE

xception: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid ce

rtification path to requested target @ line 69, column 25 -> [Help 3]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

[ERROR] [Help 3] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Outcomes