You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Diego Chagastelles <dc...@gmail.com> on 2006/09/04 20:11:38 UTC
Ant Dojo Compression
Hi, I´m an Ant beginner and I am trying to insert a javascript compression
(using Dojo compression Tool "custom_rhino.jar") in my Ant Build File. I
tried to execute the jar and generate the output file (the compressed
javascript) using the "outputproperty" property. Unfortunatelly to me, it
doesn´t work.
<property name="saida" location="${basedir}"></property>
<target name="teste" depends="depends" description="HemoSysWeb">
> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
> input="WebContent/pessoa.js" output="error.js"
> outputproperty="${saida}" fork="true">
> </java>
> </target>
>
After that, I read that I supose to make a new Ant Task to do this job. What
do you think? Could you help me with that?
Thanks,
Diego Chagastelles
Re: Ant Dojo Compression
Posted by Stefan Bodewig <bo...@apache.org>.
On Mon, 4 Sep 2006, Diego Chagastelles <dc...@gmail.com>
wrote:
> Hi, I´m an Ant beginner and I am trying to insert a javascript
> compression (using Dojo compression Tool "custom_rhino.jar") in my
> Ant Build File. I tried to execute the jar and generate the output
> file (the compressed javascript) using the "outputproperty"
> property.
outputproperty captures what custom_rhino.jar writes to System.out -
is this where your compressed JavaScript goes?
> <property name="saida" location="${basedir}"></property>
>
> <target name="teste" depends="depends" description="HemoSysWeb">
> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
> input="WebContent/pessoa.js" output="error.js"
> outputproperty="${saida}" fork="true">
The attribute expects the name of a property while ${saida} is its
value. Does it work if you use outputproperty="saida"?
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Replace problem
Posted by Keith Hall <ke...@granada-learning.com>.
Have you tried
<replace file="language.xml" token="@ENCODING" value="<?xml
version="1.0" encoding="ISO-8859-1" ?>" />
Michael Bauroth wrote:
> Hi MAT,
>
> unfortunately the issue is another one (using Eclipse):
>
> <quote>
> The value of attribute "value" associated with an element type
> "replace" must not contain the '<' character.
> </quote>
>
> Regards
> Michael
>
> Mathieu Champlon schrieb:
>> Michael Bauroth a écrit :
>>> Hi,
>>>
>>> I'm having a little problem with the replace task. Here is the code
>>> snippet:
>>>
>>> <replace file="language.xml" token="@ENCODING" value="<?xml
>>> version="1.0" encoding="ISO-8859-1" ?>" />
>>>
>>> The use of wrapping CDATA doesn't work too.
>>>
>>> Have you eventually any suggestions?
>> Hello,
>>
>> If I understand the issue correctly :
>> <replace file="language.xml" token="@ENCODING" value='<?xml
>> version="1.0" encoding="ISO-8859-1" ?>' />
>> or
>> <replace file="language.xml" token="@ENCODING" value="<?xml
>> version="1.0" encoding="ISO-8859-1" ?>" />
>>
>>
>> MAT.
>
>
> ---------------------------------------------------------------------
> 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: Replace problem
Posted by Michael Bauroth <mi...@falcom.de>.
No, & isn't allowed too :(
I've found another solution(!) at all :)
In the build script itself I use an import of an external property file:
<property file="./build/build-tracker.props" />
The property file contains:
encoding = <?xml version="1.0" encoding="ISO-8859-1" ?>
The replace task in the build script looks like this:
<replace file="language.xml" token="@ENCODING@" value='${encoding}' />
Regards
Michael
Mathieu Champlon schrieb:
> Michael Bauroth a écrit :
>> Hi MAT,
>>
>> unfortunately the issue is another one (using Eclipse):
>>
>> <quote>
>> The value of attribute "value" associated with an element type
>> "replace" must not contain the '<' character.
>> </quote>
> What about :
> <replace file="language.xml" token="@ENCODING" value='<?xml
> version="1.0" encoding="ISO-8859-1" ?>'/>
>
> The > is probably not required but it surely does not harm...
>
> MAT.
>
> ---------------------------------------------------------------------
> 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: Replace problem
Posted by Mathieu Champlon <m....@free.fr>.
Michael Bauroth a écrit :
> Hi MAT,
>
> unfortunately the issue is another one (using Eclipse):
>
> <quote>
> The value of attribute "value" associated with an element type
> "replace" must not contain the '<' character.
> </quote>
What about :
<replace file="language.xml" token="@ENCODING" value='<?xml
version="1.0" encoding="ISO-8859-1" ?>'/>
The > is probably not required but it surely does not harm...
MAT.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Replace problem
Posted by Michael Bauroth <mi...@falcom.de>.
Hi MAT,
unfortunately the issue is another one (using Eclipse):
<quote>
The value of attribute "value" associated with an element type "replace"
must not contain the '<' character.
</quote>
Regards
Michael
Mathieu Champlon schrieb:
> Michael Bauroth a écrit :
>> Hi,
>>
>> I'm having a little problem with the replace task. Here is the code
>> snippet:
>>
>> <replace file="language.xml" token="@ENCODING" value="<?xml
>> version="1.0" encoding="ISO-8859-1" ?>" />
>>
>> The use of wrapping CDATA doesn't work too.
>>
>> Have you eventually any suggestions?
> Hello,
>
> If I understand the issue correctly :
> <replace file="language.xml" token="@ENCODING" value='<?xml
> version="1.0" encoding="ISO-8859-1" ?>' />
> or
> <replace file="language.xml" token="@ENCODING" value="<?xml
> version="1.0" encoding="ISO-8859-1" ?>" />
>
>
> MAT.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Replace problem
Posted by Mathieu Champlon <m....@free.fr>.
Michael Bauroth a écrit :
> Hi,
>
> I'm having a little problem with the replace task. Here is the code
> snippet:
>
> <replace file="language.xml" token="@ENCODING" value="<?xml
> version="1.0" encoding="ISO-8859-1" ?>" />
>
> The use of wrapping CDATA doesn't work too.
>
> Have you eventually any suggestions?
Hello,
If I understand the issue correctly :
<replace file="language.xml" token="@ENCODING" value='<?xml
version="1.0" encoding="ISO-8859-1" ?>' />
or
<replace file="language.xml" token="@ENCODING" value="<?xml
version="1.0" encoding="ISO-8859-1" ?>" />
MAT.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Replace problem
Posted by Michael Bauroth <mi...@falcom.de>.
Hi,
I'm having a little problem with the replace task. Here is the code snippet:
<replace file="language.xml" token="@ENCODING" value="<?xml
version="1.0" encoding="ISO-8859-1" ?>" />
The use of wrapping CDATA doesn't work too.
Have you eventually any suggestions?
Thanx in advance.
Regards
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant Dojo Compression
Posted by Diego Chagastelles <dc...@gmail.com>.
I found the problem. I renamed the 'custom_rhino.jar' to 'js.jar' and
everything worked fine. Thank you for the help.
On 9/13/06, JM <j...@jespermadsen.com> wrote:
>
>
> Diego,
>
> Have you downloaded the latest custom rhino jar from DOJO?
> The only think I can think of is that you are using an old version that
> doesn't have the right compressScript method signature used by the custom
> ant task.
>
> JM
>
>
> Diego Chagastelles wrote:
> >
> > JM, the last problem I solved. Now, I don´t know what to do with this
> > problem:
> >
> > BUILD FAILED
> > java.lang.NoSuchMethodError:
> org.mozilla.javascript.Context.compressScript
> > (Lorg/mozilla/javascript/Script;I)Ljava/lang/String;
> >
> > Do you know what it might be?
> >
> >
> > On 9/11/06, Diego Chagastelles <dc...@gmail.com> wrote:
> >>
> >> JM, I tried to configure the task, but with these configuration my IDE
> >> doesn´t find the class.
> >>
> >> <taskdef name="compress-js" classname="
> >> com.webpanes.tools.ant.taskdefs.CompressJS"
> >> classpathref ="myclasspath"/>
> >>
> >> Message: "Reference not found"
> >>
> >> the classpathref property is not required. Should I keep it?
> >>
> >>
> >> On 9/9/06, Diego Chagastelles < dchagastelles@gmail.com> wrote:
> >> >
> >> > Thank you! Thats what I was looking for!
> >> >
> >> >
> >> > On 9/7/06, JM < j@jespermadsen.com> wrote:
> >> > >
> >> > >
> >> > > Can I suggest you use the excellent javascript compressor ant task
> >> > > from LCA
> >> > > Soft ( http://www.lcasoft.com/compress-js.html
> >> > > http://www.lcasoft.com/compress-js.html ) which is based DOJO
> Rhino.
> >> > >
> >> > > JM
> >> > >
> >> > >
> >> > > Diego Chagastelles wrote:
> >> > > >
> >> > > > Hi, I´m an Ant beginner and I am trying to insert a javascript
> >> > > compression
> >> > > > (using Dojo compression Tool "custom_rhino.jar") in my Ant Build
> >> > > File. I
> >> > > > tried to execute the jar and generate the output file (the
> >> > > compressed
> >> > > > javascript) using the "outputproperty" property. Unfortunatelly
> to
> >> > > me, it
> >> > > > doesn´t work.
> >> > > >
> >> > > >
> >> > > > <property name="saida" location="${basedir}"></property>
> >> > > >
> >> > > > <target name="teste" depends="depends" description="HemoSysWeb">
> >> > > >> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
> >> > > >> input="WebContent/pessoa.js" output=" error.js"
> >> > > >> outputproperty="${saida}" fork="true">
> >> > > >> </java>
> >> > > >> </target>
> >> > > >>
> >> > > >
> >> > > >
> >> > > > After that, I read that I supose to make a new Ant Task to do
> this
> >> > > job.
> >> > > > What
> >> > > > do you think? Could you help me with that?
> >> > > >
> >> > > > Thanks,
> >> > > > Diego Chagastelles
> >> > > >
> >> > > >
> >> > >
> >> > > --
> >> > > View this message in context:
> >> > > http://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6197998
> >> > > Sent from the Ant - Users forum at Nabble.com .
> >> > >
> >> > >
> >> > >
> ---------------------------------------------------------------------
> >> > > 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://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6296070
> Sent from the Ant - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Re: Ant Dojo Compression
Posted by JM <j...@jespermadsen.com>.
Diego,
Have you downloaded the latest custom rhino jar from DOJO?
The only think I can think of is that you are using an old version that
doesn't have the right compressScript method signature used by the custom
ant task.
JM
Diego Chagastelles wrote:
>
> JM, the last problem I solved. Now, I don´t know what to do with this
> problem:
>
> BUILD FAILED
> java.lang.NoSuchMethodError: org.mozilla.javascript.Context.compressScript
> (Lorg/mozilla/javascript/Script;I)Ljava/lang/String;
>
> Do you know what it might be?
>
>
> On 9/11/06, Diego Chagastelles <dc...@gmail.com> wrote:
>>
>> JM, I tried to configure the task, but with these configuration my IDE
>> doesn´t find the class.
>>
>> <taskdef name="compress-js" classname="
>> com.webpanes.tools.ant.taskdefs.CompressJS"
>> classpathref ="myclasspath"/>
>>
>> Message: "Reference not found"
>>
>> the classpathref property is not required. Should I keep it?
>>
>>
>> On 9/9/06, Diego Chagastelles < dchagastelles@gmail.com> wrote:
>> >
>> > Thank you! Thats what I was looking for!
>> >
>> >
>> > On 9/7/06, JM < j@jespermadsen.com> wrote:
>> > >
>> > >
>> > > Can I suggest you use the excellent javascript compressor ant task
>> > > from LCA
>> > > Soft ( http://www.lcasoft.com/compress-js.html
>> > > http://www.lcasoft.com/compress-js.html ) which is based DOJO Rhino.
>> > >
>> > > JM
>> > >
>> > >
>> > > Diego Chagastelles wrote:
>> > > >
>> > > > Hi, I´m an Ant beginner and I am trying to insert a javascript
>> > > compression
>> > > > (using Dojo compression Tool "custom_rhino.jar") in my Ant Build
>> > > File. I
>> > > > tried to execute the jar and generate the output file (the
>> > > compressed
>> > > > javascript) using the "outputproperty" property. Unfortunatelly to
>> > > me, it
>> > > > doesn´t work.
>> > > >
>> > > >
>> > > > <property name="saida" location="${basedir}"></property>
>> > > >
>> > > > <target name="teste" depends="depends" description="HemoSysWeb">
>> > > >> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
>> > > >> input="WebContent/pessoa.js" output=" error.js"
>> > > >> outputproperty="${saida}" fork="true">
>> > > >> </java>
>> > > >> </target>
>> > > >>
>> > > >
>> > > >
>> > > > After that, I read that I supose to make a new Ant Task to do this
>> > > job.
>> > > > What
>> > > > do you think? Could you help me with that?
>> > > >
>> > > > Thanks,
>> > > > Diego Chagastelles
>> > > >
>> > > >
>> > >
>> > > --
>> > > View this message in context:
>> > > http://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6197998
>> > > Sent from the Ant - Users forum at Nabble.com .
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > 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://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6296070
Sent from the Ant - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant Dojo Compression
Posted by Diego Chagastelles <dc...@gmail.com>.
JM, the last problem I solved. Now, I don´t know what to do with this
problem:
BUILD FAILED
java.lang.NoSuchMethodError: org.mozilla.javascript.Context.compressScript
(Lorg/mozilla/javascript/Script;I)Ljava/lang/String;
Do you know what it might be?
On 9/11/06, Diego Chagastelles <dc...@gmail.com> wrote:
>
> JM, I tried to configure the task, but with these configuration my IDE
> doesn´t find the class.
>
> <taskdef name="compress-js" classname="
> com.webpanes.tools.ant.taskdefs.CompressJS"
> classpathref ="myclasspath"/>
>
> Message: "Reference not found"
>
> the classpathref property is not required. Should I keep it?
>
>
> On 9/9/06, Diego Chagastelles < dchagastelles@gmail.com> wrote:
> >
> > Thank you! Thats what I was looking for!
> >
> >
> > On 9/7/06, JM < j@jespermadsen.com> wrote:
> > >
> > >
> > > Can I suggest you use the excellent javascript compressor ant task
> > > from LCA
> > > Soft ( http://www.lcasoft.com/compress-js.html
> > > http://www.lcasoft.com/compress-js.html ) which is based DOJO Rhino.
> > >
> > > JM
> > >
> > >
> > > Diego Chagastelles wrote:
> > > >
> > > > Hi, I´m an Ant beginner and I am trying to insert a javascript
> > > compression
> > > > (using Dojo compression Tool "custom_rhino.jar") in my Ant Build
> > > File. I
> > > > tried to execute the jar and generate the output file (the
> > > compressed
> > > > javascript) using the "outputproperty" property. Unfortunatelly to
> > > me, it
> > > > doesn´t work.
> > > >
> > > >
> > > > <property name="saida" location="${basedir}"></property>
> > > >
> > > > <target name="teste" depends="depends" description="HemoSysWeb">
> > > >> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
> > > >> input="WebContent/pessoa.js" output=" error.js"
> > > >> outputproperty="${saida}" fork="true">
> > > >> </java>
> > > >> </target>
> > > >>
> > > >
> > > >
> > > > After that, I read that I supose to make a new Ant Task to do this
> > > job.
> > > > What
> > > > do you think? Could you help me with that?
> > > >
> > > > Thanks,
> > > > Diego Chagastelles
> > > >
> > > >
> > >
> > > --
> > > View this message in context:
> > > http://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6197998
> > > Sent from the Ant - Users forum at Nabble.com .
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > > For additional commands, e-mail: user-help@ant.apache.org
> > >
> > >
> >
>
Re: Ant Dojo Compression
Posted by Diego Chagastelles <dc...@gmail.com>.
JM, I tried to configure the task, but with these configuration my IDE
doesn´t find the class.
<taskdef name="compress-js" classname="
com.webpanes.tools.ant.taskdefs.CompressJS"
classpathref ="myclasspath"/>
Message: "Reference not found"
the classpathref property is not required. Should I keep it?
On 9/9/06, Diego Chagastelles <dc...@gmail.com> wrote:
>
> Thank you! Thats what I was looking for!
>
>
> On 9/7/06, JM <j...@jespermadsen.com> wrote:
> >
> >
> > Can I suggest you use the excellent javascript compressor ant task from
> > LCA
> > Soft ( http://www.lcasoft.com/compress-js.html
> > http://www.lcasoft.com/compress-js.html ) which is based DOJO Rhino.
> >
> > JM
> >
> >
> > Diego Chagastelles wrote:
> > >
> > > Hi, I´m an Ant beginner and I am trying to insert a javascript
> > compression
> > > (using Dojo compression Tool "custom_rhino.jar") in my Ant Build File.
> > I
> > > tried to execute the jar and generate the output file (the compressed
> > > javascript) using the "outputproperty" property. Unfortunatelly to me,
> > it
> > > doesn´t work.
> > >
> > >
> > > <property name="saida" location="${basedir}"></property>
> > >
> > > <target name="teste" depends="depends" description="HemoSysWeb">
> > >> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
> > >> input="WebContent/pessoa.js" output=" error.js"
> > >> outputproperty="${saida}" fork="true">
> > >> </java>
> > >> </target>
> > >>
> > >
> > >
> > > After that, I read that I supose to make a new Ant Task to do this
> > job.
> > > What
> > > do you think? Could you help me with that?
> > >
> > > Thanks,
> > > Diego Chagastelles
> > >
> > >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6197998
> > Sent from the Ant - Users forum at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
Re: Ant Dojo Compression
Posted by Diego Chagastelles <dc...@gmail.com>.
Thank you! Thats what I was looking for!
On 9/7/06, JM <j...@jespermadsen.com> wrote:
>
>
> Can I suggest you use the excellent javascript compressor ant task from
> LCA
> Soft ( http://www.lcasoft.com/compress-js.html
> http://www.lcasoft.com/compress-js.html ) which is based DOJO Rhino.
>
> JM
>
>
> Diego Chagastelles wrote:
> >
> > Hi, I´m an Ant beginner and I am trying to insert a javascript
> compression
> > (using Dojo compression Tool "custom_rhino.jar") in my Ant Build File. I
> > tried to execute the jar and generate the output file (the compressed
> > javascript) using the "outputproperty" property. Unfortunatelly to me,
> it
> > doesn´t work.
> >
> >
> > <property name="saida" location="${basedir}"></property>
> >
> > <target name="teste" depends="depends" description="HemoSysWeb">
> >> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
> >> input="WebContent/pessoa.js" output="error.js"
> >> outputproperty="${saida}" fork="true">
> >> </java>
> >> </target>
> >>
> >
> >
> > After that, I read that I supose to make a new Ant Task to do this job.
> > What
> > do you think? Could you help me with that?
> >
> > Thanks,
> > Diego Chagastelles
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6197998
> Sent from the Ant - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
Re: Ant Dojo Compression
Posted by JM <j...@jespermadsen.com>.
Can I suggest you use the excellent javascript compressor ant task from LCA
Soft ( http://www.lcasoft.com/compress-js.html
http://www.lcasoft.com/compress-js.html ) which is based DOJO Rhino.
JM
Diego Chagastelles wrote:
>
> Hi, I´m an Ant beginner and I am trying to insert a javascript compression
> (using Dojo compression Tool "custom_rhino.jar") in my Ant Build File. I
> tried to execute the jar and generate the output file (the compressed
> javascript) using the "outputproperty" property. Unfortunatelly to me, it
> doesn´t work.
>
>
> <property name="saida" location="${basedir}"></property>
>
> <target name="teste" depends="depends" description="HemoSysWeb">
>> <java jar="WebContent/WEB-INF/lib/custom_rhino.jar"
>> input="WebContent/pessoa.js" output="error.js"
>> outputproperty="${saida}" fork="true">
>> </java>
>> </target>
>>
>
>
> After that, I read that I supose to make a new Ant Task to do this job.
> What
> do you think? Could you help me with that?
>
> Thanks,
> Diego Chagastelles
>
>
--
View this message in context: http://www.nabble.com/Ant-Dojo-Compression-tf2216629.html#a6197998
Sent from the Ant - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org