You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2015/01/10 21:35:05 UTC
svn commit: r1650809 - /commons/proper/net/trunk/pom.xml
Author: sebb
Date: Sat Jan 10 20:35:05 2015
New Revision: 1650809
URL: http://svn.apache.org/r1650809
Log:
Automatically generate the correct Animal Sniffer signature name
Modified:
commons/proper/net/trunk/pom.xml
Modified: commons/proper/net/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/pom.xml?rev=1650809&r1=1650808&r2=1650809&view=diff
==============================================================================
--- commons/proper/net/trunk/pom.xml (original)
+++ commons/proper/net/trunk/pom.xml Sat Jan 10 20:35:05 2015
@@ -139,8 +139,6 @@ Supported protocols include: Echo, Finge
<properties>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
- <!-- ensure the signature version agrees with the compiler version above -->
- <animal-sniffer.signature>java15</animal-sniffer.signature>
<commons.javadoc.java.link>http://download.oracle.com/javase/1.5.0/docs/api/</commons.javadoc.java.link>
<commons.componentid>net</commons.componentid>
<commons.release.version>${project.version}</commons.release.version>
@@ -368,6 +366,30 @@ Supported protocols include: Echo, Finge
<!-- Temporary location until parent pom updated -->
+ <!-- to bypass Animal Sniffer, define "animal.sniffer.skip" as true -->
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.9.1</version>
+ <executions>
+ <execution>
+ <id>regex-property</id>
+ <goals>
+ <goal>regex-property</goal>
+ </goals>
+ <configuration>
+ <!-- generate the default animal sniffer java signature name from the java target version -->
+ <name>animal-sniffer.signature</name>
+ <value>${maven.compiler.target}</value>
+ <regex>^(\d)\.(\d)$</regex>
+ <replacement>java$1$2</replacement>
+ <failIfNoMatch>true</failIfNoMatch> <!-- unexpected compiler version (assuming n.m version format)-->
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>