Maven ищет хранилище, которого нет в settings.xml или pom.xml - PullRequest
0 голосов
/ 24 августа 2018

Я работаю над этим веб-проектом Maven, используя Intellij. Apache Maven установлен на машине вручную, и файл settings.xml пуст.

Мой pom.xml выглядит так:

<repositories>
    <repository>
        <id>abc-nexus</id>
        <url>http://abc:9090/nexus/content/groups/public</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
</repositories>

Я делаю пакет mvn, используя это:

-e -Dmaven.repo.local=E:/svn-source-codes/MyConnectorProject/local_maven_repository package

Я делаю установку mvn, используя это:

-e -Dmaven.repo.local=E:/svn-source-codes/MyConnectorProject/local_maven_repository install

Тем не менее, когда я пытаюсь запустить этот сгенерированный файл войны, используя jetty:run, он загружает файлы jar с неизвестного веб-сайта, и журнал выглядит так:

[INFO] --- maven-jetty-plugin:1.0.4:run-war (default-cli) @ crystal-assembly ---
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-settings/2.0.3/maven-settings-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-model/2.0.3/maven-model-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-project/2.0.3/maven-project-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-artifact-manager/2.0.3/maven-artifact-manager-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-profile/2.0.3/maven-profile-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-repository-metadata/2.0.3/maven-repository-metadata-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-plugin-api/2.0.3/maven-plugin-api-2.0.3.jar
Downloading: http://WrongAppServer:8081/nexus/content/groups/public/org/apache/maven/maven-artifact/2.0.3/maven-artifact-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-project/2.0.3/maven-project-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-settings/2.0.3/maven-settings-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-profile/2.0.3/maven-profile-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/2.0.3/maven-model-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact-manager/2.0.3/maven-artifact-manager-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-repository-metadata/2.0.3/maven-repository-metadata-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-plugin-api/2.0.3/maven-plugin-api-2.0.3.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/2.0.3/maven-artifact-2.0.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.993 s
[INFO] Finished at: 2018-08-24T17:23:16+02:00
[INFO] Final Memory: 19M/46M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4:run-war (default-cli) on project crystal-assembly: Execution default-cli of goal com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4:run-war failed: Plugin com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.0.3, org.apache.maven:maven-settings:jar:2.0.3, org.apache.maven:maven-profile:jar:2.0.3, org.apache.maven:maven-model:jar:2.0.3, org.apache.maven:maven-artifact-manager:jar:2.0.3, org.apache.maven:maven-repository-metadata:jar:2.0.3, org.apache.maven:maven-plugin-api:jar:2.0.3, org.apache.maven:maven-artifact:jar:2.0.3: Could not transfer artifact org.apache.maven:maven-project:jar:2.0.3 from/to MyProjectName-nexus-public (http://WrongAppServer:8081/nexus/content/groups/public): WrongAppServer: Unknown host WrongAppServer -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4:run-war (default-cli) on project crystal-assembly: Execution default-cli of goal com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4:run-war failed: Plugin com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.0.3, org.apache.maven:maven-settings:jar:2.0.3, org.apache.maven:maven-profile:jar:2.0.3, org.apache.maven:maven-model:jar:2.0.3, org.apache.maven:maven-artifact-manager:jar:2.0.3, org.apache.maven:maven-repository-metadata:jar:2.0.3, org.apache.maven:maven-plugin-api:jar:2.0.3, org.apache.maven:maven-artifact:jar:2.0.3: Could not transfer artifact org.apache.maven:maven-project:jar:2.0.3 from/to MyProjectName-nexus-public (http://WrongAppServer:8081/nexus/content/groups/public): WrongAppServer
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    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:606)
    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)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
    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:606)
    at com.intellij.rt.execution.application.AppMainV2.main(AppMainV2.java:131)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4:run-war failed: Plugin com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.0.3, org.apache.maven:maven-settings:jar:2.0.3, org.apache.maven:maven-profile:jar:2.0.3, org.apache.maven:maven-model:jar:2.0.3, org.apache.maven:maven-artifact-manager:jar:2.0.3, org.apache.maven:maven-repository-metadata:jar:2.0.3, org.apache.maven:maven-plugin-api:jar:2.0.3, org.apache.maven:maven-artifact:jar:2.0.3: Could not transfer artifact org.apache.maven:maven-project:jar:2.0.3 from/to MyProjectName-nexus-public (http://WrongAppServer:8081/nexus/content/groups/public): WrongAppServer
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 26 more
Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin com.MyProjectName.maven.plugin:maven-jetty-plugin:1.0.4 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.0.3, org.apache.maven:maven-settings:jar:2.0.3, org.apache.maven:maven-profile:jar:2.0.3, org.apache.maven:maven-model:jar:2.0.3, org.apache.maven:maven-artifact-manager:jar:2.0.3, org.apache.maven:maven-repository-metadata:jar:2.0.3, org.apache.maven:maven-plugin-api:jar:2.0.3, org.apache.maven:maven-artifact:jar:2.0.3: Could not transfer artifact org.apache.maven:maven-project:jar:2.0.3 from/to MyProjectName-nexus-public (http://WrongAppServer:8081/nexus/content/groups/public): WrongAppServer
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:218)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm(DefaultMavenPluginManager.java:402)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm(DefaultMavenPluginManager.java:374)
    at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm(DefaultBuildPluginManager.java:231)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:102)
    ... 27 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.apache.maven:maven-project:jar:2.0.3, org.apache.maven:maven-settings:jar:2.0.3, org.apache.maven:maven-profile:jar:2.0.3, org.apache.maven:maven-model:jar:2.0.3, org.apache.maven:maven-artifact-manager:jar:2.0.3, org.apache.maven:maven-repository-metadata:jar:2.0.3, org.apache.maven:maven-plugin-api:jar:2.0.3, org.apache.maven:maven-artifact:jar:2.0.3: Could not transfer artifact org.apache.maven:maven-project:jar:2.0.3 from/to MyProjectName-nexus-public (http://WrongAppServer:8081/nexus/content/groups/public): WrongAppServer
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:453)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:255)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:376)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:210)
    ... 32 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact org.apache.maven:maven-project:jar:2.0.3 from/to MyProjectName-nexus-public (http://WrongAppServer:8081/nexus/content/groups/public): WrongAppServer
    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:52)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:364)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:76)
    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:745)
Caused by: org.apache.maven.wagon.TransferFailedException: WrongAppServer
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1068)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:962)
    at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:126)
    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:569)
    at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:436)
    at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:413)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:456)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:359)
    ... 4 more
Caused by: java.net.UnknownHostException: WrongAppServer
    at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1295)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1248)
    at java.net.InetAddress.getAllByName(InetAddress.java:1164)
    at java.net.InetAddress.getAllByName(InetAddress.java:1098)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:88)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    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:834)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:985)
    ... 13 more

Очевидно, что репозиторий, к которому он пытается получить доступ, не существует (я пытался вручную). Я знаю, что репозитории могут быть установлены в pom.xml или settings.xml. Тем не менее, я не смог найти ссылку на этот WrongAppServer. Может кто-нибудь, пожалуйста, помогите по этому поводу?

Заранее спасибо!

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...