--Environnement - CentOS Linux release 7.6.1810 (Core) - Apache Maven 3.2.5 --Java1.8.0_242 et Java1.6.0_41
$ mvn install -Dmaven.test.skip=true
...réduction...
[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
Il semble que http: // static.appfuse.org / repository
soit parti ... Je ne savais même pas que c'était arrivé
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
...réduction...
<repositories>
...↓ Supprimer ↓...
<repository>
<id>appfuse</id>
<url>http://static.appfuse.org/repository</url>
</repository>
...↑ Supprimer ↑...
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
...réduction...
J'ai appris l'option -e
dans l'erreur de l'événement 1.
To see the full stack trace of the errors, re-run Maven with the -e switch.
$ mvn install -Dmaven.test.skip=true -e
...réduction...
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"?>
...réduction...
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
...réduction...
$ 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 /
Il semble que JDK8 sera TLS v1.2 par défaut ... Je me demande si le projet est JDK6 donc il est devenu TLS v1.1? Diagnosing TLS, SSL, and HTTPS | Oracle Java Platform Group, Product Management Blog
-Dhttps.protocols = TLSv1.2
Maven échoue dans l'environnement Java7 (alerte fatale reçue: version_protocole) --Qiita
$ mvn install -Dmaven.test.skip=true -e -Dhttps.protocols=TLSv1.2
...réduction...
[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
...réduction...
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
...réduction...
jsonic
avec groupId jsonic
dans la positivité centraleRecherche avec Maven Repository: Search / Browse / Explore ...
pom.xml
<dependency>
<groupId>jsonic</groupId>
<artifactId>jsonic</artifactId>
<version>1.2.0</version>
</dependency>
jsonic
Le dépôt central n'avait pas la version jsonic 1.2.0, donc mise à niveau
pom.xml
<dependency>
<groupId>net.arnx</groupId>
<artifactId>jsonic</artifactId>
<version>1.2.7</version>
</dependency>
.m2
La cause et la contre-mesure sont [Comment gérer /home/path/.m2/repository/x.pom.part.lock (Permission refusée) dans Maven de l'environnement créé par Docker --Qiita](https: // qiita.com/ponsuke0531/items/bae4b0ef57c4afcd4b7b)
J'étais en colère quand j'ai spécifié Java 1.8 dans maven-compiler-plugin
.
$ mvn install -Dmaven.test.skip=true
...réduction...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)sur projet projet: Fatal error compiling: 1.8 est une version cible non valide-> [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>
Référence: Faire reconnaître à Maven le JDK 1.8 --blog.kymmt.com Maven semble utiliser Java s'il y a JAVA_HOME.
#Maven utilise Java1.6
$ mvn -v
...réduction...
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
...réduction...
# JAVA_HOME est aussi Java1.6
$ printenv JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk.x86_64
#J'utilise 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)
Il existe également un moyen de modifier JAVA_HOME sans le supprimer.
# JAVA_Supprimer HOME,
$ unset JAVA_HOME
# .bash_profil JAVA_Commentez les paramètres HOME
$ vi ~/.bash_profile
cat ~/.bash_profile
...réduction...
#JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
#export JAVA_HOME
#Quand réfléchi
$ source ~/.bash_profile
[1]+ Done exec ibus-daemon -dx
# JAVA_LA MAISON est partie,
$ printenv JAVA_HOME
$
#Java utilisé par Maven est Java1.Devenir 8
$ mvn -v
...réduction...
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
...réduction...
#Puis l'erreur disparaît
$ mvn install -Dmaven.test.skip=true
...réduction...
[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
...réduction...
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 provoque une erreur en raison d'un cache supplémentaire | nt mémorandum](https://blog.integrityworks.co.jp/2016/03/24/eclipse-maven-pom-xml-error /)
.m2 / repository / org / apache / maven
$ rm -rf ~/.m2/repository/org/apache/maven
$ mvn install -Dmaven.test.skip=true -e
...réduction...
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)
...réduction...
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
Dans ce cas, créez un fichier jar pour le projet dépendant hoge-framework-fuga
et recommencez.
Dans Eclipse, lorsque vous obtenez une erreur lorsque vous sélectionnez un projet> [Maven]> [Mettre à jour le projet ...]
[Problems]Erreur de tabulation
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
...réduction...
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
...réduction...
http: // maven.ow2.org / maven2 /
redirige vershttps: // repository.ow2.org / nexus / content / repositories / ow2-legacy /
lors d'un accès avec un navigateur. Passer à l'URL redirigéePom avant le changement.xml
↓ Supprimer ↓
<repository>
<id>java.net</id>
<url>http://download.java.net/maven/2/</url>
</repository>
↑ Supprimer ↑
<repository>
<id>ow2.org</id>
↓ changement d'URL ↓
<url>http://maven.ow2.org/maven2/</url>
</repository>
Quand j'ai spécifié mon propre jar qui n'était pas dans le référentiel Maven, on m'a dit qu'il n'y avait pas de pom pour ce projet parent ...
$ 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
Je fais quelque chose comme "Comment installer dans un référentiel local 1" sur le site ci-dessous. Comment spécifier une bibliothèque qui n'est pas dans le référentiel Maven dans pom.xml --grep Tips *
On m'a dit Impossible de trouver l'artefact jp.co.hoge.fuga: hoge-fuga-project: pom: 2.0.0
{Accueil de l'utilisateur} /. M2 / repository / jp / co / hoge / fuga / hoge-fuga-project / pom / 2.0.0 /
Sous le répertoire
J'ai renommé le projet pom en hoge-fuga-project-2.0.0.pom
(.xml n'est pas requis) et je l'ai copié.
Je veux connaître la cause appropriée et les contre-mesures.
Recommended Posts