Skip to content

Commit

Permalink
Fixup pom.xml
Browse files Browse the repository at this point in the history
* Add enforcer plugin and plugin versions
* Set correct licence
* Add developers
* Change minimal java version to 1.5
* Configure animal-sniffer plugin
* Run maven build on travis
  • Loading branch information
aclemons committed Jul 2, 2017
1 parent f469df0 commit 318a378
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ src/native/getline.o
src/native/org_gnu_readline_Readline.h src/native/org_gnu_readline_Readline.h
src/native/org_gnu_readline_Readline.o src/native/org_gnu_readline_Readline.o
tags tags
target
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ language: c
before_install: before_install:
- sudo add-apt-repository ppa:duggan/bats --yes - sudo add-apt-repository ppa:duggan/bats --yes
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq bats libedit-dev libedit2 openjdk-6-jdk openjdk-7-jdk oracle-java8-installer - sudo apt-get install -qq bats libedit-dev libedit2 openjdk-7-jdk openjdk-8-jdk maven


before_script: before_script:
- jdk_switcher use $JDK - jdk_switcher use $JDK
Expand All @@ -15,11 +15,10 @@ compiler:
- gcc - gcc


env: env:
- JDK=openjdk6
- JDK=openjdk7 - JDK=openjdk7
- JDK=openjdk8 - JDK=openjdk8
- JDK=oraclejdk8


script: script:
- make clean bats T_LIBS="JavaEditline JavaReadline JavaGetline" CC=$CC - make clean bats T_LIBS="JavaEditline JavaReadline JavaGetline" CC=$CC
- mvn clean site install


231 changes: 185 additions & 46 deletions pom.xml
Original file line number Original file line Diff line number Diff line change
@@ -1,47 +1,186 @@
<?xml version="1.0" encoding="US-ASCII"?> <?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <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">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 <groupId>org.gnu</groupId>
http://maven.apache.org/maven-v4_0_0.xsd"> <artifactId>libreadline-java</artifactId>
<modelVersion>4.0.0</modelVersion> <packaging>jar</packaging>
<groupId>org.gnu</groupId> <version>0.8.3-SNAPSHOT</version>
<artifactId>Readline</artifactId> <name>java-readline</name>
<packaging>jar</packaging> <issueManagement>
<version>0.8.2</version> <url>https://github.com/aclemons/java-readline/issues</url>
<name>Readline</name> <system>GitHub Issues</system>
<licenses> </issueManagement>
<license> <licenses>
<name>GPL 3+</name> <license>
<url>https://www.gnu.org/licenses/gpl.html</url> <name>GNU Lesser General Public License, version 2.1</name>
</license> <url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html</url>
</licenses> <distribution>repo</distribution>
<description>Readline.</description> </license>
<url>http://java-readline.sourceforge.net</url> </licenses>
<properties> <scm>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <connection>scm:git:https://github.com/aclemons/java-readline.git</connection>
<maven.compiler.source>1.7</maven.compiler.source> </scm>
<maven.compiler.target>1.7</maven.compiler.target> <developers>
</properties> <developer>
<build> <id>bablokb</id>
<plugins> <name>Bernhard Bablok</name>
<plugin> <email>mail@bablokb.de</email>
<groupId>org.apache.maven.plugins</groupId> <roles>
<artifactId>maven-compiler-plugin</artifactId> <role>developer</role>
<version>2.3.2</version> </roles>
<configuration> <timezone>Europe/Berlin</timezone>
<showDeprecation>true</showDeprecation> </developer>
</configuration> <developer>
</plugin> <id>aclemons</id>

<name>Andrew Clemons</name>
<plugin> <email>andrew.clemons@gmail.com</email>
<groupId>org.apache.maven.plugins</groupId> <roles>
<artifactId>maven-jar-plugin</artifactId> <role>developer</role>
<version>2.6</version> </roles>
<configuration> <timezone>Pacific/Auckland</timezone>
<archive> </developer>
</archive> </developers>
</configuration> <description>GNU readline and BSD editline wrappers for Java</description>
</plugin> <url>https://github.com/aclemons/java-readline</url>
</plugins> <properties>
</build> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<sourceDirectory>${project.basedir}/src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<mainClass>test.ReadlineTest</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.6</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.10</version>
<configuration>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
<execution>
<id>enforce-plugin-versions</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requirePluginVersions>
<message>Best Practice is to always define plugin versions!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<banSnapshots>true</banSnapshots>
<phases>clean,deploy,site</phases>
<additionalPlugins>
<additionalPlugin>org.apache.maven.plugins:maven-eclipse-plugin</additionalPlugin>
</additionalPlugins>
</requirePluginVersions>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.15</version>
<executions>
<execution>
<id>check-java6</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java15</artifactId>
<version>1.0</version>
</signature>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>

0 comments on commit 318a378

Please sign in to comment.