Skip to content
Permalink
Browse files

experimental pom for publishing to central

  • Loading branch information...
elucash committed May 13, 2019
1 parent de73def commit 2194c6c5be2577b12fa24e683720c90e1fd7cf74
Showing with 298 additions and 6 deletions.
  1. +3 −0 .gitignore
  2. +286 −0 mod/that/pom.xml
  3. +9 −6 mod/that/src/io/immutables/that/That.java
@@ -38,6 +38,9 @@
/.buckd/
/buck-out/

# Maven output directory in case we run some maven commands
target/

# Symlinks for downloaded/output jars and generated source folders
# for convenience of IDEs and ad-hoc tools.
# Created in the directories along BUCK files containing
@@ -0,0 +1,286 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2019 Immutables Authors and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>io.immutables</groupId>
<artifactId>that</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>${project.groupId}.${project.artifactId}</name>
<description>Matchers for testing</description>
<url>http://immutables.io</url>

<organization>
<name>Immutables</name>
<url>http://immutables.io</url>
</organization>

<developers>
<developer>
<id>elucash</id>
<name>Ievgen Lukash</name>
<email>e.lucash@gmail.com</email>
<timezone>-8</timezone>
</developer>
</developers>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
<comments>For all published artifacts and runtime dependencies unless otherwise noted</comments>
</license>
</licenses>

<scm>
<connection>scm:git:https://github.com/immutables/io.git</connection>
<developerConnection>scm:git:git@github.com:immutables/io.git</developerConnection>
<url>https://github.com/immutables/io.git</url>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<module.name>${project.groupId}.${project.artifactId}</module.name>
<sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- Shared versions -->
</properties>

<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<directory>test</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>

<executions>
<execution>
<id>default-jar</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<manifestEntries>
<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
<execution>
<id>test-jar</id>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<useIncrementalCompilation>false</useIncrementalCompilation>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
</compilerArgs>
<compilerArguments>
<Xmaxerrs>1000000</Xmaxerrs>
</compilerArguments>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.1</version>
<configuration>
<mavenExecutorId>forked-path</mavenExecutorId>
<useReleaseProfile>false</useReleaseProfile>
<arguments>-Psonatype-oss-release</arguments>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<id>oss-release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<quiet>true</quiet>
<nonavbar>true</nonavbar>
<notree>true</notree>
<nocomment>true</nocomment>
<nohelp>true</nohelp>
<minmemory>1G</minmemory>
<maxmemory>2G</maxmemory>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>lint-javadoc</id>
<build>
<plugins>
<plugin>
<!-- Used to validate/lint javadocs -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<quiet>true</quiet>
<nonavbar>true</nonavbar>
<notree>true</notree>
<nocomment>true</nocomment>
<nohelp>true</nohelp>
<minmemory>1G</minmemory>
<maxmemory>2G</maxmemory>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
@@ -491,14 +491,21 @@ default void isOf(java.lang.Iterable<T> expectedElements) {
}
}

default void isOf(@SuppressWarnings("unchecked") T... expectedElements) {
@SuppressWarnings("unchecked")
default void isOf(T... expectedElements) {
isOf(Arrays.asList(expectedElements));
}

default void hasAll(@SuppressWarnings("unchecked") T... expectedElements) {
@SuppressWarnings("unchecked")
default void hasAll(T... expectedElements) {
hasAll(Arrays.asList(expectedElements));
}

@SuppressWarnings("unchecked")
default void hasOnly(T... expectedElements) {
hasOnly(Arrays.asList(expectedElements));
}

default void hasAll(java.lang.Iterable<T> expectedElements) {
List<T> actualElements = What.getList(this);
List<T> missingElements = new ArrayList<>();
@@ -514,10 +521,6 @@ default void hasAll(java.lang.Iterable<T> expectedElements) {
}
}

default void hasOnly(@SuppressWarnings("unchecked") T... expectedElements) {
hasOnly(Arrays.asList(expectedElements));
}

default void hasOnly(java.lang.Iterable<T> elements) {
List<T> remainingElements = What.getList(this);
List<T> expectedElements = new ArrayList<>();

0 comments on commit 2194c6c

Please sign in to comment.
You can’t perform that action at this time.