AnsweredAssumed Answered

Issue in Alfresco SDK 3.0.1 set-up [RESOLVED]

Question asked by maqsood on Feb 16, 2018
Latest reply on Apr 18, 2018 by maqsood

Hello Folks,

 

Need an help in resolving Alfresco SDK 3.0.1 set-up for Alfresco 5.2.1 (Enterprise). I've tried setting up development environment using SDK. Getting Unauthorized Access error for accessing Alfresco Private Repository (see below). Error remains same for any of the below approach. Although I've correctly configured & placed the "settings.xml" file at my local (.m2/settings.xml/ global location(M2_HOME/apache-maven-3.5.2/conf), I'm unable to access the Repository to build the project. 

 

Alfresco version has correctly mentioned in the pom.xml as

<!-- Alfresco Platform webapp version, this is the original Alfresco webapp that will be
customized and then deployed and run by the tomcat maven plugin when
executing for example $ mvn clean install alfresco:run -->
<alfresco.platform.version>5.2.1</alfresco.platform.version>
<!-- Alfresco Share version, so we can bring in correct alfresco-share-services artifact -->
<alfresco.share.version>5.2.1</alfresco.share.version>

 

 

First Approach: Windows 10, Eclipse Oxygen (m2eclipse), JDK1.8/JRE1.8, Maven 3.5.2, Alfresco SDK 3.0.1

Second Approach: VM (CentOS) JDK1.8/JRE8, Maven 3.5.2, Alfresco SDK 3.0.1

 

NOTE: Could able to build maven project using Alfresco SDK 3.0.1 for community version in the same environments.

 

Any help or pointer will be of great help, thank you!

 

Error Trace:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T22:11:47+05:30)
Maven home: D:\git\assetmanagement\repo\EMBEDDED
Java version: 1.8.0_162, vendor: Oracle Corporation
Java home: C:\Program Files (x86)\Java\jdk1.8.0_162\jre
Default locale: en_IN, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "x86", family: "dos"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG] Imported: javax.enterprise.inject.* < plexus.core
[DEBUG] Imported: javax.enterprise.util.* < plexus.core
[DEBUG] Imported: javax.inject.* < plexus.core
[DEBUG] Imported: org.apache.maven.* < plexus.core
[DEBUG] Imported: org.apache.maven.artifact < plexus.core
[DEBUG] Imported: org.apache.maven.classrealm < plexus.core
[DEBUG] Imported: org.apache.maven.cli < plexus.core
[DEBUG] Imported: org.apache.maven.configuration < plexus.core
[DEBUG] Imported: org.apache.maven.exception < plexus.core
[DEBUG] Imported: org.apache.maven.execution < plexus.core
[DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG] Imported: org.apache.maven.model < plexus.core
[DEBUG] Imported: org.apache.maven.monitor < plexus.core
[DEBUG] Imported: org.apache.maven.plugin < plexus.core
[DEBUG] Imported: org.apache.maven.profiles < plexus.core
[DEBUG] Imported: org.apache.maven.project < plexus.core
[DEBUG] Imported: org.apache.maven.reporting < plexus.core
[DEBUG] Imported: org.apache.maven.repository < plexus.core
[DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG] Imported: org.apache.maven.settings < plexus.core
[DEBUG] Imported: org.apache.maven.toolchain < plexus.core
[DEBUG] Imported: org.apache.maven.usability < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG] Imported: org.codehaus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.* < plexus.core
[DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG] Imported: org.codehaus.plexus.component < plexus.core
[DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG] Imported: org.codehaus.plexus.container < plexus.core
[DEBUG] Imported: org.codehaus.plexus.context < plexus.core
[DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG] Imported: org.eclipse.aether.* < plexus.core
[DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG] Imported: org.eclipse.aether.collection < plexus.core
[DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG] Imported: org.eclipse.aether.graph < plexus.core
[DEBUG] Imported: org.eclipse.aether.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.installation < plexus.core
[DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG] Imported: org.eclipse.aether.repository < plexus.core
[DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG] Imported: org.eclipse.aether.spi < plexus.core
[DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG] Imported: org.eclipse.aether.version < plexus.core
[DEBUG] Imported: org.slf4j.* < plexus.core
[DEBUG] Imported: org.slf4j.helpers.* < plexus.core
[DEBUG] Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from EMBEDDED\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\maqsoodk\.m2\settings.xml
[DEBUG] Reading global toolchains from EMBEDDED\conf\toolchains.xml
[DEBUG] Reading user toolchains from C:\Users\maqsoodk\.m2\toolchains.xml
[DEBUG] Using local repository at C:\Users\maqsoodk\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\maqsoodk\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Extension realms for project repo:jar:1.0-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
[DEBUG] Using connector AetherRepositoryConnector with priority 100.0 for https://artifacts.alfresco.com/nexus/content/groups/public
[INFO] Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom
[DEBUG] Writing tracking file C:\Users\maqsoodk\.m2\repository\org\alfresco\alfresco-platform-distribution\5.2.1\alfresco-platform-distribution-5.2.1.pom.lastUpdated
[DEBUG] Using connector AetherRepositoryConnector with priority 100.0 for https://artifacts.alfresco.com/nexus/content/groups/public-snapshots
[INFO] Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom
[DEBUG] Writing tracking file C:\Users\maqsoodk\.m2\repository\org\alfresco\alfresco-platform-distribution\5.2.1\alfresco-platform-distribution-5.2.1.pom.lastUpdated
[DEBUG] Using connector AetherRepositoryConnector with priority 100.0 for https://artifacts.alfresco.com/nexus/content/groups/private
[INFO] Downloading: https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom
[DEBUG] Writing tracking file C:\Users\maqsoodk\.m2\repository\org\alfresco\alfresco-platform-distribution\5.2.1\alfresco-platform-distribution-5.2.1.pom.lastUpdated
[DEBUG] Using connector AetherRepositoryConnector with priority 100.0 for https://repo.maven.apache.org/maven2
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom
[DEBUG] Writing tracking file C:\Users\maqsoodk\.m2\repository\org\alfresco\alfresco-platform-distribution\5.2.1\alfresco-platform-distribution-5.2.1.pom.lastUpdated
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.2.1 from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized @ line 65, column 25
[ERROR] 'dependencies.dependency.version' for org.alfresco:alfresco-repository:jar is missing. @ line 77, column 21
@
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.2.1 from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized @ line 65, column 25
[ERROR] 'dependencies.dependency.version' for org.alfresco:alfresco-repository:jar is missing. @ line 77, column 21

at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR]
[ERROR] The project repo:1.0-SNAPSHOT (D:\git\assetmanagement\repo\pom.xml) has 2 errors
[ERROR] Non-resolvable import POM: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.2.1 from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized @ line 65, column 25 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.2.1 from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:197)
at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:1192)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:455)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:421)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:620)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:411)
at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.2.1 from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:193)
... 23 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.alfresco:alfresco-platform-distribution:pom:5.2.1 from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized
at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)
at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:1)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.flush(AetherRepositoryConnector.java:673)
at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:310)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 27 more
Caused by: io.takari.aether.connector.AuthorizationException: Access denied to https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/alfresco-platform-distribution/5.2.1/alfresco-platform-distribution-5.2.1.pom. Error code 401, Unauthorized
at io.takari.aether.connector.AetherRepositoryConnector.handleResponseCode(AetherRepositoryConnector.java:369)
at io.takari.aether.connector.AetherRepositoryConnector.access$8(AetherRepositoryConnector.java:363)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.resumableGet(AetherRepositoryConnector.java:603)
at io.takari.aether.connector.AetherRepositoryConnector$GetTask.run(AetherRepositoryConnector.java:453)
at io.takari.aether.connector.AetherRepositoryConnector.get(AetherRepositoryConnector.java:304)
... 29 more
[ERROR] 'dependencies.dependency.version' for org.alfresco:alfresco-repository:jar is missing. @ line 77, column 21
[ERROR]
[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/UnresolvableModelException

 

Regards,

Maqsood

Outcomes