留言板

Error componente: Build failed - Could not copy MANIFEST.MF to

Patricia Hevia,修改在6 年前。

Error componente: Build failed - Could not copy MANIFEST.MF to

Junior Member 帖子: 69 加入日期: 11-3-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:

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.
om prakash,修改在5 年前。

RE: Error componente: Build failed - Could not copy MANIFEST.MF to

New Member 帖子: 18 加入日期: 14-7-9 最近的帖子

Hi,

I am also getting the same exception ! Could you resolved this ? please share the solution here !!