Maven errors during protobuf jar compiling - java

During compilation of protobuf jar, when executing mvn test I got the following error:
[FATAL] Non-resolvable parent POM for com.google.protobuf:protobuf-java:2.5.0: Could not transfer artifact com.google:google:pom:1 from/to central (https://repo.maven.apache.org/maven2): java.lang.IllegalStateException and 'parent.relativePath' points at wrong local POM # line 6, column 11
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.google.protobuf:protobuf-java:2.5.0 (/home/capo/bin/protobuf-2.5.0/java/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.google.protobuf:protobuf-java:2.5.0: Could not transfer artifact com.google:google:pom:1 from/to central (https://repo.maven.apache.org/maven2): java.lang.IllegalStateException and 'parent.relativePath' points at wrong local POM # line 6, column 11 -> [Help 2]

The solution was…
Change OpenJDK to Oracle Java.

Related

Sakai build error after following installation guide

I have setup my environment for Sakai 19.0 from source following the guide on https://confluence.sakaiproject.org/pages/viewpage.action?pageId=109772882.
However when I try to build the source as detailed in 4.0 of the guide I am getting an error. Below are the logs with debug switched on:
C:\Users\Chitova\Desktop\Projects\sakai\master>mvn clean install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.sakaiproject:master:19.0 (C:\Users\Chitova\Desktop\Projects\sakai\master\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 11 -> [Help 2]
[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/UnresolvableModelException
C:\Users\Chitova\Desktop\Projects\sakai\master>mvn clean install -X
Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T19:29:23+02:00)
Maven home: C:\Users\Chitova\Desktop\Projects\apache-maven-3.2.5\bin\..
Java version: 1.8.0_111, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_111\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from C:\Users\Chitova\Desktop\Projects\apache-maven-3.2.5\bin\..\conf\settings.xml
[DEBUG] Reading user settings from C:\Users\Chitova\.m2\settings.xml
[DEBUG] Using local repository at C:\Users\Chitova\.m2\repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\Chitova\.m2\repository
[INFO] Scanning for projects...
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://repo1.maven.org/maven2
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://repo1.maven.org/maven2
Downloading: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom
[DEBUG] Writing tracking file C:\Users\Chitova\.m2\repository\org\sakaiproject\oss-parent\1\oss-parent-1.pom.lastUpdated
[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.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 11
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:416)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:672)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:663)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:253)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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 org.sakaiproject:master:19.0 (C:\Users\Chitova\Desktop\Projects\sakai\master\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. and 'parent.relativePath' points at no local POM # line 5, column 11 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:195)
at org.apache.maven.project.ProjectModelResolver.resolveModel(ProjectModelResolver.java:244)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:899)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:751)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:309)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:463)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:432)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:396)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:672)
at org.apache.maven.DefaultMaven.getProjectsForMavenReactor(DefaultMaven.java:663)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:253)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
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:191)
... 22 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.sakaiproject:oss-parent:pom:1 from/to central (http://repo1.maven.org/maven2): Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 26 more
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://repo1.maven.org/maven2/org/sakaiproject/oss-parent/1/oss-parent-1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required.
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1039)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:977)
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.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 31 more
[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
C:\Users\Chitova\Desktop\Projects\sakai\master>
What could I be doing wrong?
On January 15, 2020 the Maven Central repository disabled access through HTTP (cf. Sonatype blog).
While recent version of Maven have the correct URL for Maven Central in their Super POM older ones might still use the HTTP URL. Upgrade your Maven installation or check whether your didn't override the Maven Central repository in your settings.xml file.
The repository configuration should look like this:
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

maven install not work in eclipse and trying other plans

Error logs:
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.12.4:test (default-test) on project sample: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: Plugin org.apache.maven.plugins:maven-surefire-plugin:2.12.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 -> org.apache.maven.surefire:surefire-booter:jar:2.12.4: Failed to read artifact descriptor for org.apache.maven.surefire:surefire-booter:jar:2.12.4: Could not transfer artifact org.apache.maven.surefire:surefire-booter:pom:2.12.4 from/to central (https://repo.maven.apache.org/maven2): Received fatal alert: protocol_version -> [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/PluginResolutionException
================================================================
I try plans.
preferences > maven > user settings reset
project clean > maven update > maven clean > maven install
C:\Users\docan.m2\repository folder delete and try step2

Cannot install Hadoop: InvalidAlgorithmParameter exception

I downloaded the latest version of apache hadoop from the github repo and followed the steps here:
http://cleverowl.uk/2015/06/30/compiling-2-7-0-on-64-bit-linux/
I didn't install protobuf and java because I already have them installed on my machine.
When installing with the command:
mvn package -Pdist,native -DskipTests -Dtar
The following error appears:
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/2.5.0/maven-bundle-plugin-2.5.0.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.5.0 #
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.hadoop:hadoop-main:3.0.2 (/home/andrew/hadoop-rel-release-3.0.2/pom.xml) has 1 error
[ERROR] Unresolveable build extension: Plugin org.apache.felix:maven-bundle-plugin:2.5.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.felix:maven-bundle-plugin:jar:2.5.0: Could not transfer artifact org.apache.felix:maven-bundle-plugin:pom:2.5.0 from/to central (https://repo.maven.apache.org/maven2): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 2]
[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
Any help?

Failed to read artifact descriptor for org.eclipse.jetty:jetty-server:jar:9.0.0.v20130308

While trying to compile project via maven install am getting this error:
Failed to execute goal on project <ProjectName>: Could not resolve
dependencies for project <projectName>.war:0.0.1-SNAPSHOT: Failed to
collect dependencies at org.eclipse.jetty:jetty-server:jar:9.0.0.v20130308:
Failed to read artifact descriptor for org.eclipse.jetty:jettyserver:jar:9.0.0.v20130308:
Could not transfer artifact org.eclipse.jetty:jetty-server:pom:9.0.0.v20130308
from/to central (https://repo.maven.apache.org/maven2): connect timed out -> [Help 1] [ERROR]

Eclipse Java project build errors with Maven

I'm trying to setup a project from a svn repo on my eclipse IDE. When ever I try to build the project I'm thrown with the following error.
Errors occurred during the build. Errors running builder 'Maven
Project Builder' on project 'ats'. Could not calculate build plan:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of
its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of
its dependencies could not be resolved: Failed to read artifact
descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Could not calculate build plan: Plugin
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin
org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its
dependencies could not be resolved: Failed to read artifact descriptor
for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
In order to setup Maven for this project, I've ran the following command on cmd
mvn eclipse:eclipse
Upon running the following, Maven throws a build error with the following info.
[INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 03:10 min [INFO] Finished at:
2015-07-30T09:51:07-04:00 [INFO] Final Memory: 7M/122M [INFO]
------------------------------------------------------------------------ [ERROR] No plugin found for prefix 'eclipse' in the current project
and in the p lugin groups [org.apache.maven.plugins,
org.codehaus.mojo] available from the re positories [local
(C:\Users\user.m2\repository), central (https://repo.mave
n.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full
stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
orPrefixException
Has anyone ran in to this issue in the past that they can help me out with? I'm on Windows 7 64bit.
Thank you for reading.

Categories