Scout - Maven - Configure animal sniffer plugin to use java 8? [message #1768078] |
Thu, 13 July 2017 08:57  |
Eclipse User |
|
|
|
I have a basic eclipse scout project with a bit of functionality.
After adding java 8 specific code, mvn clean install or mvn clean verify lead to build errors. The animal snffer plugin checks my code against java7 and consequently I get build errors when using streams etc.
I tried to explicitly set the plugin to use java8, but still it uses java7 ...
First I tried to specify the following properties in the parent project's pom:
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Then I explicitly declared the animal sniffer plugin in the parent pom (see artifactId = java18)
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.15</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
This didn't work either.
When I comment out all plugins specified in the scout project parent
pom, this plugin is still being used. Where is it declared? Its neither in the parent, nor in the subprojects's poms.
Here is a bit of relevant maven output:
[INFO] --- animal-sniffer-maven-plugin:1.15:check (default-cli) @ ...scout.shared ---
[DEBUG] Configuring mojo org.codehaus.mojo:animal-sniffer-maven-plugin:1.15:check from plugin realm ClassRealm[plugin>org.codehaus.mojo:animal-sniffer-maven-plugin:1.15, parent: sun.misc.Launcher$AppClassLoader@5c647e05]
[DEBUG] Configuring mojo 'org.codehaus.mojo:animal-sniffer-maven-plugin:1.15:check' with basic configurator -->
[DEBUG] (f) ignoreDependencies = true
[DEBUG] (f) localRepository = id: local
url: file:///C:/Users/paco/.m2/repository/
layout: default
snapshots: [enabled => true, update => always]
releases: [enabled => true, update => always]
[DEBUG] (f) outputDirectory =DEBUG (f) project = MavenProject: ...scout.shared\pom.xml
[DEBUG] (s) groupId = org.codehaus.mojo.signature
[DEBUG] (s) artifactId = java17
[DEBUG] (s) version = 1.0
[DEBUG] (f) signature = org.codehaus.mojo.signature:java17:1.0
[DEBUG] (f) skip = false
[DEBUG] -- end configuration --
[ ... ]
[ERROR]...scout\server\branch\BranchLookupService.java:38: Undefined reference: java.util.stream.Stream java.util.List.stream()
As you can see the signature is set to java17 instead of java18.
What can I do to get rid of this problem?
[Updated on: Thu, 13 July 2017 09:13] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11133 seconds