私は、gradle + artifactory plugin + maven-publishプラグインを使用してartifactoryにjar + pomファイルをデプロイしようとしています。Gradle artifactoryPublishはスプリングブートで生成された.jarファイルを展開しません
私はthisのような他のソースから複数のソリューションを試みたと私は春ブートプラグインは(それはjarファイルを編集するため)以下のスクリプトが正常に.pomファイルをアップロード
をものを壊すのではなく、考えますspring-bootによって生成される.jarファイル。それをアップロードするにはどうしたらいいですか?
これは私のbuild.gradleです:の
buildscript {
ext {
springBootVersion = '1.4.0.RELEASE'
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.0"
}
}
apply plugin: 'java'
apply plugin: 'spring-boot'
apply plugin: "com.jfrog.artifactory"
apply plugin: 'maven-publish'
apply from: "gradle/artifactory.gradle"
publishing {
publications {
mavenJava(MavenPublication) {
components.java
}
}
}
jar {
baseName = 'BatchParser'
}
version = '1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.projectlombok:lombok:1.16.10')
...
testCompile('org.springframework.boot:spring-boot-starter-test')
}
とartifactory.gradle
artifactory {
contextUrl = 'url'
publish {
repository {
repoKey = 'libs-release-local'
username = 'user'
password = 'password'
}
defaults {
publications("mavenJava")
}
}
}
出力:
gradlew clean build artifactoryPublish
[buildinfo] Not using buildInfo properties file for this build.
:clean
:compileJava
:processResources
:classes
:findMainClass
:jar
:bootRepackage
:assemble
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test
:check
:build
:generatePomFileForMavenJavaPublication
:artifactoryPublish
Deploying artifact: http://url/libs-release-local/BatchParser/1.0/BatchParser-1.0.pom
Deploying build descriptor to: http://url/api/build
Build successfully deployed. Browse it in Artifactory under http://url/webapp/builds/BatchParser/1471949957594
Gradleに実行を依頼するタスクと、公開を試みたときに実際に実行されているタスクは何ですか? –
私はコマンド+ ouputを追加しました –