--Environment - CentOS Linux release 7.6.1810 (Core) - Apache Maven 3.2.5 --Java1.8.0_242 and Java1.6.0_41
$ mvn install -Dmaven.test.skip=true
...abridgement...
[ERROR] Failed to execute goal on project ... Could not transfer artifact jsonic:jsonic:pom:1.2.0 from/to appfuse (http://static.appfuse.org/repository): static.appfuse.org: Name or service not known: Unknown host static.appfuse.org: Name or service not known -> [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
It looks like the http://static.appfuse.org/repository
is gone ... I didn't even know it was there
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
...abridgement...
<repositories>
...↓ Delete ↓...
<repository>
<id>appfuse</id>
<url>http://static.appfuse.org/repository</url>
</repository>
...↑ Delete ↑...
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
...abridgement...
I learned the -e
option in the error of event 1.
To see the full stack trace of the errors, re-run Maven with the -e switch.
$ mvn install -Dmaven.test.skip=true -e
...abridgement...
Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://repo1.maven.org/maven2/junit/junit/4.7/junit-4.7.pom. Return code is: 501, ReasonPhrase: HTTPS Required.
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.resourceExists(AbstractHttpClientWagon.java:740)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.resourceExists(AbstractHttpClientWagon.java:696)
at org.eclipse.aether.transport.wagon.WagonTransporter$PeekTaskRunner.run(WagonTransporter.java:518)
at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
at org.eclipse.aether.transport.wagon.WagonTransporter.peek(WagonTransporter.java:398)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$PeekTaskRunner.runTask(BasicRepositoryConnector.java:376)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 40 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/DependencyResolutionException
repo.maven.apache.org/maven2/
Central 501 HTTPS Required – Sonatype Support
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
...abridgement...
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
...abridgement...
$ mvn install -Dmaven.test.skip=true -e
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1902)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1074)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1320)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1347)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1331)
at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)
at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)
at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:848)
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.resourceExists(AbstractHttpClientWagon.java:708)
... 46 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/DependencyResolutionException
repo.maven.apache.org/maven2/
It seems that JDK8 defaults to TLS v1.2, but since the project is JDK6, is it TLS v1.1? Diagnosing TLS, SSL, and HTTPS | Oracle Java Platform Group, Product Management Blog
-Dhttps.protocols = TLSv1.2
Maven fails in Java7 environment (Received fatal alert: protocol_version) --Qiita
$ mvn install -Dmaven.test.skip=true -e -Dhttps.protocols=TLSv1.2
...abridgement...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.980 s
[INFO] Finished at: 2020-04-14T21:34:21+09:00
[INFO] Final Memory: 22M/962M
[INFO] ------------------------------------------------------------------------
$ mvn install -Dmaven.test.skip=true -e
...abridgement...
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact jsonic:jsonic:pom:1.2.0 from/to central (https://repo1.maven.org/maven2): Received fatal alert: protocol_version
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)
... 35 more
Caused by: org.apache.maven.wagon.TransferFailedException: Received fatal alert: protocol_version
at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1085)
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)
... 40 more
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
...abridgement...
jsonic
with groupId jsonic
in the Central repository--Similar event: Missing artifact in jar not defined in pom.xml --Qiita
Searching with Maven Repository: Search / Browse / Explore ...
pom.xml
<dependency>
<groupId>jsonic</groupId>
<artifactId>jsonic</artifactId>
<version>1.2.0</version>
</dependency>
jsonic
There was no version 1.2.0 of jsonic in the central repository, so I will upgrade it
pom.xml
<dependency>
<groupId>net.arnx</groupId>
<artifactId>jsonic</artifactId>
<version>1.2.7</version>
</dependency>
.m2
directoryThe cause and the countermeasure are [How to deal with /home/path/.m2/repository/x.pom.part.lock (Permission denied) in Maven in the environment created by Docker --Qiita](https: // qiita.com/ponsuke0531/items/bae4b0ef57c4afcd4b7b)
I was angry when I specified Java 1.8 in maven-compiler-plugin
.
$ mvn install -Dmaven.test.skip=true
...abridgement...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)on project project: Fatal error compiling: 1.8 is an invalid target release-> [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/MojoExecutionException
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
Reference: Make Maven recognize JDK 1.8 --blog.kymmt.com Maven seems to use Java if there is JAVA_HOME.
#Maven is using Java1.6
$ mvn -v
...abridgement...
Java version: 1.6.0_41, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.41.x86_64/jre
...abridgement...
# JAVA_HOME is also Java1.6
$ printenv JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk.x86_64
#I'm using Java1.8
$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
There is also a way to change JAVA_HOME without deleting it.
# JAVA_Delete HOME,
$ unset JAVA_HOME
# .bash_profile JAVA_Comment out the HOME settings
$ vi ~/.bash_profile
cat ~/.bash_profile
...abridgement...
#JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
#export JAVA_HOME
#When reflected
$ source ~/.bash_profile
[1]+ Done exec ibus-daemon -dx
# JAVA_HOME is gone,
$ printenv JAVA_HOME
$
#Java used by Maven is Java1.Become 8
$ mvn -v
...abridgement...
Java version: 1.8.0_242, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.242.b08-0.el7_7.x86_64/jre
...abridgement...
#Then the error disappears
$ mvn install -Dmaven.test.skip=true
...abridgement...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.202 s
[INFO] Finished at: 2020-04-15T11:33:39+09:00
[INFO] Final Memory: 18M/749M
[INFO] ------------------------------------------------------------------------
$ mvn install -Dmaven.test.skip=true -e
...abridgement...
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find ... was cached in the local repository, resolution will not be reattempted until the update interval of local has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 40 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/DependencyResolutionException
[[Eclipse] Pom.xml causes error due to extra cache | nt memorandum](https://blog.integrityworks.co.jp/2016/03/24/eclipse-maven-pom-xml-error /)
.m2 / repository / org / apache / maven
directory$ rm -rf ~/.m2/repository/org/apache/maven
$ mvn install -Dmaven.test.skip=true -e
...abridgement...
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for jp.co.hoge:hoge-framework-fuga:jar:3.0.0
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:337)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:525)
...abridgement...
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find ...was cached in the local repository, resolution will not be reattempted until the update interval of local has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:231)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 40 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/DependencyResolutionException
In this case, create a jar for the dependent hoge-framework-fuga
project and start over.
In Eclipse, when you get an Error when you select a project> [Maven]> [Update Project ...]
[Problems]Tab error
Failure to transfer javax.resource:connector:jar:1.0 from http://maven.ow2.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of ow2.org has elapsed or updates are forced. Original error: Could not transfer artifact javax.resource:connector:jar:1.0 from/to ow2.org (http://maven.ow2.org/maven2/): Cannot access http://maven.ow2.org/maven2/ with type legacy using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory
...abridgement...
Failure to transfer javax.resource:connector:jar:1.0 from http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of java.net has elapsed or updates are forced. Original error: Could not transfer artifact javax.resource:connector:jar:1.0 from/to java.net (http://download.java.net/maven/2/): Cannot access http://download.java.net/maven/2/ with type legacy using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory
...abridgement...
http://maven.ow2.org/maven2/
redirects to https://repository.ow2.org/nexus/content/repositories/ow2-legacy/
when accessed with a browser Change to the redirected URLhttp://download.java.net/maven/2/
because it will be We're sorry, the page you requested was not found.
when accessed with a browser.Pom before change.xml
↓ Delete ↓
<repository>
<id>java.net</id>
<url>http://download.java.net/maven/2/</url>
</repository>
↑ Delete ↑
<repository>
<id>ow2.org</id>
↓ URL change ↓
<url>http://maven.ow2.org/maven2/</url>
</repository>
When I specified my own jar that wasn't in the Maven repository, I was told that there was no pom for that parent project ...
$ mvn install -Dmaven.test.skip=true -e
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact jp.co.hoge.fuga:hoge-fuga-project:pom:2.0.0 in local (file:/home/fuga/hoge-fuga-project/hoge-framework-core/../repo)
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39)
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)
... 40 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/DependencyResolutionException
I'm doing something like "How to install in a local repository 1" on the site below. How to specify a library that is not in the Maven repository in pom.xml --grep Tips *
I was told Could not find artifact jp.co.hoge.fuga: hoge-fuga-project: pom: 2.0.0
{User Home} /. M2 / repository / jp / co / hoge / fuga / hoge-fuga-project / pom / 2.0.0 /
Under the directory
I renamed the project pom to hoge-fuga-project-2.0.0.pom
(.xml is not needed) and copied it.
I want to know the proper cause and countermeasures.
Recommended Posts