Grails 3 war - проблемы с встроенным плагином

Я пытаюсь сразить приложение grails 3.1.9 с помощью встроенного плагина, выдает ошибку: «java.lang.IllegalStateException: невозможно переименовать C: \ test \ grails_demo \ plugins \ grails_demo_plugin \ build \ libs \ grails_demo_plugin-0.1. jar 'в' C: \ test \ grails_demo \ plugins \ grails_demo_plugin \ build \ libs \ grails_demo_plugin-0.1.jar.original '".

Я не уверен, почему он не может переименовать файл. Мой файл settings.gradle содержит:

include 'grails_demo_plugin'
project(":grails_demo_plugin").projectDir =  new File("plugins/grails_demo_plugin")

А в блоке зависимостей файла build.gradle содержится, как показано:

dependencies {
    compile project(":grails_demo_plugin")
    compile "org.springframework.boot:spring-boot-starter-logging"
    compile "org.springframework.boot:spring-boot-autoconfigure"
    compile "org.grails:grails-core"
    compile "org.springframework.boot:spring-boot-starter-actuator"
    compile "org.springframework.boot:spring-boot-starter-tomcat"
    compile "org.grails:grails-dependencies"
    compile "org.grails:grails-web-boot"
    compile "org.grails.plugins:cache"
    compile "org.grails.plugins:scaffolding"
    compile "org.grails.plugins:hibernate4"
    compile "org.hibernate:hibernate-ehcache"
    console "org.grails:grails-console"
    profile "org.grails.profiles:web"
    runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.8.2"
    runtime "com.h2database:h2"
    testCompile "org.grails:grails-plugin-testing"
    testCompile "org.grails.plugins:geb"
    testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
    testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
}

когда я попытался запустить приложение, все работает нормально, но когда я сделал grails war, я получил эту ошибку.

После нескольких часов работы с Google я обнаружил, что ошибка связана с задачей загрузки Gradle-Spring-Boot bootRepackage.

По этой ссылке (https://github.com/spring-projects/spring-boot/issues/1113) Я только что добавил "bootRepackage {classifier = 'exec'}" в файл build.gradle моего плагина, ошибка исчезла, но плагин-jar не добавлен в файл war.

Вот ссылка на github для моего приложения (https://github.com/Vigneshwaran082/grails_demo)

Вот моя полная ссылка на stacktrace (https://github.com/Vigneshwaran082/grails_demo/blob/Vigneshwaran082-stackTrace/stackTrace.txt введите ссылку описание здесь)


person vicky    schedule 17.08.2016    source источник


Ответы (1)


Отвечаю на свой вопрос, чтобы он мог быть кому-то полезен в будущем.

Простое отключение задачи bootRepackage устранило эту проблему. Просто добавив "bootRepackage.enabled = false" ко всем build.gradle внутри каталога плагинов, эта проблема решена.

person vicky    schedule 31.08.2016