Generate DS annotations in maven (#193)

Signed-off-by: Stefan Triller <stefan.triller@telekom.de>
This commit is contained in:
Stefan Triller 2017-08-15 16:13:06 +02:00 committed by Kai Kreuzer
parent f8f8c29f84
commit d9fe30081d
2 changed files with 34 additions and 0 deletions

View File

@ -69,6 +69,7 @@
<tycho-version>1.0.0</tycho-version> <tycho-version>1.0.0</tycho-version>
<tycho-groupid>org.eclipse.tycho</tycho-groupid> <tycho-groupid>org.eclipse.tycho</tycho-groupid>
<jdt-annotations.version>2.1.0</jdt-annotations.version> <jdt-annotations.version>2.1.0</jdt-annotations.version>
<ds-annotations.version>1.2.8</ds-annotations.version>
</properties> </properties>
<description>This is the open Home Automation Bus (openHAB)</description> <description>This is the open Home Automation Bus (openHAB)</description>
@ -143,6 +144,16 @@
</supportedProjectTypes> </supportedProjectTypes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<version>1.24.0</version>
<configuration>
<supportedProjectTypes>
<supportedProjectType>eclipse-plugin</supportedProjectType>
</supportedProjectTypes>
</configuration>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
</build> </build>

View File

@ -23,6 +23,12 @@
<version>3.4.0</version> <version>3.4.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.ds-annotations</artifactId>
<version>${ds-annotations.version}</version>
<optional>true</optional>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -82,6 +88,18 @@
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
<executions>
<execution>
<id>generate-scr-scrdescriptor</id>
<goals>
<goal>scr</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
<pluginManagement> <pluginManagement>
@ -101,6 +119,11 @@
<artifactId>org.eclipse.jdt.annotation</artifactId> <artifactId>org.eclipse.jdt.annotation</artifactId>
<version>${jdt-annotations.version}</version> <version>${jdt-annotations.version}</version>
</extraClasspathElement> </extraClasspathElement>
<extraClasspathElement>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr.ds-annotations</artifactId>
<version>${ds-annotations.version}</version>
</extraClasspathElement>
</extraClasspathElements> </extraClasspathElements>
<compilerArgs> <compilerArgs>
<arg>-err:+nullAnnot(org.eclipse.jdt.annotation.Nullable|org.eclipse.jdt.annotation.NonNull|org.eclipse.jdt.annotation.NonNullByDefault),+inheritNullAnnot</arg> <arg>-err:+nullAnnot(org.eclipse.jdt.annotation.Nullable|org.eclipse.jdt.annotation.NonNull|org.eclipse.jdt.annotation.NonNullByDefault),+inheritNullAnnot</arg>