Skip to content

Commit

Permalink
Cleanup pom.xml for 2.2.0 and Maven Central, thanks to Matthieu Broui…
Browse files Browse the repository at this point in the history
…llard for support.
  • Loading branch information
renggli committed Nov 6, 2018
1 parent b5f07a0 commit d91907b
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 46 deletions.
66 changes: 43 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,65 @@ This library is open source, stable and well tested. Development happens on [Git
Installation
------------

To include the latest release in your Java project follow the instructions below. Instructions for alternative build systems such as Gradle, SBT, or Leiningen you can find on [JitPack](https://jitpack.io/#petitparser/java-petitparser).
To include the latest release in your Java project follow the instructions below.

### Maven
### Maven Central

Append the repository to your `pom.xml` file:
To depend on the core library, add the following dependency to your `pom.xml` file:

```xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser-core</artifactId>
<version>2.2.0</version>
</dependency>
```

To also include the example grammars, use the following dependency:

```xml
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser</artifactId>
<version>2.2.0</version>
</dependency>
```

Instructions for alternative build systems you can find on [Maven Central](https://search.maven.org/artifact/com.github.petitparser/petitparser-core).

### Maven JitPack

JitPack requires you to first append the repository to your `pom.xml` file:

```xml
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
```

To depend on the core library, add the following dependency:

```xml
<dependencies>
<dependency>
<groupId>com.github.petitparser.java-petitparser</groupId>
<artifactId>petitparser-core</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
<dependency>
<groupId>com.github.petitparser.java-petitparser</groupId>
<artifactId>petitparser-core</artifactId>
<version>2.2.0</version>
</dependency>
```

To also include the example grammars, use the following dependency:

```xml
<dependencies>
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>java-petitparser</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>java-petitparser</artifactId>
<version>2.2.0</version>
</dependency>
```

Instructions for alternative build systems such as Gradle, SBT, or Leiningen you can find on [JitPack](https://jitpack.io/#petitparser/java-petitparser).

### Bazel

Alternatively, if you'd like the latest code clone the repository:
Expand Down
2 changes: 1 addition & 1 deletion petitparser-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions petitparser-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser-core</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions petitparser-smalltalk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser-core</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
</dependencies>
</project>
4 changes: 2 additions & 2 deletions petitparser-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -19,7 +19,7 @@
<dependency>
<groupId>com.github.petitparser</groupId>
<artifactId>petitparser-core</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
</dependency>
</dependencies>
</project>
123 changes: 107 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
<modelVersion>4.0.0</modelVersion>

<properties>
<java.version>1.8</java.version>
<junit.version>4.12</junit.version>
<coveralls.version>4.3.0</coveralls.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.sourceEncoding>UTF-8</project.reporting.sourceEncoding>
</properties>

<groupId>com.github.petitparser</groupId>
<artifactId>petitparser</artifactId>
<version>2.1.0</version>
<version>2.2.0</version>
<packaging>pom</packaging>

<name>PetitParser</name>
Expand Down Expand Up @@ -66,45 +65,53 @@
</modules>

<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hamcrest/java-hamcrest -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin/3.8.0 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
<version>3.8.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin/3.8.0 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<version>3.8.0</version>
<configuration>
<compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.codehaus.plexus/plexus-compiler-javac-errorprone -->
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-javac-errorprone</artifactId>
<version>2.8.2</version>
<version>2.8.5</version>
</dependency>
</dependencies>
</plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -118,12 +125,15 @@
</execution>
</executions>
</plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0</version>
<version>3.0.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalOptions>-Xdoclint:none</additionalOptions>
<additionalOptions>-html5</additionalOptions>
</configuration>
<executions>
<execution>
Expand All @@ -134,27 +144,108 @@
</execution>
</executions>
</plugin>
<!-- https://mvnrepository.com/artifact/org.eluder.coveralls/coveralls-maven-plugin -->
<plugin>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>${coveralls.version}</version>
<version>4.3.0</version>
<configuration>
<repoToken>${env.COVERALLS_TOKEN}</repoToken>
</configuration>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.3</version>
</dependency>
</dependencies>
</plugin>
<!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<version>0.8.2</version>
<executions>
<execution>
<id>prepare-agent</id>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-prepare-agent-integration</id>
<phase>pre-integration-test</phase>
<goals>
<goal>prepare-agent-integration</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>default-report-integration</id>
<goals>
<goal>report-integration</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<!-- Deploy to Maven Central: mvn -Poss -DskipTests deploy -->
<profiles>
<profile>
<id>oss</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<executable>gpg2</executable>
<useAgent>true</useAgent>
<keyname>${gpg.keyname}</keyname>
<passphraseServerId>${gpg.keyname}</passphraseServerId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
</url>
</repository>
</distributionManagement>
</profile>
</profiles>
</project>

0 comments on commit d91907b

Please sign in to comment.