2017-05-12 3 views
0

의존성이있는 Grails 3.2.7 플러그인을 생성하는 데 어려움이 있습니다.Grails를 사용하여 Grails 3 플러그인의 종속성을 패키지하는 방법은 무엇입니까?

이 작동하고 모든 종속성과 JAR를 만듭니다

gradle clean build 

하지 ..하지만이;

gradle publishToMavenLocal 

내 Gradle을 파일, 나는 실종 뭔가 알고, 그리고 나의이 작업을 수행 할 기본 기능은 없습니다 이해의 워드 프로세서를 기반으로 다음 JAR은 종속성, 단지 플러그인 프로젝트 파일이 없습니다. 문제는 게시 섹션에서 유래

buildscript { 
    ext { 
     grailsVersion = project.grailsVersion 
    } 
    repositories { 
     mavenLocal() 
     maven { url "https://repo.grails.org/grails/core" } 
     jcenter() 
    } 
    dependencies { 
     classpath "org.grails:grails-gradle-plugin:$grailsVersion" 
     classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1" 
    } 
} 

plugins { 
    id "io.spring.dependency-management" version "0.5.2.RELEASE" 
    id "com.jfrog.bintray" version "1.2" 
} 

version "3.1-SNAPSHOT" 
group "mygroup" 


apply plugin: 'eclipse' 
apply plugin: 'idea' 
apply plugin: "org.springframework.boot" 
apply plugin: "com.jfrog.artifactory" 
apply plugin: "org.grails.grails-plugin" 
apply plugin: "org.grails.grails-gsp" 
apply plugin: 'maven-publish' 


ext { 
    grailsVersion = project.grailsVersion 
    gradleWrapperVersion = project.gradleWrapperVersion 
} 

sourceCompatibility = 1.8 
targetCompatibility = 1.8 

idea { 
    module { 
     downloadSources = true 
    } 
} 

repositories { 
    mavenLocal() 
    mavenCentral() 
    maven { url "https://repo.grails.org/grails/core" } 
} 

dependencyManagement { 
    imports { 
     mavenBom "org.grails:grails-bom:$grailsVersion" 
    } 
    applyMavenExclusions false 
} 

dependencies { 
    provided 'org.springframework.boot:spring-boot-starter-logging' 
    provided "org.springframework.boot:spring-boot-starter-actuator" 
    provided "org.springframework.boot:spring-boot-autoconfigure" 
    provided "org.springframework.boot:spring-boot-starter-tomcat" 

    provided "org.grails:grails-web-boot" 
    provided "org.grails:grails-dependencies" 
    provided 'javax.servlet:javax.servlet-api:3.1.0' 

    compile "org.grails:grails-plugin-testing" 
    testCompile "com.fiftyonred:mock-jedis:0.4.0" 

    console "org.grails:grails-console" 
    compile "redis.clients:jedis:2.5.2" 
} 

task wrapper(type: Wrapper) { 
    gradleVersion = gradleWrapperVersion 
} 


artifactory { 
    contextUrl = 'http://myrepo/' 

} 

task sourceJar(type: Jar) { 
    from sourceSets.main.allJava 
} 

publishing { 
    publications { 
     mavenJava(MavenPublication) { 
      from components.java 
     } 
    } 
} 

답변

0

는 :

나는로 변경하는 경우 :

task jarWithPlainPom(type: Jar) { 
    from sourceSets.main.output 
    from configurations.runtime 
} 

publishing { 
    publications { 
     mavenJava(MavenPublication) { 

      artifact jarWithPlainPom 
     } 
    } 
} 

그것은, 그러나 POM이 업데이트되지 않습니다 필요한 종속성 대부분 포함하고 프로젝트가 실패 플러그인을 가져올 때.

관련 문제