2010-06-16 7 views
0

Je travaille sur un projet Java avec Eclipse. Ce projet nécessite un second projet (pas le mien), nommé sams dans son chemin de construction. Le sams est fourni avec un fichier build.xml et il devrait générer du code en utilisant Apache CXF lors de sa construction. Lorsque j'utilise Apache ANT sur Eclipse et exécutez la commande cxf.generated de son fichier de construction, je reçois l'erreur suivante:Erreur de construction dans Eclipse avec build.xml

Buildfile: C:\Docs\ZacRocha\Desktop\sams\build.xml 
cxf.generated: 
    [echo] Generating code using Apache CXF wsdl2java... 
    [java] 16-Jun-2010 16:04:08 org.apache.cxf.binding.corba.CorbaConduit prepare 
    [java] SEVERE: Could not resolve target object 
    [java] 16-Jun-2010 16:04:08 org.apache.cxf.binding.corba.CorbaConduit prepare 
    [java] SEVERE: Could not resolve target object 
    [java] WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivesoftware.wsdl%7d 
    [java] Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivesoftware.wsdl%7d'.: java.io.FileNotFoundException: C:\Docs\ZacRocha\Desktop\sams\${archivesoftware.wsdl} (The system cannot find the file specified) 
    [java] 16-Jun-2010 16:04:10 org.apache.cxf.binding.corba.CorbaConduit prepare 
    [java] SEVERE: Could not resolve target object 
    [java] 16-Jun-2010 16:04:10 org.apache.cxf.binding.corba.CorbaConduit prepare 
    [java] SEVERE: Could not resolve target object 
    [java] WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from : file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivehardware.wsdl%7d 
    [java] Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing 'file:/C:/Docs/ZacRocha/Desktop/sams/$%7barchivehardware.wsdl%7d'.: java.io.FileNotFoundException: C:\Docs\ZacRocha\Desktop\sams\${archivehardware.wsdl} (The system cannot find the file specified) 
BUILD SUCCESSFUL 

Temps total: 4 secondes

Je suis habitué à programmer sur Eclipse et Je sais très peu de choses sur la construction avec Apache ANT. Quelqu'un peut-il me dire où exactement le problème peut être? Merci d'avance!

Répondre

0

Vous devez ajouter les pots appropriés à votre classpath, ou chaque fois que votre équipe a décidé de stocker les pots corrects

0

java.io.FileNotFoundException: C:\Docs\ZacRocha\Desktop\sams\${archivehardware.wsdl}

Il ressemble à la propriété ${archivehardware.wsdl} n'est pas résolu. Ces propriétés sont généralement définies dans le script de génération ou dans un fichier distinct build.properties.

0

La tâche ant qui génère le code java à partir de wsdl semble utiliser une propriété appelée 'archivehardware.wsdl'. Ajoutez cette propriété au script de construction. Par exemple,

<property name="archivehardware.wsdl" value="mydef.wsdl"/> 

ou si la propriété (variable) a été défini dans un fichier de propriétés, assurez-vous que le fichier de la propriété est inclus. Exemple,

<property file="build.properties"/> 
Questions connexes