cancel
Showing results for 
Search instead for 
Did you mean: 

Unresolvable Build Extension: Pamp-to-war

funwithwhips
Champ in-the-making
Champ in-the-making

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-di..."  

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-distributionSmiley Tongueom: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 paragon7Smiley Tonguearagon7-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-mmtSmiley Tongueom: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-distributionSmiley Tongueom: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

7 REPLIES 7

jpotts
World-Class Innovator
World-Class Innovator

The PKIX messages make me think maybe there is a problem with how your machine or a machine you are going through to connect to the internet is handling the SSL cert.

What happens when you try to browse directly to https://artifacts.alfresco.com/nexus/content/groups/public?

funwithwhips
Champ in-the-making
Champ in-the-making

Hi Jeff,

Thanks for replying.

I don't have any problem reaching the artifacts site. I'm taken straight to the index

jpotts
World-Class Innovator
World-Class Innovator

Can I assume that this is an out-of-the-box project created from the archetype with zero modifications? If not, please create a new, empty project, like using the repo archetype, and let's see if we can re-create the problem.

Once you create the new, empty project, run mvn -X compile and see what happens.

At the start of the output you should see some debug statements that look like this:

[DEBUG] Reading global settings from /opt/local/share/java/maven3/conf/settings.xml

[DEBUG] Reading user settings from /Users/jpotts/.m2/settings.xml

[DEBUG] Reading global toolchains from /opt/local/share/java/maven3/conf/toolchains.xml

[DEBUG] Reading user toolchains from /Users/jpotts/.m2/toolchains.xml

[DEBUG] Using local repository at /Users/jpotts/.m2/repository

Those might help you figure out what's going on. For example, maybe in your settings.xml you have something that's throwing off the build.

If the new empty project builds successfully then you can start comparing the difference between the fresh project and the one that is failing.

If the new empty project also fails, then it is probably something having to do with how you created the project or your maven settings or your local maven repo.

funwithwhips
Champ in-the-making
Champ in-the-making

Hi Jeff,

Thanks. Nearly there.

Looks like it was a certificate issue and you were right. I downloaded the alfresco certificate and then imported it into into the JRE cacerts file using the keytool. Running any maven command (including compile, clean etc.) now gets a lot further but now hangs on the same line regardless of virus on/off, using the cmd or using the poweshell:

Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/clojars/pmonks/spinner/0.3.0/spinner-...

No errors or any other messages even using debug switch.

Any clues?

jpotts
World-Class Innovator
World-Class Innovator

That artifact is not in the Alfresco artifacts repo, nor is it in Maven

central.

Where is that dependency coming from? Can you do mvn dependency:tree and

see if it gives us any clues?

funwithwhips
Champ in-the-making
Champ in-the-making

Hi Jeff,

Thanks for your patience. I really appreciate your help.

I deleted the files in my .m2 repository and generated a vanilla alfresco archetype.

I then ran the dependency tree and It hung on the same line as usual. I have included the output file if that is any help.

I tried running again in powershell. This told me that at least part of the file (656kb) is being loaded.

I had to initially reconfigure my settings.xml in m2 to get the archetype to generate at all. I added a mirror with the id of “central” pointing to the http://repo1.maven.org/maven2 repository. I don’t know if this is part of the problem or not.

Again, many thanks.

jego
Star Contributor
Star Contributor

My guess is that you are using a proxy like nexus or artifactory which does not proxy the clojars repository.

How to solve that?

1. add a proxy to your central proxy.

2. do not use the central maven proxy in your company

see AVT clojars-dependencies · Issue #253 · Alfresco/alfresco-sdk · GitHub 

I hope this helps.

Thanks

Jens