[
https://issues.apache.org/jira/browse/FELIX-4102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Carsten Ziegeler closed FELIX-4102.
-----------------------------------
> Missing dependencies in scr-ant-task
> ------------------------------------
>
> Key: FELIX-4102
> URL: https://issues.apache.org/jira/browse/FELIX-4102
> Project: Felix
> Issue Type: Bug
> Components: Maven SCR Plugin
> Affects Versions: scr ant task 1.6.0
> Reporter: Daniel Faber
> Assignee: Carsten Ziegeler
> Fix For: scr ant task 1.8.0
>
>
> The SCR ant task throws a NoClassDefFoundError:
> BUILD FAILED
> [...]/build.xml:13: java.lang.NoClassDefFoundError:
> org/osgi/service/component/annotations/Component
> at
> org.apache.felix.scrplugin.ds.DSAnnotationProcessor.process(DSAnnotationProcessor.java:69)
> at [...]
> This even happens with a minimal project consisting of a single empty
> component class:
> import org.apache.felix.scr.annotations.Component;
> @Component
> public class C { }
> The easiest workaround is to add org.osgi.compendium-4.3.1.jar to the taskdef
> classpath:
> <taskdef resource="scrtask.properties"
> classpath="org.apache.felix.scr.ant-1.6.0.jar;${user.home}/.m2/repository/org/osgi/org.osgi.compendium/4.3.1/org.osgi.compendium-4.3.1.jar"
> />
> If it's supposed to work like this please update the docs at
> https://cwiki.apache.org/FELIX/apache-felix-scr-ant-task-use.html
> If not please embed missing dependencies into the ant task jar file. For the
> above minimal project it's enough to add
> org/osgi/service/component/annotations/Component.class and
> org/osgi/service/component/ComponentContext.class from
> org.osgi.compendium-4.3.1.jar, but I don't know if this is sufficient in all
> cases.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira