Building JET2 files using ANT [message #31017] |
Tue, 14 August 2007 11:43  |
Eclipse User |
|
|
|
Originally posted by: danyiel.us.ibm.com
Hello,
I have created many JET2 files and now I need to build them into a .jar
file. How do you build JET files using ANT? How you do compile JET2
templates files? The output should be the same as exporting the
templates as deployable plug-ins when developing in eclipse.
Thank you,
Danyiel
|
|
|
|
Re: Building JET2 files using ANT [message #31470 is a reply to message #31156] |
Mon, 27 August 2007 09:34   |
Eclipse User |
|
|
|
Danyiel:
The jet.compile task requires the Eclipse ant runner:
eclipse -application org.eclipse.ant.core.antRunner ...ant command-line
arguments...
Also, there are ways to integrate JET template compilation in with PDE build
(the Eclipse plug-in development environment ant-based build mechanism). Let
me know if you're using PDE build, and I'll dig up the details.
Paul
"Danyiel Louis" <danyiel@us.ibm.com> wrote in message
news:f9t2t8$mhv$1@build.eclipse.org...
> Danyiel Louis wrote:
>> Hello,
>>
>> I have created many JET2 files and now I need to build them into a .jar
>> file. How do you build JET files using ANT? How you do compile JET2
>> templates files? The output should be the same as exporting the
>> templates as deployable plug-ins when developing in eclipse.
>>
>> Thank you,
>> Danyiel
>
>
> Hello,
> I am planning to jet the jet.compile ANT task to compile my JET2
> templates. See this website:
> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. jet.doc/references/ant/antTasks.xhtml
> on Ant tasks provided by JET.
> My question is where is the jet.compile class file? I get an error when
> using this Ant task. Should I define the task using taskdef? What jar
> file I am missing here? Here is the error I receive:
>
> Ant could not find the task or a class this task relies upon.
>
> This is common and has a number of causes; the usual
> solutions are to read the manual pages then download and
> install needed JAR files, or fix the build file:
> - You have misspelt 'jet.compile'.
> Fix: check your spelling.
> - The task needs an external JAR file to execute
> and this is not found at the right place in the classpath.
> Fix: check the documentation for dependencies.
> Fix: declare the task.
> - The task is an Ant optional task and the JAR file and/or libraries
> implementing the functionality were not found at the time you
> yourself built your installation of Ant from the Ant sources.
> Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
> task and make sure it contains more than merely a
> META-INF/MANIFEST.MF.
> If all it contains is the manifest, then rebuild Ant with the needed
> libraries present in ${ant.home}/lib/optional/ , or alternatively,
> download a pre-built release version from apache.org
> - The build file was written for a later version of Ant
> Fix: upgrade to at least the latest release version of Ant
> - The task is not an Ant core or optional task
> and needs to be declared using <taskdef>.
> - You are attempting to use a task defined using
> <presetdef> or <macrodef> but have spelt wrong or not
> defined it at the point of use
>
> Remember that for JAR files to be visible to Ant tasks implemented
> in ANT_HOME/lib, the files must be in the same directory or on the
> classpath
>
>
> Thanks for the help.
>
> Danyiel
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Building JET2 files using ANT [message #490154 is a reply to message #36969] |
Wed, 07 October 2009 10:56  |
Eclipse User |
|
|
|
Hi Paul,
Since jet.compile did not work for me when the project was not inside the eclipse workspace, I downloaded your patch, built it as a separate jar (org.eclipse.jet.examples.ant_0.9.0.jar), and copied it to the eclipse plugins directory.
I updated build.xml to call jet.compile2 and ran it using the following java command:
C:\Build\Tools\com.accenture.tools.tabbed>java -Xms128m -Xmx1024m -XX:MaxPermSize=256m -jar C:\Opt\eclipse\plugins\org.eclipse.equin
ox.launcher_1.0.200.v20090520.jar -application org.eclipse.ant.core.antRunner -data C:\Build\Tools -f C:\Build\Tools\com.accenture.t
ools.tabbed\build.xml jet2_multiple_templates.
The first time I ran it, it was successful. It generated the .java files from the templates. Without making any changes, I cleaned up the project and ran the java command again. It gave me null pointer exceptions.
I then deleted org.eclipse.jet.examples.ant project from my workspace, re-imported it and built it again. After this, the java command ran successfully the first time but gave null pointer exceptions after that.
Any idea why this is happening?
Is this how we are supposed to apply this patch or should we integrate it with org.eclipse.jet.source project?
Any help or suggestions will be appreciated.
Thanks!
|
|
|
Powered by
FUDForum. Page generated in 0.06137 seconds