philipmeadows / alfresco-webscript-manifold-connector

Alfresco Solr API Repository Connector for Apache ManifoldCF
11 stars 11 forks source link

Getting "Not authorized , ReasonPhrase:Unauthorized" Error while building. #3

Closed lalitjangra closed 10 years ago

lalitjangra commented 10 years ago

Hi All,

I have cloned the source locally & I am trying to build this connector but i am getting below error saying about alfresco private repo & un-authorization. Can you help?

Downloading: file://C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-master/maven-repo/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: http://repo.fusesource.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/private/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: http://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: http://repository.jboss.org/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloading: http://download.java.net/maven/2/org/jvnet/staxex/stax-ex/maven-metadata.xml Downloaded: http://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/maven-metadata.xml (707 B at 0.3 KB/sec) Downloaded: http://download.java.net/maven/2/org/jvnet/staxex/stax-ex/maven-metadata.xml (411 B at 0.2 KB/sec) Downloaded: http://repository.jboss.org/nexus/content/groups/public/org/jvnet/staxex/stax-ex/maven-metadata.xml (583 B at 0.2 KB/sec) [WARNING] Could not transfer metadata org.jvnet.staxex:stax-ex/maven-metadata.xml from/to alfresco-private-repository (https://artifacts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. Downloading: http://repo.fusesource.com/nexus/content/groups/public/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom Downloading: https://artifacts.alfresco.com/nexus/content/groups/public-snapshots/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom Downloading: file://C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-master/maven-repo/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom Downloading: https://artifacts.alfresco.com/nexus/content/groups/private/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom Downloading: http://repo.maven.apache.org/maven2/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.pom [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Alfresco Webscript Connector Parent POM ........... FAILURE [45.609s] [INFO] Alfresco Webscript Connector ...................... SKIPPED [INFO] Alfresco Instance ................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 49.890s [INFO] Finished at: Wed Jan 15 10:52:44 IST 2014 [INFO] Final Memory: 9M/182M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project mcf-alfresco-webscript-connector-parent: Could not resolve dependencies for project org.apache.manifoldcf:mcf-alfresco-webscript-connector -parent:pom:1.1.1: Failed to collect dependencies for [org.alfresco:alfresco-solr-integration:jar:4.2.c (compile), org.alfresco:alfresco-core:jar:4.2.c (compile), org.apache.manifo ldcf:mcf-core:jar:1.1.1 (provided), org.apache.manifoldcf:mcf-agents:jar:1.1.1 (provided), org.apache.manifoldcf:mcf-pull-agent:jar:1.1.1 (provided), org.apache.manifoldcf:mcf-ui-c ore:jar:1.1.1 (provided)]: Failed to read artifact descriptor for woodstox:wstx-asl:jar:3.2.7: Could not transfer artifact woodstox:wstx-asl:pom:3.2.7 from/to alfresco-private-repo sitory (https://artifacts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1] [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/DependencyResolutionException

maoo commented 10 years ago

Hi, sorry for the lack of support on the code; we worked offline on a different implementation that I've shared today (check branch custom-webscripts) - https://github.com/maoo/alfresco-webscript-manifold-connector/tree/custom-webscripts

I'm working on the branch, so expect more stuff in the future; on the other hand, the master code will stay as it is until we collect feedback on the new implementation strategy.

Both implementation are to be considered still very experimental. Thank you!

lalitjangra commented 10 years ago

Thanks, i have tried to use https://github.com/maoo/alfresco-webscript-manifold-connector/tree/custom-webscripts to build webscripts based connector but still i am getting similar error about authorization.

C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-custom-webscripts>mvn clean install -e [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... Downloading: https://artifacts.alfresco.com/nexus/content/groups/private/org/alfresco/maven/alfresco-sdk-parent/1.0.2/alfresco-sdk-parent-1.0.2.pom [ERROR] The build could not read 1 project -> [Help 1] org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM: Could not transfer artifact org.alfresco.maven:alfresco-sdk-parent:pom:1.0.2 from/to alfresco-private (https://artifacts.alfresco.com/nexus/conte nt/groups/private): Not authorized , ReasonPhrase:Unauthorized. and 'parent.relativePath' points at wrong local POM @ line 9, column 13

    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
    at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[ERROR] [ERROR] The project org.alfresco.consulting.indexer:alfresco-indexer-parent:0.5.3-SNAPSHOT (C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-custom-webscripts\ pom.xml) has 1 error [ERROR] Non-resolvable parent POM: Could not transfer artifact org.alfresco.maven:alfresco-sdk-parent:pom:1.0.2 from/to alfresco-private (https://artifacts.alfresco.com/nexus/c ontent/groups/private): Not authorized , ReasonPhrase:Unauthorized. and 'parent.relativePath' points at wrong local POM @ line 9, column 13 -> [Help 2] org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact org.alfresco.maven:alfresco-sdk-parent:pom:1.0.2 from/to alfresco-private (https://artifac ts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:159) at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813) at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:410) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:379) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:343) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636) at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.alfresco.maven:alfresco-sdk-parent:pom:1.0.2 from/to alfresco-private (https: //artifacts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286) at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155) ... 22 more Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact org.alfresco.maven:alfresco-sdk-parent:pom:1.0.2 from/to alfresco-private (https://ar tifacts.alfresco.com/nexus/content/groups/private): Not authorized , ReasonPhrase:Unauthorized. at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:951) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669) at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Not authorized , ReasonPhrase:Unauthorized. at org.apache.maven.wagon.shared.http4.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:932) at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116) at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:601) ... 4 more [ERROR] [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/UnresolvableModelException

maoo commented 10 years ago

The current implementation relies on Alfresco Enterprise, which needs authenticated access to artifacts.alfresco.com

I will switch to the Community version ASAP; in the meanwhile, try to switch:

If you want to have more info, you can check this blogpost - http://blog.session.it/2013/04/10/maven-alfresco-enterprise

lalitjangra commented 10 years ago

Thanks Maoo,

I have changed from priavte to public & from 4.1.4 to 4.2.e but i am getting different errors this time about unresolved dependencies. I assume these are again due to enterprise login.

C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-custom-webscripts>mvn clean install -e [INFO] Error stacktraces are turned on. [INFO] Scanning for projects... [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: Failure to find org.alfresco.enterprise:alfresco-platform-distribution:pom:4.2.e in http://repo.fusesource.com/nexus/content/groups/public/ was c ached in the local repository, resolution will not be reattempted until the update interval of fusesource has elapsed or updates are forced @ line 44, column 21 [ERROR] 'dependencies.dependency.version' for org.alfresco.enterprise:alfresco-repository:jar is missing. @ line 55, column 21 [ERROR] 'dependencies.dependency.version' for org.alfresco.enterprise:alfresco-remote-api:jar is missing. @ line 59, column 21 [ERROR] 'dependencies.dependency.version' for org.alfresco.enterprise:alfresco-remote-api:jar:config is missing. @ line 64, column 21

    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
    at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
    at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

[ERROR] [ERROR] The project org.alfresco.consulting.indexer:alfresco-indexer-webscripts:0.5.3-SNAPSHOT (C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-custom-webscri pts\alfresco-indexer-webscripts\pom.xml) has 4 errors [ERROR] Non-resolvable import POM: Failure to find org.alfresco.enterprise:alfresco-platform-distribution:pom:4.2.e in http://repo.fusesource.com/nexus/content/groups/public/ w as cached in the local repository, resolution will not be reattempted until the update interval of fusesource has elapsed or updates are forced @ line 44, column 21 -> [Help 2] org.apache.maven.model.resolution.UnresolvableModelException: Failure to find org.alfresco.enterprise:alfresco-platform-distribution:pom:4.2.e in http://repo.fusesource.com/nexus/c ontent/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of fusesource has elapsed or updates are forced at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:159) at org.apache.maven.model.building.DefaultModelBuilder.importDependencyManagement(DefaultModelBuilder.java:953) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:400) at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:371) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:560) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:566) at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:352) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636) at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:585) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:234) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find org.alfresco.enterprise:alfresco-platform-distribution:pom:4.2.e in http://repo.fusesource.co m/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of fusesource has elapsed or updates are forced at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:286) at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:155) ... 21 more Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find org.alfresco.enterprise:alfresco-platform-distribution:pom:4.2.e in http://repo.fusesource.com/ne xus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of fusesource has elapsed or updates are forced at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:230) at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:204) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:427) ... 25 more [ERROR] 'dependencies.dependency.version' for org.alfresco.enterprise:alfresco-repository:jar is missing. @ line 55, column 21 [ERROR] 'dependencies.dependency.version' for org.alfresco.enterprise:alfresco-remote-api:jar is missing. @ line 59, column 21 [ERROR] 'dependencies.dependency.version' for org.alfresco.enterprise:alfresco-remote-api:jar:config is missing. @ line 64, column 21 [ERROR] [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/UnresolvableModelException C:\Users\lalit.jangra\Desktop\alfresco-webscript-manifold-connector-custom-webscripts>

maoo commented 10 years ago

Hi lalitjangra, as you can see I've pushed some changes to the custom-webscripts branch; I basically fixed SQL queries in order to work also with 4.2.x ; unfortunately tests are not working with latest versions (see issue #7), but I'm confident that webscripts would still work as it seems to be an issue with the TestSuite Alfresco libraries.

Please let me know if you're able to run the tests successfully (mvn clean test) and - in case - feel free to close the issue.

Thanks for the feedback! mao

maoo commented 10 years ago

Hi @lalitjangra , can we close this? TIA

lalitjangra commented 10 years ago

Hi Maurizio,

Yes we can close this.

Regards.

On Mon, Jun 16, 2014 at 10:42 PM, Maurizio Pillitu <notifications@github.com

wrote:

Hi @lalitjangra https://github.com/lalitjangra , can we close this? TIA

— Reply to this email directly or view it on GitHub https://github.com/maoo/alfresco-webscript-manifold-connector/issues/3#issuecomment-46241906 .

Regards, Lalit Jangra.