9699eceea7
1. Warnings and deprecations are not shown by default.
2. Documentation shows use of <compilerArgument> with mulitple arguments in a
single element:
<compilerArgument>-foo -bar</compilerArgument>
which is a bald-faced lie. Only a single argument is allowed inside a
<compilerArgument> element. Web search turns up "helpful" advice to use
multiple elements:
<compilerArgument>-foo</compilerArgument>
<compilerArgument>-bar</compilerArgument>
Fair enough, and also a bald-faced lie. After spending a bunch of time
debugging why my compiler arguments were not working, I discovered that Maven
was just (silently) using the last one and ignoring/overwriting all of the
previous arguments.
I had noticed while poring over the documentation that it was also possible to
use the so-called "Map version" (whatever that means), which uses this
completely fucking stupid syntax:
<compilerArguments>
<foo/>
<bar/>
</compilerArguments>
Why is that syntax completely fucking stupid, you might ask? Well, dear reader,
because the arguments that I'm actually passing end up looking like this:
<compilerArguments>
<Xlint/>
<Xlint:-serial/>
</compilerArguments>
which is a case study in how not to represent information in XML. I didn't even
try that originally because I was sure that it would not work, given the wacky
non-[a-zA-z]+ nature of the argument I needed to supply. The fact that it does
work gives me the fear.
You might wonder if the following form would provide satisfaction:
<compilerArguments>
<compilerArgument>-Xlint</compilerArgument>
<compilerArgument>-Xlint:-serial</compilerArgument>
</compilerArguments>
Other than being absurdly verbose, it seems right in line with The Maven Way
(tm). However, that results in -compilerArgument=-Xlint and
-compilerArgument=-Xlint:-serial being passed to the compiler. Hilarity
naturally ensues.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2859 6335cc39-0255-0410-8fd6-9bcaacd3b74c
170 lines
6.0 KiB
XML
170 lines
6.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<groupId>com.samskivert</groupId>
|
|
<artifactId>samskivert</artifactId>
|
|
<packaging>jar</packaging>
|
|
<version>1.0</version>
|
|
<name>samskivert</name>
|
|
<description>A collection of Java utilities.</description>
|
|
<url>http://code.google.com/p/samskivert/</url>
|
|
<issueManagement>
|
|
<url>http://code.google.com/p/samskivert/issues/list</url>
|
|
</issueManagement>
|
|
|
|
<parent>
|
|
<groupId>org.sonatype.oss</groupId>
|
|
<artifactId>oss-parent</artifactId>
|
|
<version>5</version>
|
|
</parent>
|
|
|
|
<licenses>
|
|
<license>
|
|
<name>GNU Lesser General Public License (LGPL), Version 2.1</name>
|
|
<url>http://www.fsf.org/licensing/licenses/lgpl.txt</url>
|
|
<distribution>repo</distribution>
|
|
</license>
|
|
</licenses>
|
|
|
|
<developers>
|
|
<developer>
|
|
<id>samskivert</id>
|
|
<name>Michael Bayne</name>
|
|
<email>mdb@samskivert.com</email>
|
|
</developer>
|
|
</developers>
|
|
|
|
<scm>
|
|
<connection>scm:svn:http://samskivert.googlecode.com/svn/trunk/</connection>
|
|
<developerConnection>scm:svn:https://samskivert.googlecode.com/svn/trunk/</developerConnection>
|
|
<url>http://samskivert.googlecode.com/svn/trunk/</url>
|
|
</scm>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>javax.servlet</groupId>
|
|
<artifactId>servlet-api</artifactId>
|
|
<version>2.5</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>log4j</groupId>
|
|
<artifactId>log4j</artifactId>
|
|
<version>1.2.15</version>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
<exclusions>
|
|
<exclusion><groupId>javax.mail</groupId><artifactId>mail</artifactId></exclusion>
|
|
<exclusion><groupId>javax.jms</groupId><artifactId>jms</artifactId></exclusion>
|
|
<exclusion><groupId>com.sun.jdmk</groupId><artifactId>jmxtools</artifactId></exclusion>
|
|
<exclusion><groupId>com.sun.jmx</groupId><artifactId>jmxri</artifactId></exclusion>
|
|
<exclusion><groupId>oro</groupId><artifactId>oro</artifactId></exclusion>
|
|
<exclusion><groupId>junit</groupId><artifactId>junit</artifactId></exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>javax.mail</groupId>
|
|
<artifactId>mail</artifactId>
|
|
<version>1.4.1</version>
|
|
<scope>compile</scope>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.8.1</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<source>1.5</source>
|
|
<target>1.5</target>
|
|
<showDeprecation>true</showDeprecation>
|
|
<showWarnings>true</showWarnings>
|
|
<compilerArguments><Xlint/><Xlint:-serial/></compilerArguments>
|
|
<excludes>
|
|
<exclude>com/samskivert/velocity/**</exclude>
|
|
<exclude>com/samskivert/xml/**</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>default-testCompile</id>
|
|
<phase>test-compile</phase>
|
|
<configuration>
|
|
<testExcludes>
|
|
<exclude>com/samskivert/velocity/**</exclude>
|
|
<exclude>com/samskivert/xml/**</exclude>
|
|
</testExcludes>
|
|
</configuration>
|
|
<goals>
|
|
<goal>testCompile</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<configuration>
|
|
<encoding>UTF-8</encoding>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-surefire-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>com/samskivert/swing/TestComboButtonBox*</exclude>
|
|
</excludes>
|
|
<systemProperties>
|
|
<property><name>test_dir</name><value>target/test-classes</value></property>
|
|
</systemProperties>
|
|
<additionalClasspathElements>
|
|
<additionalClasspathElement>lib/test/test.jar</additionalClasspathElement>
|
|
<additionalClasspathElement>lib/test/test-al.jar</additionalClasspathElement>
|
|
<additionalClasspathElement>lib/test/test-ar.jar</additionalClasspathElement>
|
|
<additionalClasspathElement>lib/test/test-br.jar</additionalClasspathElement>
|
|
<additionalClasspathElement>lib/test/test-c.jar</additionalClasspathElement>
|
|
</additionalClasspathElements>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-javadoc-plugin</artifactId>
|
|
<configuration>
|
|
<quiet>true</quiet>
|
|
<excludePackageNames>com.samskivert.velocity:com.samskivert.xml</excludePackageNames>
|
|
<links>
|
|
<link>http://download.oracle.com/javase/6/docs/api/</link>
|
|
<link>http://java.sun.com/products/javamail/javadocs/</link>
|
|
<link>http://download.oracle.com/javaee/1.2.1/api/</link>
|
|
</links>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-gpg-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>sign-artifacts</id>
|
|
<phase>verify</phase>
|
|
<goals>
|
|
<goal>sign</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<keyname>mdb@samskivert.com</keyname>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|