2017-05-11 17 views
0

org.apache.maven.surefire:surefire-junit4:jar:2.18.1プラグインにdummy.jarがないため、ビルドを正常にビルドできません。maven-surefire-pluginダミー:dummy.jar:1.0 missing

私のカスタムリポジトリからすべてが正常にダウンロードされます。したがって、ネットワークに問題はありません。また、この問題は異なるバージョンのmaven-surefire-pluginから表示されます。

うまくいけば、誰かが私を助けることができます。私は問題が何であるか把握できません。

エラー:

[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> 

そして、私の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> 

答えて

0

Mavenのカスタムリポジトリにorg.apache.maven.surefire:surefire-junit4:jar:2.18.1を見つけることができません。しかし、その依存関係は正確であり、中央で利用可能です。あなたがカスタムリポジトリの中心に設定したので、mavenはmavenセントラルリポジトリでこの依存関係を探すことはありません。

これは、カスタムリポジトリサーバーまたはインターネット接続が動作していないサーバーの設定エラーが原因と考えられます。

カスタムリポジトリサーバのトラブルシューティングを試みるか、settings.xmlの中央のデフォルトの中央リポジトリに変更することができます。