You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by canadatom <to...@gmail.com> on 2010/02/25 16:29:38 UTC

Ant xmlproperty question

Hi all, I am new to ant, here is a simple task I want to do:
using xml to parse a xml and get a certain attribute off the xml.

example xml
[code]
<psf>
  <project reference="v1.0,http://blahblahblah1,desc1"/>
  <project reference="v1.1,http://blahblahblah2,desc2"/>
  <project reference="v1.2,http://blahblahblah3,desc3"/>
</psf>
[/code]

How can I echo a list of project reference? 
thanks for helping
-- 
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p27714461.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant xmlproperty question

Posted by Brian Agnew <br...@oopsconsultancy.com>.
That error message looks wrong given that you seem to be getting the 
correct result. I'll investigate that for a new release.

On 26/02/2010 19:54, Gilbert Rebhan wrote:
> -------- Original Message  --------
> Subject: Re: Ant xmlproperty question
> From: canadatom<to...@gmail.com>
> To: user@ant.apache.org
> Date: 26.02.2010 15:43
>
>    
>> thanks for reply, I used xmlproperty, now I am trying to extract url from
>> psf.project.reference
>>
>> <psf>
>>    <project reference="v1.0,http://blahblahblah1,desc1"/>
>>    <project reference="v1.1,http://blahblahblah2,desc2"/>
>>    <project reference="v1.2,http://blahblahblah3,desc3"/>
>> </psf>
>>
>> <for list="${psf.project.reference}" param="ref">
>>               <sequential>
>> 	<propertyregex property="url" input="@{ref}"
>> regexp="(http)(.*)" select="\0"/>
>> 		<echo>${url}</echo>
>> 	</sequential>
>> </for>
>> The above code doesn't work properly, please advice. Is there a better way
>> to do it?
>>      
> i would use the xmltask [1] (recommended for xml related stuff),
> combined with xpath [2] =
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project>
> <!-- Import XMLTask -->
> <taskdef name="xmltask"
> classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
>
> <target name="depends">
> <xmltask source="./example.xml">
>   <regexp path="//@reference" pattern=".+,(h.+),.+" replace="$1"/>
>   <copy path="//@reference" append="true" property="foobar"
>    propertyseparator="${line.separator}"/>
> </xmltask>
> </target>
>
> <target name="main" depends="depends">
>    <echo>$${foobar} = ${line.separator}${foobar}</echo>
> </target>
> </project>
>
>
> Buildfile: /home/ant/foo.xml
> depends:
>    [xmltask] Cannot append values to properties
>    [xmltask] Cannot append values to properties
>    [xmltask] Cannot append values to properties
> main:
>       [echo] ${foobar} =
>       [echo] http://blahblahblah1
>       [echo] http://blahblahblah2
>       [echo] http://blahblahblah3
> BUILD SUCCESSFUL
> Total time: 388 milliseconds
>
>
> the message "Cannot append values to properties"
> is a bit annoying but you may simply ignore it, i don't know
> how to get rid of it
>
>
> [1] http://www.oopsconsultancy.com/software/xmltask/
> [2] http://www.zvon.org/xxl/XPathTutorial/General/examples.html
>
>
>
> Regards, Gilbert
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>    

-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant xmlproperty question

Posted by Gilbert Rebhan <an...@schillbaer.de>.
-------- Original Message  --------
Subject: Re: Ant xmlproperty question
From: canadatom <to...@gmail.com>
To: user@ant.apache.org
Date: 26.02.2010 15:43

> 
> thanks for reply, I used xmlproperty, now I am trying to extract url from
> psf.project.reference
> 
> <psf>
>   <project reference="v1.0,http://blahblahblah1,desc1"/>
>   <project reference="v1.1,http://blahblahblah2,desc2"/>
>   <project reference="v1.2,http://blahblahblah3,desc3"/>
> </psf>
> 
> <for list="${psf.project.reference}" param="ref">
>              <sequential>
> 	            <propertyregex property="url" input="@{ref}"
> regexp="(http)(.*)" select="\0"/>
> 		<echo>${url}</echo>
> 	</sequential>
> </for>
> The above code doesn't work properly, please advice. Is there a better way
> to do it?

i would use the xmltask [1] (recommended for xml related stuff),
combined with xpath [2] =


<?xml version="1.0" encoding="UTF-8"?>
<project>
<!-- Import XMLTask -->
<taskdef name="xmltask"
classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>

<target name="depends">
<xmltask source="./example.xml">
 <regexp path="//@reference" pattern=".+,(h.+),.+" replace="$1"/>
 <copy path="//@reference" append="true" property="foobar"
  propertyseparator="${line.separator}"/>
</xmltask>
</target>

<target name="main" depends="depends">
  <echo>$${foobar} = ${line.separator}${foobar}</echo>
</target>
</project>


Buildfile: /home/ant/foo.xml
depends:
  [xmltask] Cannot append values to properties
  [xmltask] Cannot append values to properties
  [xmltask] Cannot append values to properties
main:
     [echo] ${foobar} =
     [echo] http://blahblahblah1
     [echo] http://blahblahblah2
     [echo] http://blahblahblah3
BUILD SUCCESSFUL
Total time: 388 milliseconds


the message "Cannot append values to properties"
is a bit annoying but you may simply ignore it, i don't know
how to get rid of it


[1] http://www.oopsconsultancy.com/software/xmltask/
[2] http://www.zvon.org/xxl/XPathTutorial/General/examples.html



Regards, Gilbert





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AW: Ant xmlproperty question

Posted by canadatom <to...@gmail.com>.
thanks for reply, I used xmlproperty, now I am trying to extract url from
psf.project.reference

<psf>
  <project reference="v1.0,http://blahblahblah1,desc1"/>
  <project reference="v1.1,http://blahblahblah2,desc2"/>
  <project reference="v1.2,http://blahblahblah3,desc3"/>
</psf>

<for list="${psf.project.reference}" param="ref">
             <sequential>
	            <propertyregex property="url" input="@{ref}"
regexp="(http)(.*)" select="\0"/>
		<echo>${url}</echo>
	</sequential>
</for>
The above code doesn't work properly, please advice. Is there a better way
to do it?

Thanks


Jan.Materne wrote:
> 
> You could try <xmlproperty>.
> 
> The solution which costs the most time is creating a XSLT which transforms
> that xml into a property file. Then just load that generated property
> file.
> 
> 
> Jan 
> 
>>-----Ursprüngliche Nachricht-----
>>Von: canadatom [mailto:tomoodesign@gmail.com] 
>>Gesendet: Donnerstag, 25. Februar 2010 16:30
>>An: user@ant.apache.org
>>Betreff: Ant xmlproperty question
>>
>>
>>Hi all, I am new to ant, here is a simple task I want to do:
>>using xml to parse a xml and get a certain attribute off the xml.
>>
>>example xml
>>[code]
>><psf>
>>  <project reference="v1.0,http://blahblahblah1,desc1"/>
>>  <project reference="v1.1,http://blahblahblah2,desc2"/>
>>  <project reference="v1.2,http://blahblahblah3,desc3"/>
>></psf>
>>[/code]
>>
>>How can I echo a list of project reference? 
>>thanks for helping
>>-- 
>>View this message in context: 
>>http://old.nabble.com/Ant-xmlproperty-question-tp27714461p27714461.html
>>Sent from the Ant - Users mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>For additional commands, e-mail: user-help@ant.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p27719078.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: Ant xmlproperty question

Posted by Ja...@rzf.fin-nrw.de.
You could try <xmlproperty>.

The solution which costs the most time is creating a XSLT which transforms that xml into a property file. Then just load that generated property file.


Jan 

>-----Ursprüngliche Nachricht-----
>Von: canadatom [mailto:tomoodesign@gmail.com] 
>Gesendet: Donnerstag, 25. Februar 2010 16:30
>An: user@ant.apache.org
>Betreff: Ant xmlproperty question
>
>
>Hi all, I am new to ant, here is a simple task I want to do:
>using xml to parse a xml and get a certain attribute off the xml.
>
>example xml
>[code]
><psf>
>  <project reference="v1.0,http://blahblahblah1,desc1"/>
>  <project reference="v1.1,http://blahblahblah2,desc2"/>
>  <project reference="v1.2,http://blahblahblah3,desc3"/>
></psf>
>[/code]
>
>How can I echo a list of project reference? 
>thanks for helping
>-- 
>View this message in context: 
>http://old.nabble.com/Ant-xmlproperty-question-tp27714461p27714461.html
>Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant xmlproperty question,Please help me

Posted by wolfgang haefelinger <wh...@gmail.com>.
Amasha,

there is
1) .classpath - an XML file
2) build.xml   - also an XML file
3) ${basedir}  - your build file's folder
4) ${ant.file}   - your build file
5) http://ant.apache.org/manual/CoreTasks/style.html - a task allowing
you to execute a XSLT stylesheet

That's pretty all you need to run a XSLT stylesheet on your Ant build
file. That stylesheet would run a XPATH query against .classpath to
extract the "excluding" entries you are looking for and insert them in
your build file where appropriate.

The only downside is, that something like

$ ant update-me-from-classpath  compile

is not working, cause Ant does not have something like "eval()".
Instead you would need to do something like

$ ant update-me-from-classpath
$ ant compile


However, I personally regard it as a bad idea to create build.xml out
of .classpath. It should be the other way round.

// Regards.


On Fri, Mar 26, 2010 at 9:49 AM, amasha <am...@hotmail.com> wrote:
>
> I have a .classpath:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
>        <classpathentry excluding="com/orange/homescreen/pil/android21impl
> /WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android21impl/UIInterfaceImpl.java"
> kind="src" path="src"/>
>        <classpathentry exported="true" kind="con"
> path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
>        <classpathentry kind="src" path="gen"/>
>        <classpathentry kind="output" path="bin"/>
> </classpath>
>
> And I want compile the source coding by ant. The ant script:
>        <target name="compile" depends="-resource-src, -aidl" description="Compiles
> project's .java files into .class files">
>                <!-- If android rules are used for a test project, its classpath should
> include
>             tested project's location -->
>                <condition property="extensible.classpath"
> value="${tested.project.absolute.dir}/bin/classes" else=".">
>                        <isset property="tested.project.absolute.dir" />
>                </condition>
>                <javac encoding="ascii" target="1.5" debug="true" extdirs=""
> destdir="${out.classes.absolute.dir}"
> bootclasspathref="android.target.classpath" verbose="${verbose}"
> classpath="${extensible.classpath}">
>                        <src path="${source.absolute.dir}" />
>                        <src path="${gen.absolute.dir}" />
>                        <exclude
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
>                        <exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
>                        <classpath>
>                                <fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
>                        </classpath>
>                </javac>
>        </target>
>
> In ant script. I must update my ant script manul, because
>
> <exclude name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
> />
> <exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
>
> often change following the .classpath file.
>
> So I want to know how can i do this auto following .classpath by ant script?
>
> Please help me
>
> Thank you
> --
> View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039514.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
Wolfgang Häfelinger
häfelinger IT - Applied Software Architecture
http://www.haefelinger.it
+31 648 27 61 59

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: AW: Ant xmlproperty question,Please help me

Posted by Ja...@rzf.fin-nrw.de.
Also, if you define Eclipse libraries only their name is referenced in the .classpath.
You dont know the JARs then ...

Jan 

> -----Ursprüngliche Nachricht-----
> Von: Knuplesch, Juergen [mailto:Juergen.Knuplesch@icongmbh.de] 
> Gesendet: Freitag, 26. März 2010 12:21
> An: Ant Users List
> Betreff: AW: AW: Ant xmlproperty question,Please help me
> 
> Hello,
> 
> I dont know what Xmltask is. We talk about ant, do we? 
> Is xmltask a task in ANT or what is it?
> 
> So why shouldnt you use XMLtask and ant4eclipse together?
> 
> Some code fragment:
>       <getEclipseClasspath classpathid="yourid"
>                              workspace="${yourEclipseWorkspace}"
>                              projectname="${YourEclipseProject}"
>                              runtime="true"/>
> 
> This gets you the Eclipse runtime classpath of the project 
> ${YourEclipseProject} in the workspace 
> ${yourEclipseWorkspace} into the path id yourid.
> 
> How to use ANT and ant4eclipse is described in the manuals.
> 
> Greetings Juergen
> 
> -- 
> Jürgen Knuplesch                    
> -----Ursprüngliche Nachricht-----
> Von: amasha [mailto:amasha_zhao@hotmail.com] 
> Gesendet: Freitag, 26. März 2010 10:35
> An: user@ant.apache.org
> Betreff: Re: AW: Ant xmlproperty question,Please help me
> 
> 
> Can you get me some script about ant4eclipse?
> 
> and I want to use XmlTask! 
> Would you have some suggestion? 
> 
> Thank you 
> 
> Knuplesch, Juergen wrote:
> > 
> > Hello,
> > 
> > I use ant4eclipse a lot and encourage as well to use it.
> > 
> > Greetings Jürgen
> > 
> > 
> > --
> > Jürgen Knuplesch
> > -----Ursprüngliche Nachricht-----
> > Von: amasha [mailto:amasha_zhao@hotmail.com]
> > Gesendet: Freitag, 26. März 2010 09:49
> > An: user@ant.apache.org
> > Betreff: Ant xmlproperty question,Please help me
> > 
> > 
> > I have a .classpath:
> > 
> > <?xml version="1.0" encoding="UTF-8"?> <classpath>
> > 	<classpathentry 
> excluding="com/orange/homescreen/pil/android21impl
> > 
> /WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android
> 21impl/UIInterfaceImpl.java"
> > kind="src" path="src"/>
> > 	<classpathentry exported="true" kind="con"
> > path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
> > 	<classpathentry kind="src" path="gen"/>
> > 	<classpathentry kind="output" path="bin"/> </classpath>
> > 
> > And I want compile the source coding by ant. The ant script:
> > 	<target name="compile" depends="-resource-src, -aidl"
> > description="Compiles project's .java files into .class files">
> > 		<!-- If android rules are used for a test 
> project, its classpath 
> > should include
> >              tested project's location -->
> > 		<condition property="extensible.classpath"
> > value="${tested.project.absolute.dir}/bin/classes" else=".">
> > 			<isset property="tested.project.absolute.dir" />
> > 		</condition>
> > 		<javac encoding="ascii" target="1.5" 
> debug="true" extdirs=""
> > destdir="${out.classes.absolute.dir}"
> > bootclasspathref="android.target.classpath" verbose="${verbose}"
> > classpath="${extensible.classpath}">
> > 			<src path="${source.absolute.dir}" />
> > 			<src path="${gen.absolute.dir}" />
> > 			<exclude
> > 
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
> > 			<exclude 
> name="${source-clients}/android21impl/UIInterfaceImpl.java" />
> > 			<classpath>
> > 				<fileset 
> dir="${external.libs.absolute.dir}" includes="*.jar" />
> > 			</classpath>
> > 		</javac>
> > 	</target>
> > 
> > In ant script. I must update my ant script manul, because
> > 		
> > <exclude
> > name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
> > />
> > <exclude 
> name="${source-clients}/android21impl/UIInterfaceImpl.java" 
> > />
> > 
> > often change following the .classpath file.
> > 
> > So I want to know how can i do this auto following 
> .classpath by ant 
> > script?
> > 
> > Please help me
> > 
> > Thank you
> > --
> > View this message in context:
> > 
> http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039514.htm
> > l Sent from the Ant - Users mailing list archive at Nabble.com.
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
> additional 
> > commands, e-mail: user-help@ant.apache.org
> > 
> > 
> > 
> 
> --
> View this message in context: 
> http://old.nabble.com/Ant-xmlproperty-question-tp27714461p2804
> 0021.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: AW: Ant xmlproperty question,Please help me

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Hello,

I dont know what Xmltask is. We talk about ant, do we? 
Is xmltask a task in ANT or what is it?

So why shouldnt you use XMLtask and ant4eclipse together?

Some code fragment:
      <getEclipseClasspath classpathid="yourid"
                             workspace="${yourEclipseWorkspace}"
                             projectname="${YourEclipseProject}"
                             runtime="true"/>

This gets you the Eclipse runtime classpath of the project ${YourEclipseProject} in the workspace ${yourEclipseWorkspace} into the path id yourid.

How to use ANT and ant4eclipse is described in the manuals.

Greetings Juergen

-- 
Jürgen Knuplesch                    
-----Ursprüngliche Nachricht-----
Von: amasha [mailto:amasha_zhao@hotmail.com] 
Gesendet: Freitag, 26. März 2010 10:35
An: user@ant.apache.org
Betreff: Re: AW: Ant xmlproperty question,Please help me


Can you get me some script about ant4eclipse?

and I want to use XmlTask! 
Would you have some suggestion? 

Thank you 

Knuplesch, Juergen wrote:
> 
> Hello,
> 
> I use ant4eclipse a lot and encourage as well to use it.
> 
> Greetings Jürgen
> 
> 
> --
> Jürgen Knuplesch
> -----Ursprüngliche Nachricht-----
> Von: amasha [mailto:amasha_zhao@hotmail.com]
> Gesendet: Freitag, 26. März 2010 09:49
> An: user@ant.apache.org
> Betreff: Ant xmlproperty question,Please help me
> 
> 
> I have a .classpath:
> 
> <?xml version="1.0" encoding="UTF-8"?> <classpath>
> 	<classpathentry excluding="com/orange/homescreen/pil/android21impl
> /WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android21impl/UIInterfaceImpl.java"
> kind="src" path="src"/>
> 	<classpathentry exported="true" kind="con"
> path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
> 	<classpathentry kind="src" path="gen"/>
> 	<classpathentry kind="output" path="bin"/> </classpath>
> 
> And I want compile the source coding by ant. The ant script:
> 	<target name="compile" depends="-resource-src, -aidl"
> description="Compiles project's .java files into .class files">
> 		<!-- If android rules are used for a test project, its classpath 
> should include
>              tested project's location -->
> 		<condition property="extensible.classpath"
> value="${tested.project.absolute.dir}/bin/classes" else=".">
> 			<isset property="tested.project.absolute.dir" />
> 		</condition>
> 		<javac encoding="ascii" target="1.5" debug="true" extdirs=""
> destdir="${out.classes.absolute.dir}"
> bootclasspathref="android.target.classpath" verbose="${verbose}"
> classpath="${extensible.classpath}">
> 			<src path="${source.absolute.dir}" />
> 			<src path="${gen.absolute.dir}" />
> 			<exclude
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
> 			<exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
> 			<classpath>
> 				<fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
> 			</classpath>
> 		</javac>
> 	</target>
> 
> In ant script. I must update my ant script manul, because
> 		
> <exclude
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
> />
> <exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" 
> />
> 
> often change following the .classpath file.
> 
> So I want to know how can i do this auto following .classpath by ant 
> script?
> 
> Please help me
> 
> Thank you
> --
> View this message in context:
> http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039514.htm
> l Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> 

--
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28040021.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AW: Ant xmlproperty question,Please help me

Posted by amasha <am...@hotmail.com>.
Can you get me some script about ant4eclipse?

and I want to use XmlTask! 
Would you have some suggestion? 

Thank you 

Knuplesch, Juergen wrote:
> 
> Hello,
> 
> I use ant4eclipse a lot and encourage as well to use it.
> 
> Greetings Jürgen 
> 
> 
> -- 
> Jürgen Knuplesch
> -----Ursprüngliche Nachricht-----
> Von: amasha [mailto:amasha_zhao@hotmail.com] 
> Gesendet: Freitag, 26. März 2010 09:49
> An: user@ant.apache.org
> Betreff: Ant xmlproperty question,Please help me
> 
> 
> I have a .classpath:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> 	<classpathentry excluding="com/orange/homescreen/pil/android21impl
> /WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android21impl/UIInterfaceImpl.java"
> kind="src" path="src"/>
> 	<classpathentry exported="true" kind="con"
> path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
> 	<classpathentry kind="src" path="gen"/>
> 	<classpathentry kind="output" path="bin"/> </classpath>
> 
> And I want compile the source coding by ant. The ant script:
> 	<target name="compile" depends="-resource-src, -aidl"
> description="Compiles project's .java files into .class files">
> 		<!-- If android rules are used for a test project, its classpath should
> include
>              tested project's location -->
> 		<condition property="extensible.classpath"
> value="${tested.project.absolute.dir}/bin/classes" else=".">
> 			<isset property="tested.project.absolute.dir" />
> 		</condition>
> 		<javac encoding="ascii" target="1.5" debug="true" extdirs=""
> destdir="${out.classes.absolute.dir}"
> bootclasspathref="android.target.classpath" verbose="${verbose}"
> classpath="${extensible.classpath}">
> 			<src path="${source.absolute.dir}" />
> 			<src path="${gen.absolute.dir}" />
> 			<exclude
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
> 			<exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
> 			<classpath>
> 				<fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
> 			</classpath>
> 		</javac>
> 	</target>
> 
> In ant script. I must update my ant script manul, because
> 		
> <exclude
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
> />
> <exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
> 
> often change following the .classpath file.
> 
> So I want to know how can i do this auto following .classpath by ant
> script?
> 
> Please help me
> 
> Thank you
> --
> View this message in context:
> http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039514.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28040021.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: Ant xmlproperty question,Please help me

Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
Hello,

I use ant4eclipse a lot and encourage as well to use it.

Greetings Jürgen 


-- 
Jürgen Knuplesch
-----Ursprüngliche Nachricht-----
Von: amasha [mailto:amasha_zhao@hotmail.com] 
Gesendet: Freitag, 26. März 2010 09:49
An: user@ant.apache.org
Betreff: Ant xmlproperty question,Please help me


I have a .classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry excluding="com/orange/homescreen/pil/android21impl
/WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android21impl/UIInterfaceImpl.java"
kind="src" path="src"/>
	<classpathentry exported="true" kind="con"
path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
	<classpathentry kind="src" path="gen"/>
	<classpathentry kind="output" path="bin"/> </classpath>

And I want compile the source coding by ant. The ant script:
	<target name="compile" depends="-resource-src, -aidl" description="Compiles project's .java files into .class files">
		<!-- If android rules are used for a test project, its classpath should include
             tested project's location -->
		<condition property="extensible.classpath"
value="${tested.project.absolute.dir}/bin/classes" else=".">
			<isset property="tested.project.absolute.dir" />
		</condition>
		<javac encoding="ascii" target="1.5" debug="true" extdirs=""
destdir="${out.classes.absolute.dir}"
bootclasspathref="android.target.classpath" verbose="${verbose}"
classpath="${extensible.classpath}">
			<src path="${source.absolute.dir}" />
			<src path="${gen.absolute.dir}" />
			<exclude
name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
			<exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
			<classpath>
				<fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
			</classpath>
		</javac>
	</target>

In ant script. I must update my ant script manul, because
		
<exclude name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
/>
<exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />

often change following the .classpath file.

So I want to know how can i do this auto following .classpath by ant script?

Please help me

Thank you
--
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039514.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: AW: Ant xmlproperty question,Please help me

Posted by amasha <am...@hotmail.com>.
But I want to use XmlTask!
Would you have some suggestion?

Thank you


Jan.Materne wrote:
> 
> Have you tried Ant4Eclipse?
> http://www.ant4eclipse.org/
> 
> 
> Jan 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: amasha [mailto:amasha_zhao@hotmail.com] 
>> Gesendet: Freitag, 26. März 2010 09:49
>> An: user@ant.apache.org
>> Betreff: Ant xmlproperty question,Please help me
>> 
>> 
>> I have a .classpath:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <classpath>
>> 	<classpathentry 
>> excluding="com/orange/homescreen/pil/android21impl
>> /WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android
>> 21impl/UIInterfaceImpl.java"
>> kind="src" path="src"/>
>> 	<classpathentry exported="true" kind="con"
>> path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
>> 	<classpathentry kind="src" path="gen"/>
>> 	<classpathentry kind="output" path="bin"/>
>> </classpath>
>> 
>> And I want compile the source coding by ant. The ant script:
>> 	<target name="compile" depends="-resource-src, -aidl" 
>> description="Compiles
>> project's .java files into .class files">
>> 		<!-- If android rules are used for a test 
>> project, its classpath should
>> include
>>              tested project's location -->
>> 		<condition property="extensible.classpath"
>> value="${tested.project.absolute.dir}/bin/classes" else=".">
>> 			<isset property="tested.project.absolute.dir" />
>> 		</condition>
>> 		<javac encoding="ascii" target="1.5" 
>> debug="true" extdirs=""
>> destdir="${out.classes.absolute.dir}"
>> bootclasspathref="android.target.classpath" verbose="${verbose}"
>> classpath="${extensible.classpath}">
>> 			<src path="${source.absolute.dir}" />
>> 			<src path="${gen.absolute.dir}" />
>> 			<exclude
>> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
>> 			<exclude 
>> name="${source-clients}/android21impl/UIInterfaceImpl.java" />
>> 			<classpath>
>> 				<fileset 
>> dir="${external.libs.absolute.dir}" includes="*.jar" />
>> 			</classpath>
>> 		</javac>
>> 	</target>
>> 
>> In ant script. I must update my ant script manul, because
>> 		
>> <exclude 
>> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
>> />
>> <exclude 
>> name="${source-clients}/android21impl/UIInterfaceImpl.java" />
>> 
>> often change following the .classpath file.
>> 
>> So I want to know how can i do this auto following .classpath 
>> by ant script?
>> 
>> Please help me
>> 
>> Thank you 
>> -- 
>> View this message in context: 
>> http://old.nabble.com/Ant-xmlproperty-question-tp27714461p2803
>> 9514.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039969.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


AW: Ant xmlproperty question,Please help me

Posted by Ja...@rzf.fin-nrw.de.
Have you tried Ant4Eclipse?
http://www.ant4eclipse.org/


Jan 

> -----Ursprüngliche Nachricht-----
> Von: amasha [mailto:amasha_zhao@hotmail.com] 
> Gesendet: Freitag, 26. März 2010 09:49
> An: user@ant.apache.org
> Betreff: Ant xmlproperty question,Please help me
> 
> 
> I have a .classpath:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> 	<classpathentry 
> excluding="com/orange/homescreen/pil/android21impl
> /WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android
> 21impl/UIInterfaceImpl.java"
> kind="src" path="src"/>
> 	<classpathentry exported="true" kind="con"
> path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
> 	<classpathentry kind="src" path="gen"/>
> 	<classpathentry kind="output" path="bin"/>
> </classpath>
> 
> And I want compile the source coding by ant. The ant script:
> 	<target name="compile" depends="-resource-src, -aidl" 
> description="Compiles
> project's .java files into .class files">
> 		<!-- If android rules are used for a test 
> project, its classpath should
> include
>              tested project's location -->
> 		<condition property="extensible.classpath"
> value="${tested.project.absolute.dir}/bin/classes" else=".">
> 			<isset property="tested.project.absolute.dir" />
> 		</condition>
> 		<javac encoding="ascii" target="1.5" 
> debug="true" extdirs=""
> destdir="${out.classes.absolute.dir}"
> bootclasspathref="android.target.classpath" verbose="${verbose}"
> classpath="${extensible.classpath}">
> 			<src path="${source.absolute.dir}" />
> 			<src path="${gen.absolute.dir}" />
> 			<exclude
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
> 			<exclude 
> name="${source-clients}/android21impl/UIInterfaceImpl.java" />
> 			<classpath>
> 				<fileset 
> dir="${external.libs.absolute.dir}" includes="*.jar" />
> 			</classpath>
> 		</javac>
> 	</target>
> 
> In ant script. I must update my ant script manul, because
> 		
> <exclude 
> name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
> />
> <exclude 
> name="${source-clients}/android21impl/UIInterfaceImpl.java" />
> 
> often change following the .classpath file.
> 
> So I want to know how can i do this auto following .classpath 
> by ant script?
> 
> Please help me
> 
> Thank you 
> -- 
> View this message in context: 
> http://old.nabble.com/Ant-xmlproperty-question-tp27714461p2803
> 9514.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Ant xmlproperty question,Please help me

Posted by amasha <am...@hotmail.com>.
I have a .classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry excluding="com/orange/homescreen/pil/android21impl
/WallpaperInterfaceImpl.java|com/orange/homescreen/pil/android21impl/UIInterfaceImpl.java"
kind="src" path="src"/>
	<classpathentry exported="true" kind="con"
path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
	<classpathentry kind="src" path="gen"/>
	<classpathentry kind="output" path="bin"/>
</classpath>

And I want compile the source coding by ant. The ant script:
	<target name="compile" depends="-resource-src, -aidl" description="Compiles
project's .java files into .class files">
		<!-- If android rules are used for a test project, its classpath should
include
             tested project's location -->
		<condition property="extensible.classpath"
value="${tested.project.absolute.dir}/bin/classes" else=".">
			<isset property="tested.project.absolute.dir" />
		</condition>
		<javac encoding="ascii" target="1.5" debug="true" extdirs=""
destdir="${out.classes.absolute.dir}"
bootclasspathref="android.target.classpath" verbose="${verbose}"
classpath="${extensible.classpath}">
			<src path="${source.absolute.dir}" />
			<src path="${gen.absolute.dir}" />
			<exclude
name="${source-clients}/android21impl/WallpaperInterfaceImpl.java" />
			<exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />
			<classpath>
				<fileset dir="${external.libs.absolute.dir}" includes="*.jar" />
			</classpath>
		</javac>
	</target>

In ant script. I must update my ant script manul, because
		
<exclude name="${source-clients}/android21impl/WallpaperInterfaceImpl.java"
/>
<exclude name="${source-clients}/android21impl/UIInterfaceImpl.java" />

often change following the .classpath file.

So I want to know how can i do this auto following .classpath by ant script?

Please help me

Thank you 
-- 
View this message in context: http://old.nabble.com/Ant-xmlproperty-question-tp27714461p28039514.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org