Add non regression test for org.nd4j:nd4j-native:0.5.0...

...and corresponding fixes / workarounds
This commit is contained in:
Alexandre Archambault 2016-11-07 11:22:57 +01:00
parent 73243f54e3
commit d5cc47ae5f
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
4 changed files with 43 additions and 2 deletions

View File

@ -56,8 +56,14 @@ object Activation {
def isEmpty: Boolean =
arch.isEmpty && families.isEmpty && name.isEmpty && version.isEmpty
def archMatch(current: Option[String]): Boolean =
arch.forall(current.toSeq.contains) || {
// seems required by org.nd4j:nd4j-native:0.5.0
arch.toSeq.contains("x86-64") && current.toSeq.contains("x86_64")
}
def isActive(osInfo: Os): Boolean =
arch.forall(osInfo.arch.toSeq.contains) &&
archMatch(osInfo.arch) &&
families.forall { f =>
if (Os.knownFamilies(f))
osInfo.families.contains(f)

View File

@ -363,6 +363,12 @@ object Resolution {
def projectProperties(project: Project): Seq[(String, String)] = {
// vague attempt at recovering the POM packaging tag
def packagingOpt = project.publications.collectFirst {
case ("compile", pub) =>
pub.`type`
}
// FIXME The extra properties should only be added for Maven projects, not Ivy ones
val properties0 = Seq(
// some artifacts seem to require these (e.g. org.jmock:jmock-legacy:2.5.1)
@ -374,7 +380,9 @@ object Resolution {
"project.groupId" -> project.module.organization,
"project.artifactId" -> project.module.name,
"project.version" -> project.version
) ++ project.parent.toSeq.flatMap {
) ++ packagingOpt.toSeq.map { packaging =>
"project.packaging" -> packaging
} ++ project.parent.toSeq.flatMap {
case (parModule, parVersion) =>
Seq(
"project.parent.groupId" -> parModule.organization,

View File

@ -0,0 +1,16 @@
com.google.code.findbugs:annotations:2.0.1:compile
com.google.guava:guava:18.0:compile
commons-io:commons-io:2.4:compile
org.apache.commons:commons-lang3:3.3.1:compile
org.apache.commons:commons-math3:3.4.1:compile
org.bytedeco:javacpp:1.2.3:compile
org.javassist:javassist:3.18.2-GA:compile
org.nd4j:nd4j-api:0.5.0:compile
org.nd4j:nd4j-buffer:0.5.0:compile
org.nd4j:nd4j-common:0.5.0:compile
org.nd4j:nd4j-context:0.5.0:compile
org.nd4j:nd4j-native:0.5.0:compile
org.nd4j:nd4j-native-api:0.5.0:compile
org.projectlombok:lombok:1.16.4:compile
org.reflections:reflections:0.9.10:compile
org.slf4j:slf4j-api:1.7.10:compile

View File

@ -436,6 +436,17 @@ object CentralTests extends TestSuite {
"1.11-8"
)
}
'nd4jNative - {
// In particular:
// - uses OS-based activation,
// - requires converting a "x86-64" to "x86_64" in it, and
// - uses "project.packaging" property
resolutionCheck(
Module("org.nd4j", "nd4j-native"),
"0.5.0"
)
}
}
}