I have a sonatype nexus 3.19.01 setup with maven-proxy repository. We are behind corp proxy and I think thats the issue. I have proxy configured and it is working because some of the artificats are downloaded
For eg : I used this repo : Github repo
The settings.xml I used is below. Reference Nexus website.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>NexusRepository</id>
<url>http://lndevopsnx:8080/repository/maven-public/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<proxies>
<proxy>
<id>http</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy</host>
<port>8080</port>
<username>svc-user</username>
<password>****</password>
<nonProxyHosts>*.mycomp.com|127.0.0.1|</nonProxyHosts>
</proxy>
<proxy>
<id>https</id>
<active>true</active>
<protocol>https</protocol>
<host>proxy</host>
<port>8080</port>
<username>svc-user</username>
<password>***</password>
<nonProxyHosts>*.mycomp.com|127.0.0.1|</nonProxyHosts>
</proxy>
</proxies>
</settings>
I compiled project using mvn clean package. Any idea whats going wrong.
The build log says
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.072 s
[INFO] Finished at: 2019-11-01T17:34:41+11:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dailytaskcreator: Could not resolve dependencies for project com.vishnu.automation:dailytaskcreator:jar:1.0: The following artifacts could not be resolved: com.atlassian.jira:jira-rest-java-client-api:jar:3.0.0, com.atlassian.jira:jira-rest-java-client-core:jar:5.1.6: Could not find artifact com.atlassian.jira:jira-rest-java-client-api:jar:3.0.0 in NexusRepository (http://lndevopsnx:8080/repository/maven-public/) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project dailytaskcreator: Could not resolve dependencies for project com.vishnu.automation:dailytaskcreator:jar:1.0: The following artifacts could not be resolved: com.atlassian.jira:jira-rest-java-client-api:jar:3.0.0, com.atlassian.jira:jira-rest-java-client-core:jar:5.1.6: Could not find artifact com.atlassian.jira:jira-rest-java-client-api:jar:3.0.0 in NexusRepository (http://lndevopsnx:8080/repository/maven-public/)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies (LifecycleDependencyResolver.java:269)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies (LifecycleDependencyResolver.java:147)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved (MojoExecutor.java:248)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:202)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
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:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
PS: I compiled the project on a AWS instance outside our corp proxy environment and project works fine. Just to make sure project pom file works