admin管理员组文章数量:1391982
I am new to gradle and trying to update gradle version from 6.8.3 to 8.6. In the buil.gradle file, in one of my projects I want to copy some files from libs to WEB-INF/lib directory but I get this error:
Could not get unknown property 'libs' for configuration container of type .gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
So, my question is how could I find which Jar files should be copied in that directory and what is the problem with libs because the build is working perfectly with gradle version 6.8.3.
When I change the configurations.libs.files to configurations.classPath the build works fine but the files copied in the lib folder is more than the numbers than I expected. I am using visual studio and expect some one can help me. I am also new to programming.
plugins {
// Apply the java-library plugin for API and implementation separation.
id 'war'
id 'java-library'
id 'maven-publish'
}
configurations{
libs
}
dependencies {
// Global dependencies
providedCompile '.apache.logging.log4j:log4j-slf4j2-impl:2.24.3'
providedCompile '.junit.jupiter:junit-jupiter:5.10.2'
....
}
task libs{
dependsOn "clean"
mkdir("${build_war}/WEB-INF/lib")
copy{
from configurations.libs.files
into build_war+"/WEB-INF/lib"
}
ant.copy(
todir: "${build_war}/WEB-INF/lib",
overwrite: 'true',
file: "${gwt_sdk}/gwt-servlet.jar"
)
ant.copy(
todir: "${build_war}/WEB-INF/lib",
overwrite: 'true',
file: "${gwt_sdk}/gwt-servlet-deps.jar"
)
}
本文标签: visual studioCould not get unknown property 39libs39 for configuration containerStack Overflow
版权声明:本文标题:visual studio - Could not get unknown property 'libs' for configuration container - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744757857a2623569.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论