Permalink
Browse files

Hack in a compat shim for building on jdk6, but deploying on jdk7+

  • Loading branch information...
1 parent c65df7d commit 751a5bb08682d82890277fee04e7d4d355c09343 Wayne Meissner committed Dec 4, 2011
View
@@ -30,6 +30,7 @@
<url>git@github.com:jnr/jnr-enxio.git</url>
</scm>
+
<developers>
<developer>
<id>wmeissner</id>
@@ -63,4 +64,50 @@
<version>0.6.0</version>
</dependency>
</dependencies>
+
+ <profiles>
+ <profile>
+ <id>jdk7</id>
+ <activation>
+ <jdk>[1.7,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <excludes>
+ <exclude>**/ProtocolFamily.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.3.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <excludes>
+ <exclude>**/java/net</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
@@ -0,0 +1,3 @@
+package java.net;
+
+public final class ProtocolFamily {}
@@ -42,6 +42,10 @@ public DatagramChannel openDatagramChannel() throws IOException {
throw new UnsupportedOperationException("Not supported yet.");
}
+ public DatagramChannel openDatagramChannel(java.net.ProtocolFamily family) throws IOException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
@Override
public Pipe openPipe() throws IOException {
throw new UnsupportedOperationException("Not supported yet.");

0 comments on commit 751a5bb

Please sign in to comment.