maven-surefire-plugin dummy:dummy.jar:1.0 missing
apache, jar, java, maven, maven-surefire-plugin
Solution
Maven can't find `org.apache.maven.surefire:surefire-junit4:jar:2.18.1` in your custom repository. However that dependency is correct and available in the maven central. Since you've configured central to your custom repository, maven will not look for this dependency in maven central repository.
This is most likely due to a configuration error in your custom repository server or that server not having a working internet connection.
You can either try to troubleshoot your custom repository server, or change central to default maven central repository in your maven `settings.xml`.
Problem
I can't get my build to build successfully because the `org.apache.maven.surefire:surefire-junit4:jar:2.18.1` plugin is missing the dummy.jar. My maven downloads everything fine from my custom repository. So there is no network problem. Also, this Problem appears on different versions from `maven-surefire-plugin`. Hopefully, someone can help me. I just can't figure out what the problem is. Error: ``` [INFO] --------------------------------------------------------------------- --- [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.465 s [INFO] Finished at: 2017-05-11T11:20:13+02:00 [INFO] Final Memory: 24M/262M [INFO] --------------------------------------------------------------------- --- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire- plugin:2.18.1:test (default-test) on project qds-mobile-selenium-tests: Unable to generate classpath: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing: [ERROR] ---------- [ERROR] 1) org.apache.maven.surefire:surefire-junit4:jar:2.18.1 [ERROR] [ERROR] Try downloading the file manually from the project website. [ERROR] [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=org.apache.maven.surefire - DartifactId=surefire-junit4 -Dversion=2.18.1 -Dpackaging=jar - Dfile=/path/to/file [ERROR] [ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire - DartifactId=surefire-junit4 -Dversion=2.18.1 -Dpackaging=jar - Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [ERROR] [ERROR] Path to dependency: [ERROR] 1) dummy:dummy:jar:1.0 [ERROR] 2) org.apache.maven.surefire:surefire-junit4:jar:2.18.1 [ERROR] [ERROR] ---------- [ERROR] 1 required artifact is missing. [ERROR] [ERROR] for artifact: [ERROR] dummy:dummy:jar:1.0 [ERROR] [ERROR] from the specified remote repositories: [ERROR] company-releases (https://company.jfrog.io/company/release-local, releases=true, snapshots=false), [ERROR] central (https://company.jfrog.io/company/libs-release, releases=true, snapshots=false), [ERROR] snapshots (https://company.jfrog.io/company/libs-snapshot, releases=true, snapshots=true) [ERROR] [ERROR] -> [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: ``` <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>de.company</groupId> <artifactId>qds-selenium-tests-sourceLab</artifactId> <version>1.0.0</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF- 8</project.reporting.outputEncoding> <java.version>1.8</java.version> <selenium.version>2.53.1</selenium.version> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <dependency> <groupId>com.github.stephenc.jcip</groupId> <artifactId>jcip-annotations</artifactId> <version>1.0-1</version> <scope>test</scope> </dependency> <dependency> <groupId>de.company</groupId> <artifactId>saucelabs-device-library</artifactId> <version>1.0.0</version> </dependency> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-api</artifactId> <version>2.41.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <includes> <include>**/MobileTestSuite.class</include> <include>**/StationaryDevicesTestSuite.class</include> </includes> <failIfNoTests>true</failIfNoTests> <rerunFailingTestsCount>3</rerunFailingTestsCount> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.2</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> </plugins> </build> </project> ``` And my maven settings.xml: ``` <?xml version="1.0" encoding="UTF-8"?> <settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <servers> <server> <username>foo</username> <password>bar</password> <id>central</id> </server> <server> <username>foo</username> <password>bar</password> <id>company-releases</id> </server> <server> <username>foo</username> <password>bar</password> <id>snapshots</id> </server> </servers> <profiles> <profile> <repositories> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>company-releases</id> <name>company-releases</name> <url>https://company.jfrog.io/company/release-local</url> </repository> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release</name> <url>https://company.jfrog.io/company/libs-release</url> </repository> <repository> <snapshots /> <id>snapshots</id> <name>libs-snapshot</name> <url>https://company.jfrog.io/company/libs-snapshot</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <snapshots> <enabled>false</enabled> </snapshots> <id>company-releases</id> <name>company-releases</name> <url>https://company.jfrog.io/company/release-local</url> </pluginRepository> <pluginRepository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release</name> <url>https://company.jfrog.io/company/libs-release</url> </pluginRepository> <pluginRepository> <snapshots /> <id>snapshots</id> <name>libs-snapshot</name> <url>https://company.jfrog.io/company/libs-snapshot</url> </pluginRepository> </pluginRepositories> <id>artifactory</id> </profile> </profiles> <activeProfiles> <activeProfile>artifactory</activeProfile> </activeProfiles> </settings> ```