Ken/Anissa,
There's another option to use apt with the Netbeans bundled ant:
In NetBeans 5.0 or 5.5 IDE, Tools -> Options -> Miscellaneous -> click
the "Manage Classpath..." button. Add
<jsftemplating-home>/lib/external/ant-apt.jar into the Classpath Editor.
thanks,
Ed
Ken Paulsen wrote:
>
> Thanks Anissa!
>
> I'm sending this to the dev_at_jsftemplating.dev.java.net email alias as
> others are likely to be interested in this also.
>
> I'll give this a try as soon as I get time to download NB's and try it
> out (I'm overdue for this anyway).
>
> Thanks,
>
> Ken
>
> Anissa Lam wrote:
>
>>
>> Almost all the glassfish module is a netbeans project, i think
>> jsftemplating should be available as a netbeans project also. For
>> those who uses netbeans for development, this is very essential.
>> I have attached the 2 files that is needed. Just create a directory
>> "nbproject" and put the 2 files under there. So, your directory
>> structure looks like this:
>>
>> <jsftemplating-home>
>> ... build.project
>> ... src
>> ... nbproject
>> ... ide-file-targets.xml
>> ... project.xml
>>
>> You can then open this as a project in netbeans. You can do 'build
>> project' or 'clean project' etc.
>> The only thing i am not sure is compiling individual files. I am
>> using 'javac' here, (look into ide-file-targets.xml), maybe we
>> should use 'apt'.
>>
>> The version of ant that comes with netbeans 5.5 doesn't support apt
>> target. You will need to change it to point to the one that does.
>> To do so, goto Tools -> Options, select Miscellaneous on the left
>> side, select 'ant' and change Ant Home.
>> Another option is to just copy
>> <jsftemplating>/lib/external/ant-apt.jar to the Ant Home specified
>> in the ide, so you don't need to change Ant Home.
>>
>> Please let me know if you have any problem. I can check in to the
>> project once i get confirmation from you that it is working.
>>
>> thanks
>> Anissa.
>>
>>
>>------------------------------------------------------------------------
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><!--
>> The contents of this file are subject to the terms
>> of the Common Development and Distribution License
>> (the License). You may not use this file except in
>> compliance with the License.
>>
>> You can obtain a copy of the license at
>> https://glassfish.dev.java.net/public/CDDLv1.0.html or
>> glassfish/bootstrap/legal/CDDLv1.0.txt.
>> See the License for the specific language governing
>> permissions and limitations under the License.
>>
>> When distributing Covered Code, include this CDDL
>> Header Notice in each file and include the License file
>> at glassfish/bootstrap/legal/CDDLv1.0.txt.
>> If applicable, add the following below the CDDL Header,
>> with the fields enclosed by brackets [] replaced by
>> you own identifying information:
>> "Portions Copyrighted [year] [name of copyright owner]"
>>
>> Copyright 2006 Sun Microsystems, Inc. All rights reserved.
>>-->
>><project basedir=".." name="JSF Templating">
>> <property file="build.properties"/>
>> <!-- TODO: edit the following target according to your needs -->
>> <!-- (more info: http://www.netbeans.org/kb/41/freeform-config.html#compilesingle) -->
>> <target name="compile-selected-files-in-java">
>> <fail unless="files">Must set property 'files'</fail>
>> <!-- TODO decide on and define some value for ${build.classes.dir} -->
>> <mkdir dir="${build}"/>
>> <javac destdir="${build}" includes="${files}" source="1.5" srcdir="src/java">
>> <classpath path="${glassfish-home}/lib/javaee.jar"/>
>> </javac>
>> </target>
>></project>
>>
>>
>>------------------------------------------------------------------------
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><!--
>> The contents of this file are subject to the terms
>> of the Common Development and Distribution License
>> (the License). You may not use this file except in
>> compliance with the License.
>>
>> You can obtain a copy of the license at
>> https://glassfish.dev.java.net/public/CDDLv1.0.html or
>> glassfish/bootstrap/legal/CDDLv1.0.txt.
>> See the License for the specific language governing
>> permissions and limitations under the License.
>>
>> When distributing Covered Code, include this CDDL
>> Header Notice in each file and include the License file
>> at glassfish/bootstrap/legal/CDDLv1.0.txt.
>> If applicable, add the following below the CDDL Header,
>> with the fields enclosed by brackets [] replaced by
>> you own identifying information:
>> "Portions Copyrighted [year] [name of copyright owner]"
>>
>> Copyright 2006 Sun Microsystems, Inc. All rights reserved.
>>-->
>><project xmlns="http://www.netbeans.org/ns/project/1">
>> <type>org.netbeans.modules.ant.freeform</type>
>> <configuration>
>> <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
>> <!--Do not use Project Properties customizer when editing this file manually.-->
>> <name>JSF Templating</name>
>> <properties>
>> <property-file>build.properties</property-file>
>> </properties>
>> <folders>
>> <source-folder>
>> <label>src\java</label>
>> <type>java</type>
>> <location>src/java</location>
>> </source-folder>
>> </folders>
>> <ide-actions>
>> <action name="build">
>> <target>all</target>
>> </action>
>> <action name="clean">
>> <target>clean</target>
>> </action>
>> <action name="rebuild">
>> <target>clean</target>
>> <target>all</target>
>> </action>
>> <action name="compile.single">
>> <script>nbproject/ide-file-targets.xml</script>
>> <target>compile-selected-files-in-java</target>
>> <context>
>> <property>files</property>
>> <folder>src/java</folder>
>> <pattern>\.java$</pattern>
>> <format>relative-path</format>
>> <arity>
>> <separated-files>,</separated-files>
>> </arity>
>> </context>
>> </action>
>> </ide-actions>
>> <view>
>> <items>
>> <source-folder style="packages">
>> <label>src\java</label>
>> <location>src/java</location>
>> </source-folder>
>> <source-file>
>> <location>build.xml</location>
>> </source-file>
>> </items>
>> <context-menu>
>> <ide-action name="build"/>
>> <ide-action name="clean"/>
>> <ide-action name="rebuild"/>
>> </context-menu>
>> </view>
>> <subprojects/>
>> </general-data>
>> <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
>> <compilation-unit>
>> <package-root>src/java</package-root>
>> <classpath mode="compile">${glassfish-home}/lib/javaee.jar</classpath>
>> <source-level>1.5</source-level>
>> </compilation-unit>
>> </java-data>
>> </configuration>
>></project>
>>
>>