Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Code Block
xml
xml
<project ...>

  <taskdef
    resource="scrtask.properties"
    classpath="org.apache.felix.scr.ant-1.01.0-SNAPSHOT4.jar" />

</project>

Of course the value you set in the classpath attribute depends on the actual location of the org.apache.felix.scr.ant JAR file.

...

Attribute

Required

Default

Description

scrdir

Yes

The root directory of the implicitly defined fileset denoting the files to consider for annotation and/or JavaDoc tag processing.

destdir

Yes

The name of the directory where the descriptor files are generated into. This is also used as the directory where the compiled classes from the srcdir may be located. This directory is actually added as another element to the classpath as defined by classpath and classpathRef.

classpath

No

The class path used to load classes from to analyse for the descriptor file generation. Generally this will be the same class path as the one used to compile the sources.

classpathRef

No

A reference to a class path used to load classes from to analyse for the descriptor file generation. Generally this will be the same class path as the one used to compile the sources.

finalName

No

serviceComponents.xml

The name of the descriptor file to create. This file is always located inside the OSGI-INF folder in the destdir.

metaTypeName

No

metatype.xml

The name of the descriptor file to create. This file is always located inside the OSGI-INF/metatype folder in the destdir.

generateAccessors

No

true

If this switch is turned on, the bind and unbind methods for unary references are automatically generated by the plugin.

annotationTagProviders

No

List of fully qualified class names providing more Annotation Tag Providers. As of version 1.4.0 of the SCR Annotations library this configuration element is optional if the SCR Annotations library comes with a proper SPI setup (see Extending SCR Annotations)

specVersion

No

Auto-Detected

The plugin will generate a descriptor for the Declarative Service version (either 1.0 or 1.1). If no value is specified, the plugin will detect the version and only use 1.1 if features from this version are used.

strictMode

No

false

If set to true, a warning will be considered as an error and the build will fail with warnings generated by this task.

parseJavadoc

No

true

If set to true, javadoc based annotations will be processed.

processAnnotations

No

true

If set to true, SCR annotations will be processed

The scr task must be provided with the same class path as was used to compile the sources. The classes in the class path are used by the task to be able to load compiled classes (mostly for Java 5 annotation processing) and any base classes, which may be extended. The easiest way to share the class path is to define a class path property and refer to it with the classpathref attribute of the scr task.

...