Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
backport175
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p>An <em>Ant</em> task is provided to compile the annotations.</p> <h3>Usage</h3> <p>First you need to activate the custom task in your <em>Ant</em> <code>build.xml</code> file with the following: (refer to <em>Ant</em> documentation on <em>"taskdef"</em> for more details)</p> <table class="wysiwyg-macro" data-macro-name="code" data-macro-default-parameter="xml" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e2NvZGU6eG1sfQ&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> <!-- we assume we defined a classpath with the id="backport175.class.path" for backport175 jars --> <path id="backport175.class.path"> ... <pathelement path="pathToBackport175.jar"/> ... </path> <!-- define the custom task (annotationc can be changed to what you prefer) <taskdef name="annotationc" classname="org.codehaus.backport175.compiler.task.AnnotationCTask" classpathref="aw.class.path"/> <!-- Note: the <taskdef> element can be nested within a <target> element at your convenience --> <!-- invoke the annotationc defined task --> <target name="samples:task:annotationc" depends="init, compile:all"> <annotationc verbose="true" destdir="${basedir}/target/samples-classes" properties="${basedir}/src/samples/annotation.properties" copytodest="**/*.dtd"> <src path="${basedir}/src/samples"/> <src path="${basedir}/src/test"/> <classpath path="${basedir}/target/samples-classes"/> <classpath path="${basedir}/target/test-classes"/> <classpath path="${basedir}/target/classes"/> <fileset dir="other"> <include name="**/BAZ.java"/> </fileset> </annotationc> </target> </pre></td></tr></table> <h3>Reference</h3> <p>The <code>AnnotationCTask</code> task accepts the following:</p> <ul> <li>verbose: (optional) flag marking the task verbosity (true/false)</li> <li>ignoreUnkown: (optional) flag marking if the task should ignore unknown annotations (like f.e. @author if not associated to an annotation interface) (true / false)</li> <li>properties: (optional) path to a properties file when user-defined annoations are to be used</li> <li>destdir: (optional unless input classes are in more than one path) directory where to put annnotated class files</li> <li>copytodest: (optional) filename pattern to copy extra resources like DTD, XML, or properties files that were found in the input classes path(s). By defaults, only <code>.class</code> files will be handled. It is ignored if <code>destdir</code> is not set.</li> </ul> <p>Use the following parameters to configure the classpath to point to the classes to be weaved. Those can be specified with nested elements as well/instead:</p> <ul> <li>properties path=..: extra path to a properties file where user-defined annotations are to be used</li> <li>classpath: classpath of classes to be annotated, as well as classpath to discover user-defined annotations if any</li> <li>classpathref: classpath reference of classes to be annotated, as well as classpath to discover user-defined annotations if any</li> <li>srcdir: directory where to find annotated java source files</li> <li>sourcepath: path where to find annotated java source files</li> <li>sourcepathref: path reference where to find annotated java source files</li> </ul> <p>Nested elements are similar to the <code>javac</code> task when you configure a classpath and a sourcepath:</p> <ul> <li>classpath: Path-like structure of classes to annotated, as well as classpath to discover user-defined annotations if any</li> <li>src: single path entry of annotated java source files</li> <li>sourcepath: Path-like structure of annotated java source files</li> <li>fileset: fileset to contain annotated java source files</li> </ul>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced