3

分類子に基づいて (Artifactory の) Ivy リポジトリから Gradle の依存関係を取得しようとしています (ネイティブ コードを含む DLL をフィルタリングして、関連するプロセッサ アーキテクチャのものだけを取得します)。私のbuild.gradleは次のようになります:

repositories {
   ivy {
      name 'prebuilts'
      url "${repositoryServer}/prebuilts"
      credentials {
         username artifactoryUser
         password artifactoryPassword
      }
      layout 'pattern', {
         artifact '[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]'
         ivy '[organisation]/[module]/[revision]/ivy-[revision].xml'
      }
   }
}

configurations {
    example
}

dependencies {
    example group: 'ThirdParty', name: 'jogl_JSR-231', version: '1.1.0.1', configuration: 'nativeRuntime', classifier: 'release_win32'
}

project.configurations.example.each {
    println it
}

その依存関係の ivy.xml は次のようになります。

     <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
     <ivy-module version="2.0">
     <info organisation="ThirdParty" module="jogl_JSR-231" revision="1.1.0.1" status="release" publication="20130508143052"/>
     <configurations>
         <conf name="nativeRuntime" description="Native artifacts for running tests." visibility="public"/>
         <conf name="archives" description="Configuration for archive artifacts." visibility="public"/>
         <conf name="default" extends="runtime" description="Configuration for default artifacts." visibility="public"/>
         <conf name="compile" description="Classpath for compiling the main sources." visibility="private"/>
         <conf name="runtime" extends="compile" description="Classpath for running the compiled main classes." visibility="private"/>
         <conf name="testCompile" extends="compile" description="Classpath for compiling the test sources." visibility="private"/>
         <conf name="testRuntime" extends="runtime,testCompile" description="Classpath for running the compiled test classes." visibility="private"/>
         <conf name="cppCompile" description="Configuration for API artifacts (headers)." visibility="public"/>
         <conf name="nativeArchives" description="Configuration for native archive artifacts." visibility="public"/>
     </configurations>
     <publications>
         <artifact name="gluegen-rt" type="jar" ext="jar" conf="archives,runtime"/>
         <artifact name="jogl" type="jar" ext="jar" conf="archives,runtime"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="gluegen-rt" type="jar" ext="jar" conf="archives" m:classifier="sources"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl" type="jar" ext="jar" conf="archives" m:classifier="sources"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="gluegen-rt" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_win32"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_win32"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl_awt" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_win32"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl_cg" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_win32"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="gluegen-rt" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_x64"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_x64"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl_awt" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_x64"/>
         <artifact xmlns:m="http://ant.apache.org/ant/maven" name="jogl_cg" type="dll" ext="dll" conf="nativeArchives,nativeRuntime" m:classifier="release_x64"/>
         <artifact name="joglBuildRecord" type="txt" ext="txt" conf="archives"/>
     </publications>
     <dependencies/>
     </ivy-module>

次のエラーが表示されます。

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\tmp\gradle-scratch\dependencies-by-classifier\build.gradle' line: 25

* What went wrong:
A problem occurred evaluating root project 'dependencies-by-classifier'.
> Could not resolve all dependencies for configuration ':example'.
   > Artifact 'ThirdParty:jogl_JSR-231:1.1.0.1:release_win32@jar' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

ここで何が間違っているのかまったくわかりません。分類器ですか?それを削除すると、すべてが機能します(明らかに、必要なものが得られませんが)。

4

1 に答える 1