Skip to content

Commit

Permalink
build: fix null analysis config
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jun 13, 2024
1 parent ea1d73b commit 418aeb3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 68 deletions.
17 changes: 0 additions & 17 deletions build.target
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,5 @@
<repository location="https://raw.githubusercontent.com/achimmihca/EclipseLineShortcuts/release/updatesite"/>
<unit id="de.achimmihca.lineshortcuts.feature.feature.group" version="0.0.0"/>
</location>

<location includeDependencyDepth="infinite" includeDependencyScopes="compile" includeSource="true" missingManifest="generate" type="Maven">
<dependencies>
<dependency>
<groupId>com.vegardit.no-npe</groupId>
<artifactId>no-npe-eea-all</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>no-npe-snapshots</id>
<url>https://raw.githubusercontent.com/vegardit/no-npe/mvn-snapshots-repo/</url>
</repository>
</repositories>
</location>
</locations>
</target>
5 changes: 1 addition & 4 deletions plugin/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ bin.excludes = src/main/resources/images/splash.afdesign,\
src/main/resources/images/logo/haxe4e_logo.afdesign,\
src/main/resources/images/logo/haxe4e_logo512x512.png

# https://codeiseasy.wordpress.com/2013/03/08/tycho-and-jdt-null-analysis/
# JDT Null Analysis for Eclipse
additional.bundles = org.eclipse.jdt.annotation,com.vegardit.no-npe.eea-all
# JDT Null Analysis types for Tycho
jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation,platform:/plugin/com.vegardit.no-npe.eea-all
additional.bundles = org.eclipse.jdt.annotation
34 changes: 0 additions & 34 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,40 +43,6 @@
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<!-- https://tycho.eclipseprojects.io/doc/3.0.0/tycho-compiler-plugin/plugin-info.html -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-compiler-plugin</artifactId>
<configuration>
<!-- workaround for tycho-compiler-plugin ignoring EEAs loaded via
build.properties: jars.extra.classpath = ...,platform:/plugin/com.vegardit.no-npe.eea-all
-->
<compilerArgs>
<arg>-annotationpath</arg>
<arg>${com.vegardit.no-npe:no-npe-eea-all:jar}</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<!-- only required for workaround for tycho-compiler-plugin ignoring EEAs loaded via
build.properties: jars.extra.classpath = ...,platform:/plugin/com.vegardit.no-npe.eea-all
-->
<groupId>com.vegardit.no-npe</groupId>
<artifactId>no-npe-eea-all</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>no-npe-snapshots</id>
<url>https://raw.githubusercontent.com/vegardit/no-npe/mvn-snapshots-repo/</url>
</repository>
</repositories>

</project>
51 changes: 38 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,24 @@
</properties>


<dependencies>
<dependency>
<groupId>com.vegardit.no-npe</groupId>
<artifactId>no-npe-eea-all</artifactId>
<version>[1.0.0,)</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>no-npe-snapshots</id>
<url>https://raw.githubusercontent.com/vegardit/no-npe/mvn-snapshots-repo/</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>


<build>
<pluginManagement>
<plugins>
Expand All @@ -110,6 +128,13 @@
<version>${tycho.version}</version>
<configuration>
<optimize>true</optimize>
<compilerArgs>
<arg>-annotationpath</arg>
<arg>CLASSPATH</arg> <!-- read Eclipse External null Annotations from JARs on the classpath -->
</compilerArgs>

<!-- respect settings in .settings/org.eclipse.jdt.core.prefs -->
<useProjectSettings>true</useProjectSettings>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -175,17 +200,17 @@
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>clean</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>clean</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
Expand Down Expand Up @@ -256,7 +281,7 @@
<executionEnvironment>org.eclipse.justj.openjdk.hotspot.jre.minimal.stripped-22</executionEnvironment>

<target>
<file>../build.target</file>
<file>${maven.multiModuleProjectDirectory}/build.target</file>
</target>
<environments>
<environment>
Expand Down Expand Up @@ -323,4 +348,4 @@
</build>
</profile>
</profiles>
</project>
</project>

0 comments on commit 418aeb3

Please sign in to comment.