Bryan Hunt
unread,May 2, 2017, 2:32:07 PM5/2/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bndtool...@googlegroups.com
I need to publish our bundles to Artifactory. I’m getting the following error:
Execution failed for task ':com.nvidia.gpuwa.web.security.jwt:artifactoryPublish'.
> File '/Users/bhunt/Documents/Nvidia/Code/NVServiceUtils/com.nvidia.gpuwa.app.config/generated/com.nvidia.gpuwa.app.config-1.0.6.jar' does not exist, and need to be published from publication mavenJava
The error occurs because the jar file does not contain the version in the name. Does anyone have an example on how to set this up. Here’s what I’ve done in the root build.gradle mostly a cut/paste from another example I found:
/*
* Master Gradle build script
*
* Depends on bndPlugin property set by settings.gradle.
* and bnd_* values from gradle.properties.
*/
import aQute.bnd.build.Workspace
import aQute.bnd.osgi.Constants
/* Add bnd gradle plugin as a script dependency */
buildscript {
repositories {
jcenter()
}
dependencies {
classpath bndPlugin, "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
}
}
/* Initialize the bnd workspace */
Workspace.setDriver(Constants.BNDDRIVER_GRADLE)
Workspace.addGestalt(Constants.GESTALT_BATCH, null)
ext.bndWorkspace = new Workspace(rootDir, bnd_cnf)
if (bndWorkspace == null) {
throw new GradleException("Unable to load workspace ${rootDir}/${bnd_cnf}")
}
ext.cnf = rootProject.project(bnd_cnf)
apply plugin: 'com.jfrog.artifactory'
artifactory {
contextUrl = 'http://***************'
publish {
repository {
repoKey = 'gpuwa-libs-releases'
username = ‘************'
password = ‘**********'
}
defaults {
publications('mavenJava')
publishArtifacts = true
publishPom = true
}
}
}
artifactoryPublish.skip=true
/* Configure the subprojects */
subprojects {
repositories {
jcenter()
}
def bndProject = bndWorkspace.getProject(name)
if (bndProject != null) {
plugins.apply 'biz.aQute.bnd'
plugins.apply 'jacoco'
plugins.apply 'com.jfrog.artifactory'
plugins.apply 'maven-publish'
group = 'com.nvidia.gpuwa'
jacoco {
toolVersion = "0.7.7.201606060606"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact(file("$rootDir/gradle.properties"))
}
}
}
}
}
task wrapper(type: Wrapper) {
jarFile = rootProject.file('.gradle-wrapper/gradle-wrapper.jar')
}