Running ant task within Eclipse [message #327828] |
Mon, 05 May 2008 11:40 |
|
Hi,
If I run an Ant task within Eclipse I sometimes have to manually refresh the
folders in Eclipse to get the desired result. Details on my problem below.
Is it possible in Eclipse to refresh a specific folder after a certain ant
task? This would be in the middle of the complete ant excecution.
Alternatively I can run ant outside Eclipse, which also solves my problem.
Best regards, Lars
----------------
Details:
I do an Xinclude of docbook files. As the source code which is included in
these XIncludes gets special delimiter signs I have to remove these via a
small Java program.
<target name="specialsign" depends="xinclude">
<java classname="removeStrings.RemoveSpecialSigns">
</java>
</target>
The coding is really simple:
public class RemoveSpecialSigns {
public static void main(String[] args) throws FileNotFoundException {
FileListing fileListing = new FileListing();
fileListing.setDir("./output.tmp");
List<File> files = fileListing.getFileListing();
MyFile workingFile = new MyFile();
for (File file : files) {
System.out.println(file);
String fileName = file.getAbsolutePath();
workingFile.copy(fileName);
workingFile.delete(fileName);
workingFile.move(fileName);
}
}
}
MyFile does replace the characters:
String newLine = line.replaceAll(" ", "") + "\n";
|
|
|
|
Re: Running ant task within Eclipse [message #327845 is a reply to message #327844] |
Mon, 05 May 2008 20:43 |
|
Hi Wayne,
thanks for the reply.
I assumed this would refresh the workspace / project after the ant script is
finished. I'm looking for a refreash after a certain ant task (before the
next is excecuted).
Is my assumption incorrect? Best regards, Lars
"Wayne Beaton" <wayne@eclipse.org> wrote in message
news:1210008656.6034.0.camel@BADWOLF...
> Do the options on the "Refresh" tab of the "Run As... > Ant Build..."
> dialog help?
>
> Wayne
>
> On Mon, 2008-05-05 at 13:40 +0200, Lars Vogel wrote:
>> Hi,
>>
>> If I run an Ant task within Eclipse I sometimes have to manually refresh
>> the
>> folders in Eclipse to get the desired result. Details on my problem
>> below.
>>
>> Is it possible in Eclipse to refresh a specific folder after a certain
>> ant
>> task? This would be in the middle of the complete ant excecution.
>>
>> Alternatively I can run ant outside Eclipse, which also solves my
>> problem.
>>
>> Best regards, Lars
>> ----------------
>>
>> Details:
>>
>> I do an Xinclude of docbook files. As the source code which is included
>> in
>> these XIncludes gets special delimiter signs I have to remove these via a
>> small Java program.
>> <target name="specialsign" depends="xinclude">
>>
>> <java classname="removeStrings.RemoveSpecialSigns">
>>
>> </java>
>>
>> </target>
>>
>> The coding is really simple:
>>
>>
>>
>> public class RemoveSpecialSigns {
>>
>>
>> public static void main(String[] args) throws FileNotFoundException {
>>
>>
>> FileListing fileListing = new FileListing();
>>
>> fileListing.setDir("./output.tmp");
>>
>> List<File> files = fileListing.getFileListing();
>>
>> MyFile workingFile = new MyFile();
>>
>> for (File file : files) {
>>
>> System.out.println(file);
>>
>> String fileName = file.getAbsolutePath();
>>
>> workingFile.copy(fileName);
>>
>> workingFile.delete(fileName);
>>
>> workingFile.move(fileName);
>>
>> }
>>
>> }
>>
>> }
>>
>>
>>
>> MyFile does replace the characters:
>>
>>
>>
>> String newLine = line.replaceAll(" ", "") + "\n";
>>
>>
>>
>>
>>
>>
>>
>>
>
|
|
|
Re: Running ant task within Eclipse [message #327846 is a reply to message #327845] |
Mon, 05 May 2008 21:29 |
Benjamin Muskalla Messages: 237 Registered: July 2009 |
Senior Member |
|
|
Hi Lars,
you can use the eclipse.refreshLocal ant task (see
http://help.eclipse.org/help33/topic/org.eclipse.platform.do c.isv/guide/ant.htm).
Be sure to let the ant build run in the same JRE as your eclipse runs in
(see Launch dialog of the ant launch configuration).
Greets
Benny
Lars Vogel wrote:
> Hi Wayne,
>
> thanks for the reply.
>
> I assumed this would refresh the workspace / project after the ant script is
> finished. I'm looking for a refreash after a certain ant task (before the
> next is excecuted).
>
> Is my assumption incorrect? Best regards, Lars
>
>
> "Wayne Beaton" <wayne@eclipse.org> wrote in message
> news:1210008656.6034.0.camel@BADWOLF...
>> Do the options on the "Refresh" tab of the "Run As... > Ant Build..."
>> dialog help?
>>
>> Wayne
>>
>> On Mon, 2008-05-05 at 13:40 +0200, Lars Vogel wrote:
>>> Hi,
>>>
>>> If I run an Ant task within Eclipse I sometimes have to manually refresh
>>> the
>>> folders in Eclipse to get the desired result. Details on my problem
>>> below.
>>>
>>> Is it possible in Eclipse to refresh a specific folder after a certain
>>> ant
>>> task? This would be in the middle of the complete ant excecution.
>>>
>>> Alternatively I can run ant outside Eclipse, which also solves my
>>> problem.
>>>
>>> Best regards, Lars
>>> ----------------
>>>
>>> Details:
>>>
>>> I do an Xinclude of docbook files. As the source code which is included
>>> in
>>> these XIncludes gets special delimiter signs I have to remove these via a
>>> small Java program.
>>> <target name="specialsign" depends="xinclude">
>>>
>>> <java classname="removeStrings.RemoveSpecialSigns">
>>>
>>> </java>
>>>
>>> </target>
>>>
>>> The coding is really simple:
>>>
>>>
>>>
>>> public class RemoveSpecialSigns {
>>>
>>>
>>> public static void main(String[] args) throws FileNotFoundException {
>>>
>>>
>>> FileListing fileListing = new FileListing();
>>>
>>> fileListing.setDir("./output.tmp");
>>>
>>> List<File> files = fileListing.getFileListing();
>>>
>>> MyFile workingFile = new MyFile();
>>>
>>> for (File file : files) {
>>>
>>> System.out.println(file);
>>>
>>> String fileName = file.getAbsolutePath();
>>>
>>> workingFile.copy(fileName);
>>>
>>> workingFile.delete(fileName);
>>>
>>> workingFile.move(fileName);
>>>
>>> }
>>>
>>> }
>>>
>>> }
>>>
>>>
>>>
>>> MyFile does replace the characters:
>>>
>>>
>>>
>>> String newLine = line.replaceAll(" ", "") + "\n";
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>
>
|
|
|
Re: Running ant task within Eclipse [message #327898 is a reply to message #327846] |
Wed, 07 May 2008 20:48 |
|
Hi Benny,
thank you, cool tip!
Best regards, Lars
"Benjamin Muskalla" <bmuskalla@innoopract.com> wrote in message
news:fvnu76$h51$1@build.eclipse.org...
> Hi Lars,
>
> you can use the eclipse.refreshLocal ant task (see
> http://help.eclipse.org/help33/topic/org.eclipse.platform.do c.isv/guide/ant.htm).
>
> Be sure to let the ant build run in the same JRE as your eclipse runs in
> (see Launch dialog of the ant launch configuration).
>
> Greets
> Benny
>
> Lars Vogel wrote:
>> Hi Wayne,
>>
>> thanks for the reply.
>>
>> I assumed this would refresh the workspace / project after the ant script
>> is finished. I'm looking for a refreash after a certain ant task (before
>> the next is excecuted).
>>
>> Is my assumption incorrect? Best regards, Lars
>>
>>
>> "Wayne Beaton" <wayne@eclipse.org> wrote in message
>> news:1210008656.6034.0.camel@BADWOLF...
>>> Do the options on the "Refresh" tab of the "Run As... > Ant Build..."
>>> dialog help?
>>>
>>> Wayne
>>>
>>> On Mon, 2008-05-05 at 13:40 +0200, Lars Vogel wrote:
>>>> Hi,
>>>>
>>>> If I run an Ant task within Eclipse I sometimes have to manually
>>>> refresh the
>>>> folders in Eclipse to get the desired result. Details on my problem
>>>> below.
>>>>
>>>> Is it possible in Eclipse to refresh a specific folder after a certain
>>>> ant
>>>> task? This would be in the middle of the complete ant excecution.
>>>>
>>>> Alternatively I can run ant outside Eclipse, which also solves my
>>>> problem.
>>>>
>>>> Best regards, Lars
>>>> ----------------
>>>>
>>>> Details:
>>>>
>>>> I do an Xinclude of docbook files. As the source code which is included
>>>> in
>>>> these XIncludes gets special delimiter signs I have to remove these via
>>>> a
>>>> small Java program.
>>>> <target name="specialsign" depends="xinclude">
>>>>
>>>> <java classname="removeStrings.RemoveSpecialSigns">
>>>>
>>>> </java>
>>>>
>>>> </target>
>>>>
>>>> The coding is really simple:
>>>>
>>>>
>>>>
>>>> public class RemoveSpecialSigns {
>>>>
>>>>
>>>> public static void main(String[] args) throws FileNotFoundException {
>>>>
>>>>
>>>> FileListing fileListing = new FileListing();
>>>>
>>>> fileListing.setDir("./output.tmp");
>>>>
>>>> List<File> files = fileListing.getFileListing();
>>>>
>>>> MyFile workingFile = new MyFile();
>>>>
>>>> for (File file : files) {
>>>>
>>>> System.out.println(file);
>>>>
>>>> String fileName = file.getAbsolutePath();
>>>>
>>>> workingFile.copy(fileName);
>>>>
>>>> workingFile.delete(fileName);
>>>>
>>>> workingFile.move(fileName);
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>> MyFile does replace the characters:
>>>>
>>>>
>>>>
>>>> String newLine = line.replaceAll(" ", "") + "\n";
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03544 seconds