I am trying to deploy my mule project from Anypoint using terminal "mvn clean package deploy-DmuleDeploy" command. I am not sure what this error is saying but i'm sure it has to do with my maven version. I've installed maven on my mac using homebrew, but it is version 3.8.6. The "embedded maven installation" under preferences-AnypointStudio-maven in Anypoint says 3.6.3. Then the plugin version on my .pom file says 3.5.4. Do i need to change any of these versions? Should i edit the one in the .pom file? Should i downgrade my mac maven version? Any help would be appreciated. I've posted a partial error and a partial .pom file. Please let me know if you need any more info to help me. Thank you
> [ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.5.4:process-sources (default-process-sources) on project maven: Execution default-process-sources of goal org.mule.tools.maven:mule-maven-plugin:3.5.4:process-sources failed: An API incompatibility was encountered while executing org.mule.tools.maven:mule-maven-plugin:3.5.4:process-sources: java.lang.IllegalAccessError: class org.mule.maven.client.internal.util.FileUtils (in unnamed module #0x6d9fb2d1) cannot access class sun.net.www.protocol.jar.JarURLConnection (in module java.base) because module java.base does not export sun.net.www.protocol.jar to unnamed module #0x6d9fb2d1
[ERROR] -----------------------------------------------------
[ERROR] realm = extension>org.mule.tools.maven:mule-maven-plugin:3.5.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/ammanbesaw/.m2/repository/org/mule/tools/maven/mule-maven-plugin/3.5.4/mule-maven-plugin-3.5.4.jar
Pom file
> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>maven</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule-application</packaging>
<name>maven</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<app.runtime>4.4.0-20220523</app.runtime>
<mule.maven.plugin.version>3.5.4</mule.maven.plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>3.5.4</version>
<extensions>true</extensions>
The cause of the error seems to be that Maven is using a Java/JDK version that is not supported by Mule. Only Java/JDK versions 8 and 11 are supported. Ensure that Maven is executing a supported JDK version.
While making a build for your project in any cloud environment. Try to change image from linux/unix to window or window to other. Operating system and image should be the same to successfully build.
Related
I'm currently migrating a project to Java 11 (i.e. >= 9) and because JavaFX seems not to work without modules, anymore, I'm currently adding module-info.java files to all sub-projects. But I get the following error:
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/mangu/workspace/cloudstore.2/co.codewizards.java9test.project1/src/main/java/module-info.java:[6,21] module not found: org.slf4j
[INFO] 1 error
I'm running OpenJDK 11.0.3, Maven 3.6.1 (embedded in Eclipse 2019-06) and I definitely have the dependency for the module org.slf4j declared in my pom.xml!
In order to simplify things, I created a little, minimal test-project causing the same error.
Here's the test-project's pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>co.codewizards.java9test</groupId>
<artifactId>co.codewizards.java9test.project1</artifactId>
<version>0.1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>9</maven.compiler.source>
<maven.compiler.target>9</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.8.0-beta4</version>
</dependency>
</dependencies>
</project>
I tried both: 1.8.0-beta4 and 2.0.0-alpha0. Eclipse shows me an existing module-info.class in both JARs (i.e. currently inside slf4j-api-1.8.0-beta4.jar).
Here's the module-info.java:
module co.codewizards.java9test.project1 {
requires java.base;
requires java.se;
requires org.slf4j;
}
And here's the output from mvn clean install -Dmaven.test.skip=true -X (but run inside Eclipse): mvn.log
Any idea what I'm doing wrong?
Update: I just uploaded the little test project: co.codewizards.java9test.project1.7z
Your maven logs show slf4j-api being placed on the classpath, not modulepath.
You need to upgrade the version of maven-compiler-plugin, as modulepath is supported only since version 3.6, whereas your build uses version 3.1.
I was getting the same issue due to older verion of slf4j was coming from one of dependency in pom. So I resolved it by adding below slf4j dependency to my pom :
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.29</version>
</dependency>
module-info:
module my.service {
requires org.slf4j;
}
I am trying to run a simple build using maven on jenkins (1.651.2) for windows. I am working on a closed environment which has no internet connection. Trying the same on my internet PC works fine. Also from command line everything works fine on jenkins I get this error:
Building on master in workspace C:\source\maven
ERROR: Failed to parse POMs
java.net.MalformedURLException: no protocol:
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79)
at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68)
at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108)
at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206)
at hudson.model.JDK.forNode(JDK.java:143)
at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:357)
at hudson.model.Run.getEnvironment(Run.java:2229)
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:938)
at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56)
at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:166)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:622)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE
adding my simple program pom file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-app</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Looks like Jenkins is trying to automatically install maven, please check your configuration page if you have something similar to this (Install automatically checked):
If so, please uncheck that box and provide the path to the maven installation, or leave it blank if you have maven in PATH of jenkins user.
thank for krzyk
The problem was not the maven section which was set as krzyk suggested the problem was in the jdk section which had "Install automatically" checked. The Error message was unclear
I executed this command
mvn compile exec:java -Dexec.classpathScope=compile-Dexec.mainClass=trident.MyClass
and got this error
[INFO] Error
building POM (may not be this project's POM).
Project ID:org.clojure:clojure:jar:1.4.0
Reason: Cannot find parent: org.sonatype.oss:oss-parent for project:
org.clojure:clojure:jar:1.4.0 for project org.clojure:clojure:jar:1.4.0
Here Pom file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org
/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<repositories>
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
<repository>
<id>github-releases</id>
<url>http://oss.sonatype.org/content/repositories/github-
releases/</url>
</repository>
</repositories>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin </artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</project>
So I ran into a the same error today, although the project I got the error from is different:
Reason: Cannot find parent: org.sonatype.oss:oss-parent
I realize this post is 5 months old, but I'm posting the solution that worked for me in case others stumble on to the same Stack Overflow link.
So the problem is not with your org.clojure:clojure:jar:1.4.0 Project or it's POM file. It's with the parent project, oss.sonatype.pom. In my case, a 403 was returned when my local oss.sonatype-.pom was created. These were the contents:
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
Now, when Maven is trying to build your projects; org.clojure will request oss.sonatype POM & when it cannot read oss.sonatype.pom as a valid POM file; it will throw the error you're seeing:
[INFO] Error building POM (may not be this project's POM).
Project ID:<...>
Reason: Cannot find parent: org.sonatype.oss:oss-parent for project:
After a bit of reading up, it seems that recently these repositories made changes to their URLs (Moving from HTTP to HTTPS), so if a call was made by any other POM or build for oss.sonatype over HTTP, the 403 HTML file was returned.
So the quick workaround is to head over to Maven Central, & get the required version of the oss.sonatype.pom file from their repositories & replace your local version with it. Then your Maven build won't fail on 'parent not found'.
The fix would be to test your URLs to check which URL(s) are not valid anymore.
Hope this helps.
I am deploying builds to local and remote Jboss AS 7.1.1 Final at port 9999. Maven uses jboss plugin 'jboss-as-maven-plugin:7.1.1.Final' to manage builds to servers. I have confirmed that server is up and running and port is accessible at 9999. But "many times" build fails with following error for both local and remote Jboss. Jboss ic configured in Standalone mode single node cluster.
Stranglely build doesn't fail every time but most of the time. Not sure if we need to upgrade Maven plugin to higher version.
[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with
exception(s) [INFO] o.h.m.e.h.MavenExecutionResultHandler - [1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:undeploy
(default-cli) on project Test: Error executing UNDEPLOY [DEBUG]
Closing connection to remote [ERROR] Failed to execute goal
org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:undeploy
(default-cli) on project Test: Error executing UNDEPLOY:
java.net.ConnectException: JBAS012144: Could not connect to
remote://localhost:9999. The connection timed out -> [Help 1]
UPDATE
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.1.1.Final</version>
<configuration>
<filename>${project.build.finalName}.jar</filename>
<username>${userName}</username>
<password>${password}</password>
</configuration>
</plugin>
I am now using latest version of Maven plug-in but it seems that connection timeout error is more frequent now. I am starting to think if Jboss behaves differently when trying to make too many remote deployment with different sub projects of the application. I am having 21 sub projects being deployed from a master POM. Sample configuration is as follows
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.master</groupId>
<artifactId>master</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>Master</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
<module>module4</module>
<module>module5</module>
<module>module6</module>
<module>module7</module>
<module>module8</module>
<module>module9</module>
<module>module10</module>
<module>module11</module>
<module>module12</module>
<module>module13</module>
</modules>
First, check plugin configuration.
For example:
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.9.Final</version>
<inherited>true</inherited>
<configuration>
<hostname>${jboss.hostname}</hostname>
<port>${jboss.port}</port>
<username>${jboss.user}</username>
<password>${jboss.pass}</password>
<timeout>30000</timeout>
</configuration>
</plugin>
If hostname, port number(default 9999), username and password are ok, you can try increasing "timeout" (default is 5000ms, you can try with 30000ms).
It worked for me.
4 Possible Solutions to Question
Remove your Local Cache settings which will be your local m2 repo Or Point to new m2 repo from your maven settings.xml file.
Try to connect to your local nexus/archiva (if any other) using relevant/appropriate credentials.It is only your Maven Plugin causing this problem.
Try to use the latest JBoss Deploy Plugin available in this link.
Alternatively check your windows/Linux firewall settings have been enabled or it.
I'm trying to upgrade my project from Maven 2.2.1 to Maven 3.0.4 but am running into problems with a dependency resolution. I spent a full day trying to research this by looking through Maven documentation and similar posts, but I'm still stuck. This is my first question on stackoverflow, so hopefully I've followed etiquette here well enough. Thanks for your help!
My project structure is as follows:
pom.xml (acme-parent)
child-alpha
+-----> pom.xml
In addition, I have the following files in my own repository:
http://maven.my-own-repo.com/acme/child-dep-jdk15/maven-metadata-local.xml
http://maven.my-own-repo.com/acme/child-dep-jdk15/1.0/child-dep-jdk15-1.0.jar
http://maven.my-own-repo.com/acme/child-dep-jdk15/1.0/child-dep-jdk15-1.0.pom
child-alpha/pom.xml in turn has a profile dependency on my own acme:child-dep-jdk15, which has been separately built into a jar file and has its own .pom file specifying a parent that is the same acme-parent parent as child-alpha.
Here are excerpts from the relevant files:
acme-parent pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>acme</groupId>
<artifactId>acme-parent</artifactId>
<name>Acme Parent Project</name>
<version>1</version>
<packaging>pom</packaging>
<properties>...</properties>
<modules>
<module>child-alpha</module>
</modules>
<repositories>
<repository>
<id>acme-repo</id>
<url>http://maven.my-own-repo.com</url>
</repository>
<repository>
<id>central</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>...</pluginRepositories>
<build>
<plugins>...</plugins>
</build>
<dependencies>...</dependencies>
</project>
child-alpha pom.xml:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>acme</groupId>
<artifactId>acme-parent</artifactId>
<version>1</version>
</parent>
<artifactId>child-alpha</artifactId>
<name>Child Alpha Project</name>
<version>1.0</version>
<packaging>jar</packaging>
<scm>...</scm>
<properties>...</properties>
<build>
<resources>...</resources>
<plugins>...</plugins>
</build>
<profiles>
<profile>
<id>jdk15</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.5</jdk>
</activation>
<dependencies>
<dependency>
<groupId>acme</groupId>
<artifactId>child-dep-jdk15</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>...</dependencies>
</project>
child-dep-jdk15-1.0.pom:
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>acme</groupId>
<artifactId>acme-parent</artifactId>
<version>1</version>
</parent>
<groupId>acme</groupId>
<artifactId>child-dep-jdk15</artifactId>
<name>Acme Child Dependency</name>
<version>1.0</version>
<packaging>jar</packaging>
<build>...</build>
<dependencies>...</dependencies>
</project>
When I tried to build child-alpha (while in the child-alpha directory), I ran the following command:
mvn -U -e clean install
And I got the following log messages and stack trace (extraneous messages removed):
Downloading: http://maven2.my-own-repo.com/acme/acme-parent/1/acme-parent-1.pom
Downloading: http://repo1.maven.org/maven2/acme/acme-parent/1/acme-parent-1.pom
[...]
[ERROR] Failed to execute goal on project child-alpha: Could not resolve dependencies for project acme:child-alpha:jar:1.0: [...]
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project acme:child-alpha:jar:1.0: [...]
Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [...]
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150)
... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for acme:child-dep-jdk15:jar:1.0
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:331)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
... 25 more
Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact acme:acme-parent:pom:1 in acme-repo (http://maven.my-own-repo.com)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:126)
at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813)
at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310)
at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:322)
... 28 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact acme:acme-parent:pom:1 in acme-repo (http://maven.my-own-repo.com)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:122)
... 33 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact acme:acme-parent:pom:1 in acme-repo (http://maven.my-own-repo.com)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:947)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:941)
at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:669)
at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:60)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
While using Maven 2, I've never needed the acme-parent pom.xml at the following location:
http://maven2.my-own-repo.com/acme/acme-parent/1/acme-parent-1.pom
The reason we don't have the parent pom.xml on our own repo is is that we have a script used when creating version control branches that changes some values in acme-parent pom.xml depending on which branch we're on, so it would be complicated to put that pom.xml in the repo and keep it correctly updated for all the different branches we're trying to build concurrently with our continuous integration server.
In Maven 2, when doing builds of child-alpha, Maven would have no trouble finding acme-parent pom.xml one directory up, i.e. with a relative path of ../pom.xml, so it would never try going to my repositories to find it. Having the parent pom.xml in my local checkout only and not having it in the repo worked fine in Maven 2.
However, when I tried building child-alpha under Maven 3.0.4, the exception above occurred. At first, I thought I needed to explicitly set the relativePath within the tags at the top of child-alpha's pom.xml, but that didn't fix it -- and acme-parent's pom.xml is indeed already in the default relativePath of ../pom.xml, so there's no need to explicitly set it.
Then, I tried commenting out the child-dep-jdk15 dependency within the section of child-alpha's pom.xml. The child-alpha maven build completes successfully with this dependency commented out.
I don't understand why child-alpha won't build in Maven 3 when the child-dep-jdk15 dependency is in place. If Maven was able to correctly find the acme-parent pom.xml initially (per the block at the top), why is it now trying to download it from the repos when processing the child-dep-jdk15 dependency? Have I configured something incorrectly, and if so, how should I fix it?
One other thing: if I first run mvn -N install in the same directory as acme-parent's pom.xml, and then try building child-alpha, then the child-alpha build succeeds, even when keeping the dependency child-dep-jdk15 in the code. After I run that command, I'm able to verify acme-parent-1.pom is in my local .m2 directory. While this workaround may be okay for individual developers, it'd be a problem for our continuous integration server, which needs to be able to run concurrent builds for different branches.
I'd strongly prefer not to have to reconfigure my repository to host the acme-parent pom.xml due to the version control branching changes I've mentioned above.
In Maven 3 if you just had a failed download and have fixed it (e.g. by uploading the jar to a repository) it will cache the failure. To force a refresh add -U to the command line.
For other possible reasons of DependencyResolutionException see Maven Confluence.