You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Barvaz Kipod <ba...@gmail.com> on 2009/12/31 15:14:51 UTC
Pass “*.wsdl” to exec command
Hi,
I’m executing the following Ant exec command:
*<exec executable="${GPP_WEB_SERVICES_ROOT}/xmlbeans-sdk/bin/scomp" > *
* <arg line="-verbose -src
${GPP_WEB_SERVICES_ROOT}/xmlbeans_attachment_source -out
${GPP_WEB_SERVICES_ROOT}/gpp/webservices/WEB-INF/lib/wsgpp.jar
${GPP_WEB_SERVICES_ROOT}/artefacts/*.wsdl" /> *
* </exec>***
And got the followings error:
*The ' characters around the executable and arguments arenot part of the
command.*
* [exec] Apache Software Foundation, org.apache.xmlbeans.XmlBeans
version 2.3.0-r540734*
*[exec] *.wsdl:0: error: cannot.load.file: Cannot load wsdl file
/users2/cmbld/GPPSCHED/WEB/BUILD_FOLDER/GPPWebServices/artefacts/*.wsdl:
/users2/cmbld/GPPSCHED/WEB/BUILD_FOLDER/GPPWebServices/artefacts/*.wsdl (No
such file or directory)*
* [exec] Time to build schema type system: 0.193 seconds*
* [exec] BUILD FAILED*
If I replaced “*.wsdl” with full wsdl name like: “Country_List_Service.wsdl”
than the exec command pass successfully.
How can I pass “*.wsdl” to exec command that will not failed on “(No such
file or directory)”
Moreover, what is the menning of the error “The ' characters around the
executable and arguments arenot part of the command.”
Thanks.
Re: Pass “*.wsdl” to exec command
Posted by Antoine Levy Lambert <an...@gmx.de>.
Hello Barvaz,
this does not work because the scomp program does not do the expansion of
${GPP_WEB_SERVICES_ROOT}/artefacts/*.wsdl
What you need to do is the following
<fileset dir="${GPP_WEB_SERVICES_ROOT}/artefacts" id="wsdl.fs">
<include name="*.wsdl"/>
</fileset>
<pathconvert refid="wsdl.fs" pathsep=" " property="all.wsdl.files"/>
<exec executable="${GPP_WEB_SERVICES_ROOT}/xmlbeans-sdk/bin/scomp" > *
* <arg line="-verbose -src
${GPP_WEB_SERVICES_ROOT}/xmlbeans_attachment_source -out
${GPP_WEB_SERVICES_ROOT}/gpp/webservices/WEB-INF/lib/wsgpp.jar
${all.wsdl.files}" /> *
assuming that the number of files is not such that you hit a limit of command line length (4096 chars on current versions of Windows I think).
Antoine
Barvaz Kipod wrote:
> Hi,
>
>
>
> I’m executing the following Ant exec command:
>
>
>
> *<exec executable="${GPP_WEB_SERVICES_ROOT}/xmlbeans-sdk/bin/scomp" > *
>
> * <arg line="-verbose -src
> ${GPP_WEB_SERVICES_ROOT}/xmlbeans_attachment_source -out
> ${GPP_WEB_SERVICES_ROOT}/gpp/webservices/WEB-INF/lib/wsgpp.jar
> ${GPP_WEB_SERVICES_ROOT}/artefacts/*.wsdl" /> *
>
> * </exec>***
>
>
>
> And got the followings error:
>
>
>
> *The ' characters around the executable and arguments arenot part of the
> command.*
>
> * [exec] Apache Software Foundation, org.apache.xmlbeans.XmlBeans
> version 2.3.0-r540734*
>
> *[exec] *.wsdl:0: error: cannot.load.file: Cannot load wsdl file
> /users2/cmbld/GPPSCHED/WEB/BUILD_FOLDER/GPPWebServices/artefacts/*.wsdl:
> /users2/cmbld/GPPSCHED/WEB/BUILD_FOLDER/GPPWebServices/artefacts/*.wsdl (No
> such file or directory)*
>
> * [exec] Time to build schema type system: 0.193 seconds*
>
> * [exec] BUILD FAILED*
>
>
>
> If I replaced “*.wsdl” with full wsdl name like: “Country_List_Service.wsdl”
> than the exec command pass successfully.
>
> How can I pass “*.wsdl” to exec command that will not failed on “(No such
> file or directory)”
>
>
>
> Moreover, what is the menning of the error “The ' characters around the
> executable and arguments arenot part of the command.”
>
>
>
> Thanks.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org