Did you mean Struts2?
________________________________ From: Lukasz Lenart <lukaszlen...@apache.org> To: Struts Users Mailing List <user@struts.apache.org> Sent: Thursday, April 4, 2013 12:36 PM Subject: Re: generating taglib using Ant and Java 6 If you find a solution, please share it as we can use with Struts 3 then :-) 2013/4/4 Steven Yang <kenshin...@gmail.com>: > Sorry this may not be directed to Struts2 > > I have written some Struts2 taglib and want to package them into a jar. > I am not using maven so I used to use Ant with apt tag. > And my task looks like the following > <target name="generate-taglib" > > <apt classpathref="tags.classpath" factorypathref="tags.classpath" > srcdir="StrutsTags" compile="false" destdir="dist/apt" fork="true" > preprocessdir="bin" verbose="false" source="1.5" encoding="utf-8" > > factory="org.apache.struts.annotations.taglib.apt.TLDAnnotationProcessorFactory" > includeantruntime="false"> > > <compilerarg value="-AtlibVersion=1.0" /> > <compilerarg value="-AjspVersion=2.0" /> > <compilerarg value="-AshortName=mb" /> > <compilerarg value="-Auri=/struts-my-tags" /> > <compilerarg value="-Adescription='My Struts Tags'" /> > <compilerarg value="-AdisplayName='My Struts Tags'" /> > <compilerarg value="-AoutTemplatesDir=${basedir}/dist/taglib-doc" /> > <compilerarg value="-AoutFile=${basedir}/bin/META-INF/struts-my-tags.tld" /> > </apt> > </target> > > However since java 6 apt has been removed or not supported I want to use > the Annotation Processor in the Java Compiler. But I couldnt find any > direct example and I came up with the following > > <target name="generate-taglib" depends="compile"> > <javac destdir="bin" > debug="true" > failonerror="true" > compiler="javac1.6" > srcdir="StrutsTags" includeantruntime="false" encoding="utf-8" > verbose="true"> > <include name="**/*.java"/> > <classpath refid="tags.classpath"/> > <compilerarg line="-proc:only"/> > <compilerarg line="-processor > org.apache.struts.annotations.taglib.apt.TagAnnotationProcessor" /> > <compilerarg line="-s dist/apt" /> > <compilerarg line="-source 6"/> > <compilerarg value="-AtlibVersion=1.0.1" /> > <compilerarg value="-AjspVersion=2.0" /> > <compilerarg value="-AshortName=mb" /> > <compilerarg value="-Auri=/struts-my-tags" /> > <compilerarg value="-Adescription='My Struts Tags'" /> > <compilerarg value="-AdisplayName='My Struts Tags'" /> > <compilerarg value="-AoutTemplatesDir=${basedir}/dist/taglib-doc" /> > <compilerarg value="-AoutFile=${basedir}/bin/META-INF/struts-my-tags.tld" /> > </javac> > </target> > > When I run this the task completes successfully however nothing is > generated in the struts-my-tags.tld. > > Can someone tell me whats wrong? > > Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org