使用maven運行時出現生成錯誤。下面是錯誤代碼片段。原因:不是v4.0.0 POM
Caused by: java.io.FileNotFoundException: http://repo1.maven.org/maven2/com/day/jcr/vault/maven-vault-plugin/0.0.10/maven-vault-plugin-0.0.10.pom
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
... 30 more
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[INFO] Unable to find resource 'com.day.jcr.vault:maven-vault-plugin:pom:0.0.10' in repository central (http://repo1.maven.org/maven2)
[DEBUG] Trying repository adobe-public
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG] Checking for pre-existing User-Agent configuration.
[DEBUG] Adding User-Agent configuration.
[DEBUG] Connecting to repository: 'adobe-public' with url: 'http://repo.adobe.com/nexus/content/groups/public/'.
Downloading: http://repo.adobe.com/nexus/content/groups/public//com/day/jcr/vault/maven-vault-plugin/0.0.10/maven-vault-plugin-0.0.10.pom
[DEBUG] attempting to create parent directories for destination: maven-vault-plugin-0.0.10.pom.tmp
178b downloaded (maven-vault-plugin-0.0.10.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '81ffbd1712afe8cdf138b570c0fc9934742c33c1'; remote = '<html>
<head><title>301' - RETRYING
Downloading: http://repo.adobe.com/nexus/content/groups/public//com/day/jcr/vault/maven-vault-plugin/0.0.10/maven-vault-plugin-0.0.10.pom
[DEBUG] attempting to create parent directories for destination: maven-vault-plugin-0.0.10.pom.tmp
178b downloaded (maven-vault-plugin-0.0.10.pom)
[WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '81ffbd1712afe8cdf138b570c0fc9934742c33c1'; remote = '<html>
<head><title>301' - IGNORING
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[DEBUG] Artifact resolved
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: com.day.jcr.vault:maven-vault-plugin
POM Location: C:\Users\username\.m2\repository\com\day\jcr\vault\maven-vault-plugin\0.0.10\maven-vault-plugin-0.0.10.pom
Reason: Not a v4.0.0 POM. for project com.day.jcr.vault:maven-vault-plugin at C:\Users\username\.m2\repository\com\day\jcr\vault\maven-vault-plugi
n\0.0.10\maven-vault-plugin-0.0.10.pom
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'com.day.jcr.vault:maven-vault-plugin': Not a v4.0.0 POM. f
or project com.day.jcr.vault:maven-vault-plugin at C:\Users\username\.m2\repository\com\day\jcr\vault\maven-vault-plugin\0.0.10\maven-vault-plugin
-0.0.10.pom
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1599)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findArtifactTypeHandlersInPlugins(DefaultLifecycleExecutor.java:1468)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findExtensions(DefaultLifecycleExecutor.java:222)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:178)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
我已經添加了maven repo,然後adobe repo。 Internally build嘗試通過Maven回購找到Vault插件,這會導致錯誤FNF,然後嘗試Adobe回購。 Vault插件存在於adobe repo上,但它僅下載了帶有301消息的POM。
任何想法。
POM片段:
<repositories>
<repository>
<id>maven-central</id>
<name>Maven2</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>adobe-public</id>
<name>Adobe</name>
<url>https://repo.adobe.com/nexus/content/groups/public/</url>
</repository>
</repositories>
更改爲HTTPS後,回落不會發生在土坯。下面是錯誤:
... 27 more
Caused by: java.io.FileNotFoundException: http://repo1.maven.org/maven2/com/day/jcr/vault/maven-vault-plugin/0.0.10/maven-vault-plugin-0.0.10.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
... 27 more
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
[INFO] Unable to find resource 'com.day.jcr.vault:maven-vault-plugin:maven-plugin:0.0.10' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository
看起來你正在做一個公司代理或防火牆...在哪裏不允許通過... – khmarbaise
@khmarbaise:沒有下載的jar在http://repo1.maven.org/maven2/com /day/jcr/vault/maven-vault-plugin/0.0.10/maven-vault-plugin-0.0.10.jar。我懷疑whay fallback沒有轉移到adobe repo。 – zdhim