Home » Eclipse Projects » Eclipse Platform » Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess
Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #290835] |
Thu, 01 September 2005 21:49 |
Frank Parrott Messages: 52 Registered: July 2009 |
Member |
|
|
Hi folks,
I haven't heard back from the developer, however maybe someone has tried
this or something similar before, and can give me some ideas of where
I'm going wrong.
I've downloaded an Ant task called preprocessor
(http://prebop.sourceforge.net/). This plug-in automatically adds the
preprocessor task to the ANT_HOME/lib path. So I create a target tag in
my plug-in build.xml file as follows:
<target name "preprocess" depends="init" description="preprocessor">
<preprocess indir="${basedir}/src/" outdir="${basedir}/src/"
our="merge">
<var name="version" value="3.1.0" />
<filetype commantend="*/" commentbegin="/*" externsion="java" />
</preprocess>
</target>
When I get the "Ant Build..." wizard up, I select tasks, preprocess,
build.update.jar, and then hit "run".
The build fails with the Ant message "Could not create task or type of
type: preprocess."
So in preferences->Ant->runtime, I see the following:
- under tab "task", location is pointing to the preprocessor.jar.
- under tab "classpath", "Contributed Entries", I see the same exact
path as referred to by the "location".
Is this enough info for Ant to find the proprocessor task path?
should Ant be looking in the "Contributed Entries" variable also?
I did try to put the same path/location to the preprocessor.jar, into
the "Ant Home Entries", but the build failed with the same error.
With the path to preprocessor.jar in "Ant Home Entries", I tried to
debug the "preprocess" target, and look at the "java.class.path", and I
see the preprocessor in the path. I also turned on -verbose -debug in
Ant, but I'm not sure what I'm looking for here. I mean, I get stack
trace showing:
org.apache.tools.ant.UnknowElement.getNotFoundException
org.apache.tools.ant.UnknowElement.maybeConfigure
org.apache.tools.ant.Task.perform
ANy suggestions would be greatly appreciated.
Regards,
Frank
|
|
|
Re: Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #290896 is a reply to message #290835] |
Fri, 02 September 2005 16:10 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
I doubt that your ANT_HOME/lib is being read by Eclipse, which instead bundles its own version of Ant as a plugin. (org.apache.ant_1.6.5).
What you'll need to do is edit the Launch Configuration (Run -> Run... -- bit of a bad menu name but they won't change it) and then put the prebop Jar files as part of the classpath environment for the Ant build launch.
|
|
|
Re: Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #291046 is a reply to message #290896] |
Tue, 06 September 2005 17:57 |
Frank Parrott Messages: 52 Registered: July 2009 |
Member |
|
|
Alex Blewitt wrote:
> I doubt that your ANT_HOME/lib is being read by Eclipse, which instead bundles its own version of Ant as a plugin. (org.apache.ant_1.6.5).
>
> What you'll need to do is edit the Launch Configuration (Run -> Run... -- bit of a bad menu name but they won't change it) and then put the prebop Jar files as part of the classpath environment for the Ant build launch.
Hi Alex,
Thanks for your reply and help. I'm having problems with Eclipse3.1
attempting to run this Ant task on windows and linux. I get the same
error on both platforms.
This is my first experience with Ant in general, so I'm sure that I
understood your instructions correctly. I saw the Run->Run... menu item.
Do I add a variable referencing preprocessor jars in the Environment
tab. Not sure what to enter here.
I tried this. Select build.xml->right click->Run As->Ant Build. In the
"Run an Ant buildfile" wizard, select "Classpath" tab. Under "User
Entries"->Ant Home->add external JARs..., and select the path to the
preprocessor.jar and also add preprocess.jar.
What I don't understand, when I debug the build.xml file, target
"preprocess", in the debugger variable System Properties,
java.class.path has the correct psth to the preprocessor and preprocess
jars.
I don't understand what other (classpath?) thing I'm missing?
I'm trying to use the Ant application that Eclipse provides. For my PDE
plug-in, I'm using the feature.xml, to auto create the build.xml file
for each of my plug-ins where makes up feature. Then add the
"preprocess" target into the needed build.xml.
Thanks for any ideas.
Regards,
Frank
|
|
|
Re: Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #291048 is a reply to message #290896] |
Tue, 06 September 2005 18:16 |
Frank Parrott Messages: 52 Registered: July 2009 |
Member |
|
|
Alex Blewitt wrote:
> I doubt that your ANT_HOME/lib is being read by Eclipse, which instead bundles its own version of Ant as a plugin. (org.apache.ant_1.6.5).
>
> What you'll need to do is edit the Launch Configuration (Run -> Run... -- bit of a bad menu name but they won't change it) and then put the prebop Jar files as part of the classpath environment for the Ant build launch.
Hi Alex,
Thanks for your reply and help. I'm having problems with Eclipse3.1
attempting to run this Ant task on windows and linux. I get the same
error on both platforms.
This is my first experience with Ant in general, so I'm sure that I
understood your instructions correctly. I saw the Run->Run... menu item.
Do I add a variable referencing preprocessor jars in the Environment
tab. Not sure what to enter here.
I tried this. Select build.xml->right click->Run As->Ant Build. In the
"Run an Ant buildfile" wizard, select "Classpath" tab. Under "User
Entries"->Ant Home->add external JARs..., and select the path to the
preprocessor.jar and also add preprocess.jar.
What I don't understand, when I debug the build.xml file, target
"preprocess", in the debugger variable System Properties,
java.class.path has the correct psth to the preprocessor and preprocess
jars.
I don't understand what other (classpath?) thing I'm missing?
I'm trying to use the Ant application that Eclipse provides. For my PDE
plug-in, I'm using the feature.xml, to auto create the build.xml file
for each of my plug-ins where makes up feature. Then add the
"preprocess" target into the needed build.xml.
Thanks for any ideas.
Regards,
Frank
|
|
|
Re: Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #291052 is a reply to message #290896] |
Tue, 06 September 2005 19:02 |
Frank Parrott Messages: 52 Registered: July 2009 |
Member |
|
|
Alex Blewitt wrote:
> I doubt that your ANT_HOME/lib is being read by Eclipse, which instead bundles its own version of Ant as a plugin. (org.apache.ant_1.6.5).
>
> What you'll need to do is edit the Launch Configuration (Run -> Run... -- bit of a bad menu name but they won't change it) and then put the prebop Jar files as part of the classpath environment for the Ant build launch.
Hi Alex,
Thanks for your reply and help. I'm having problems with Eclipse3.1
attempting to run this Ant task on windows and linux. I get the same
error on both platforms.
This is my first experience with Ant in general, so I'm sure that I
understood your instructions correctly. I saw the Run->Run... menu item.
Do I add a variable referencing preprocessor jars in the Environment
tab. Not sure what to enter here.
I tried this. Select build.xml->right click->Run As->Ant Build. In the
"Run an Ant buildfile" wizard, select "Classpath" tab. Under "User
Entries"->Ant Home->add external JARs..., and select the path to the
preprocessor.jar and also add preprocess.jar.
What I don't understand, when I debug the build.xml file, target
"preprocess", in the debugger variable System Properties,
java.class.path has the correct psth to the preprocessor and preprocess
jars.
I don't understand what other (classpath?) thing I'm missing?
I'm trying to use the Ant application that Eclipse provides. For my PDE
plug-in, I'm using the feature.xml, to auto create the build.xml file
for each of my plug-ins where makes up feature. Then add the
"preprocess" target into the needed build.xml.
Thanks for any ideas.
Regards,
Frank
|
|
|
Re: Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #291057 is a reply to message #291046] |
Wed, 07 September 2005 07:56 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
From the stacktrace, does it look like the error message is being thrown from the prebob file directly, or only from the core Ant libraries?
It's possible that your build file doesn't define the build as a task (you'll need something like <taskdef name="prebob" classname="PreTask" classpath="prebob.jar"/>[/xml] in there; look at the documentation for those libraries if you're not sure what these things should be). If you've got it successfully running outside of Eclipse though, that's unlikely to be it.
You did do the right thing in adding the entries for the JARs in the classpath though; that's what I was suggesting. Just to be sure though; you need to include the full path including the JAR name, and not just the path, so it should be 'c:\my\ant\lib\prebop.jar' and not just 'c:\my\ant\lib' ... but you probably did the right thing (I'm just checking :-)
If you can e-mail a sample project/build.xml file then I might be able to offer more assistance, but I can't think of anything else right now that would help based on the few lines of stacktrace that you've sent already. I'm reading this via the http://www.eclipsezone.com forum, and last time, it ate the build.xml file that you posted (http://www.eclipsezone.com/java/forums/m91921183.html). You can drop it to alex_blewitt@yahoo.com or alex.blewitt@gmail.com.
|
|
| |
Re: Eclipse 3.1 with Ant1.6.5: Can't find Ant Task preprocess [message #291117 is a reply to message #291057] |
Thu, 08 September 2005 13:36 |
Frank Parrott Messages: 52 Registered: July 2009 |
Member |
|
|
Alex Blewitt wrote:
> From the stacktrace, does it look like the error message is being thrown from the prebob file directly, or only from the core Ant libraries?
>
> It's possible that your build file doesn't define the build as a task (you'll need something like <taskdef name="prebob" classname="PreTask" classpath="prebob.jar"/>[/xml] in there; look at the documentation for those libraries if you're not sure what these things should be). If you've got it successfully running outside of Eclipse though, that's unlikely to be it.
>
> You did do the right thing in adding the entries for the JARs in the classpath though; that's what I was suggesting. Just to be sure though; you need to include the full path including the JAR name, and not just the path, so it should be 'c:\my\ant\lib\prebop.jar' and not just 'c:\my\ant\lib' ... but you probably did the right thing (I'm just checking :-)
>
> If you can e-mail a sample project/build.xml file then I might be able to offer more assistance, but I can't think of anything else right now that would help based on the few lines of stacktrace that you've sent already. I'm reading this via the http://www.eclipsezone.com forum, and last time, it ate the build.xml file that you posted (http://www.eclipsezone.com/java/forums/m91921183.html). You can drop it to alex_blewitt@yahoo.com or alex.blewitt@gmail.com.
Hi Alex,
Thanks very much for your time and assistance. I got a response from
Darin, for me to try this:
In the "Run as Ant Buildfile" wizard, under the "JRE" tab, I had
"separate JRE" set, instead of "Run in the same JRE as the workspace".
Once I set this, then the preprocess Ant task was successful.
Many thanks again for your responses.
Regards,
Frank
|
|
|
Goto Forum:
Current Time: Fri Apr 26 00:10:26 GMT 2024
Powered by FUDForum. Page generated in 0.06756 seconds
|