掲示板
Error componente: Build failed - Could not copy MANIFEST.MF to
6年前 に Patricia Hevia によって更新されました。
Error componente: Build failed - Could not copy MANIFEST.MF to
Junior Member 投稿: 69 参加年月日: 11/03/24 最新の投稿
Hola,
He creado un componente con gradle para Liferay DXP. Este componente genera dinámicamente unas clases con un wsdl.
Cuando ejecuto el comando "gradlew.bat build" obtento el siguiente error:
Mi fichero build.gradle es:
Mi fichero bnd.bnd:
Alguien sabe cual puede ser el problema?
Muchas gracias.
He creado un componente con gradle para Liferay DXP. Este componente genera dinámicamente unas clases con un wsdl.
Cuando ejecuto el comando "gradlew.bat build" obtento el siguiente error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not copy MANIFEST.MF to 'C:\development\projects\portal\test-project\build\tmp\jar\MANIFEST.MF'.
> Build has errors
Mi fichero build.gradle es:
buildscript {
dependencies {
classpath "com.liferay:com.liferay.gradle.plugins:2.0.10"
}
}
apply plugin: "com.liferay.plugin"
configurations {
wsdl
jaxws
}
dependencies {
compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "2.0.0"
compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "2.0.0"
compileOnly group: "javax.portlet", name: "portlet-api", version: "2.0"
compileOnly group: "javax.servlet", name: "servlet-api", version: "2.5"
compileOnly group: "jstl", name: "jstl", version: "1.2"
compileOnly group: "org.osgi", name: "org.osgi.compendium", version: "5.0.0"
compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: '1.46'
compileOnly group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.3'
compileOnly group: 'commons-codec', name: 'commons-codec', version: '1.10'
compileOnly group: 'commons-collections', name: 'commons-collections', version: '3.2.2'
compileOnly group: 'commons-digester', name: 'commons-digester', version: '2.1'
compileOnly group: 'commons-io', name: 'commons-io', version: '2.2'
compileOnly group: 'commons-lang', name: 'commons-lang', version: '2.4'
compileOnly group: 'commons-logging', name: 'commons-logging', version: '1.1.1'
compileOnly group: 'org.cryptacular', name: 'cryptacular', version: '1.2.0'
compileOnly group: 'net.sf.ehcache', name: 'ehcache-core', version: '2.5.1'
compileOnly group: 'org.owasp.encoder', name: 'encoder', version: '1.2.1'
compileOnly group: 'com.google.guava', name: 'guava', version: '18.0'
compileOnly group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.6'
compileOnly group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.3.3'
compileOnly group: 'net.shibboleth.utilities', name: 'java-support', version: '7.3.0'
compileOnly group: 'net.jcip', name: 'jcip-annotations', version: '1.0'
compileOnly group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.6.2'
compileOnly group: 'joda-time', name: 'joda-time', version: '1.6.2'
compileOnly group: 'net.sf.jopt-simple', name: 'jopt-simple', version: '2.3.6'
compileOnly group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.1'
compileOnly group: 'org.slf4j', name: 'jul-to-slf4j', version: '1.6.2'
compileOnly group: 'log4j', name: 'log4j', version: '1.2.16'
compileOnly group: 'commons-fileupload', name: 'commons-fileupload', version: '1.2'
compileOnly group: 'javax.xml.bind', name: 'jaxb-api', version: '2.2.3'
wsdl 'com.test:test-wsclient'
jaxws 'com.sun.xml.ws:jaxws-tools:2.2.10'
}
sourceSets {
generated {
java {
srcDir 'src/generated/java'
}
resources {
srcDir 'src/generated/resources'
}
}
}
task wsimport {
ext.destDir = file("${projectDir}/src/generated/java")
doLast {
configurations.wsdl.each { lib ->
copy {
from zipTree(lib)
into "$buildDir/resources/main/wsdl"
includeEmptyDirs false
}
}
System.setProperty("javax.xml.accessExternalSchema", "file")
file("$buildDir/resources/main/wsdl").listFiles().findAll { ['MyService.wsdl', 'MyPerformService.wsdl'].contains(it.name) }.each { wsdl ->
ant {
sourceSets.main.output.classesDir.mkdirs()
destDir.mkdirs()
taskdef(name: 'wsimport',
classname: 'com.sun.tools.ws.ant.WsImport',
classpath: configurations.jaxws.asPath
)
wsimport(keep: true,
destdir: sourceSets.main.output.classesDir,
sourcedestdir: destDir,
wsdlLocation: 'WEB-INF/classes/wsdl/*',
extension: "true",
verbose: "true",
quiet: "false",
package: "com.my.test.generated",
xnocompile: "true",
wsdl: wsdl)
}
}
}
}
compileJava {
dependsOn wsimport
source wsimport.destDir
}
clean.doFirst {
delete file("${projectDir}/src/generated/java")
}
Mi fichero bnd.bnd:
Bundle-Name: test-project
Bundle-SymbolicName: com.my.test.generated.project
Bundle-Version: 1.0.0
Include-Resource:@bcprov-jdk15-1.46.jar,@commons-beanutils-1.9.3.jar,@commons-codec-1.10.jar,@commons-collections-3.2.2.jar,@commons-digester-2.1.jar,@commons-io-2.2.jar,@commons-lang-2.4.jar,@commons-logging-1.1.1.jar,cryptacular-1.2.0.jar,@ehcache-core-2.5.1.jar,encoder-1.2.1.jar,@guava-18.0.jar,httpclient-4.3.6.jar,httpcore-4.3.3.jar,java-support-7.3.0.jar,@jcip-annotations-1.0.jar,@jcl-over-slf4j-1.6.2.jar,@joda-time-1.6.2.jar,@jopt-simple-2.3.6.jar,jsr305-3.0.1.jar,@jul-to-slf4j-1.6.2.jar,@log4j-1.2.16.jar,@slf4j-api-1.6.2.jar,@slf4j-log4j12-1.6.2.jar,@velocity-1.7.jar,@xmlsec-1.5.8.jar,commons-fileupload-1.2.jar,@jaxb-api-2.2.3.jar
Import-Package:*;resolution:=optional
Alguien sabe cual puede ser el problema?
Muchas gracias.
5年前 に om prakash によって更新されました。
RE: Error componente: Build failed - Could not copy MANIFEST.MF to
New Member 投稿: 18 参加年月日: 14/07/09 最新の投稿Hi,
I am also getting the same exception ! Could you resolved this ? please share the solution here !!