Gradle을 사용하여 스프린트 부팅 기반 프로젝트를 만들 때 다음 오류가 발생합니다. --debug 옵션을 사용하여 빌드를 시도했지만 동일한 오류와 더 이상의 통찰력은 없습니다.gradle이 레이아웃 오류를 추측 할 수 없습니다
:clean
:compileJava
:processResources
Copy over the Env properties
Copy env properties from src/main/resources to C:\project-portal\build/resources/main/local.application.properties
:classes
:findMainClass
:war
Creating exploded war file :: C:\project-portal\build/project-portal
:bootRepackage FAILED
실패 : 예외와 함께 실패 구축 할 수 있습니다.
- 무엇이 잘못 되었습니까 : ': bootRepackage'작업에 실행하지 못했습니다.
에 대한 레이아웃을 추론 할 수 없습니다 'C를 : \ 프로젝트 포털 \ 빌드 \ libs와 \ 프로젝트 포털'
는 '레이아웃을 추론 할 수 없습니다'가 무엇을 의미합니까? 감사!
<pre>
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.2.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'war'
def deployDir = ""
def configDir=""
def appWarName = "project-portal"
configurations.create('myConfiguration')
configurations.myConfiguration {
if("$appEnv"=='local') {
configDir=localConfigDir
deployDir=localDeployDir
} else if("$appEnv"=='uat') {
configDir=uatConfigDir
deployDir=uatDeployDir
}
println "Config Dir :: $configDir"
println "Deploy Dir :: $deployDir"
}
processResources {
doLast {
println "Copy over the Env properties"
copy {
println "Copy env properties from src/main/resources to $buildDir/resources/main/${appEnv}.application.properties"
from "src/main/resources/${appEnv}.application.properties"
into "$buildDir/resources/main/"
rename { filename -> filename.replace "${appEnv}.application.properties", 'application.properties'}
}
}
}
springBoot {
mainClass= "com.company.Application"
}
bootRepackage {
mainClass = 'com.company.Application'
}
jar {
baseName = 'project-portal'
version = ''
exclude('src/main/resources/*.properties')
}
repositories {
mavenCentral()
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
dependencies {
//compile("org.springframework.boot:spring-boot-starter-parent")
//compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.boot:spring-boot-starter-web")
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
testCompile("junit:junit")
testCompile("org.springframework.boot:spring-boot-starter-test")
//hibernate
//compile 'org.eclipse.persistence:javax.persistence:2.1.0'
compile 'org.hibernate:hibernate-entitymanager:4.3.8.Final'
compile 'org.hibernate:hibernate-core:4.3.8.Final'
compile 'org.jboss.logging:jboss-logging:3.2.1.Final'
compile 'org.springframework.data:spring-data-jpa'
//Security
compile("org.springframework.boot:spring-boot-starter-security")
compile 'mysql:mysql-connector-java:5.1.34'
//After bug
compile 'aspectj:aspectjweaver:1.5.4'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9-rc-1'
}
war {
archiveName="$appWarName"
doLast {
println "Creating exploded war file :: $buildDir/$appWarName"
ant.unzip(src: war.archivePath, dest: "$buildDir/$appWarName")
}
}
task copyJar(type: Copy) {
println "Copy lib to $buildDir/lib"
it.dependsOn jar
from "$buildDir/libs"
into "$buildDir/web"
}
task deployApp(type: Copy) {
println "Copy dependencyJar to $buildDir"
it.dependsOn copyJar
it.dependsOn war
from "$buildDir/$appWarName/WEB-INF/lib"
into "$buildDir/externalJars"
from "$buildDir/libs"
into "$buildDir/externalJars"
from "$buildDir/$appWarName"
into "$deployDir/$appWarName"
}
</pre>
당신이 당신의 build.gradle 오류에 자세한 내용을보고 붙여 넣을 수 있습니까? – rajadilipkolli
원래 게시물에 업데이트 # 1이 추가되었습니다. 감사! – Lucheng