问题没有这样的属性:类前缀: org.gradle.api.task.bundling.War_Decorated。我正在尝试将我的ant脚本转换为Gradle,但是我仍然停留在带有前缀属性的with文件集上。
Ant脚本
<war destfile="${dist.dir}/${warname}.war" update="true" >
<manifest>
<attribute name="Implementation-Vendor" value="place" />
<attribute name="Implementation-Version" value="${label}" />
<attribute name="Interface-Version" value="${Interface-Version}" />
<attribute name="Implementation-Title" value="Telescope WS" />
<attribute name="Compiled-By" value="${user.name}" />
<attribute name="Compiled-On" value="${TODAY}" />
<attribute name="Sealed" value="false" />
</manifest>
<zipfileset dir="src/com/place/telescope" prefix="WEB-INF/classes/com/place/telescope">
<include name="*.xml" />
</zipfileset>Gradle脚本
war {
manifest {
attributes ('Implementation-Vendor': 'Place',
'Implementation-Version': "$label",
'Interface-Version': project.'Interface-Version',
'Implementation-Title': 'Telescope WS',
'Compiled-By': 'user.name',
'Compiled-On': 'TODAY',
'Sealed': 'false')
}
archiveName 'MANIFEST.MF'
//dependsOn 'zipAllfileset'
}
war.manifest.writeTo('dist/warname.war/')
fileset(dir: 'src/com/place/telescope', includes: '*.xml',
prefix = 'dist/warname.war/WEB-INF/classes/com/place/telescope')发布于 2016-08-04 09:06:47
语法错误,Gradle/Groovy使用attribute : value而不是Ant attribute = value
fileset(dir: 'src/com/place/telescope', includes: '*.xml',
prefix: 'dist/warname.war/WEB-INF/classes/com/place/telescope')https://stackoverflow.com/questions/38727116
复制相似问题