streamex

Used in: 10 components

Overview

Description

Enhancing Java 8 Streams

Snippets

<dependency>
    <groupId>io.github.amaembo</groupId>
    <artifactId>streamex</artifactId>
    <version>0.4.1</version>
</dependency>

Maven POM File

<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.github.amaembo</groupId>
  <artifactId>streamex</artifactId>
  <version>0.4.1</version>
  <packaging>jar</packaging>

  <name>StreamEx</name>
  <description>Enhancing Java 8 Streams</description>
  <url>https://github.com/amaembo/streamex</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.package>javax.util.streamex</project.package>
    <project.package.path>javax/util/streamex</project.package.path>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <developers>
    <developer>
      <name>Tagir Valeev</name>
      <email>lany@ngs.ru</email>
    </developer>
  </developers>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
          <compilerArgs>
            <arg>-Xlint:all</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.3</version>
        <executions>
          <execution>
            <!-- This execution used just to run javadoc with doclint and 
              fail on any errors -->
            <id>verify-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>javadoc</goal>
            </goals>
            <configuration>
              <quiet>true</quiet>
            </configuration>
          </execution>
          <execution>
            <!-- This is actualy javadoc build. The doclint cannot be used 
              here as it fails on JDK sources -->
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <sourcepath>${project.build.sourceDirectory};${project.build.directory}/jdk</sourcepath>
              <excludePackageNames>java.util.stream</excludePackageNames>
              <additionalparam>-Xdoclint:none</additionalparam>
              <quiet>true</quiet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <!-- Unpack java.util.stream package from JDK source to inherit 
              the documentation from it -->
            <id>prepare</id>
            <phase>prepare-package</phase>
            <configuration>
              <target>
                <available property="src.zip" file="${java.home}/../src.zip"
                  value="${java.home}/../src.zip" />
                <available property="src.zip" file="${java.home}/src.zip"
                  value="${java.home}/src.zip" />
                <unzip src="${src.zip}" dest="${project.build.directory}/jdk">
                  <patternset>
                    <include name="java/util/stream/**/*.java" />
                  </patternset>
                </unzip>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <!-- Change the S generic type in StreamEx/EntryStream documentation 
              to the appropriate type -->
            <id>fix</id>
            <phase>package</phase>
            <configuration>
              <target>
                <property name="token.S"><![CDATA[<code>S</code>]]></property>
                <property name="token.StreamEx"><![CDATA[<code><a href="StreamEx.html" title="class in ${project.package}">StreamEx</a>&lt;<a href="StreamEx.html" title="type parameter in StreamEx">T</a>&gt;</code>]]></property>
                <property name="token.EntryStream"><![CDATA[<code><a href="EntryStream.html" title="class in ${project.package}">EntryStream</a>&lt;<a href="EntryStream.html" title="type parameter in EntryStream">K</a>,<a href="EntryStream.html" title="type parameter in EntryStream">V</a>&gt;</code>]]></property>
                <replace
                  file="${project.build.directory}/apidocs/${project.package.path}/EntryStream.html"
                  token="${token.S}" value="${token.EntryStream}" />
                <replace
                  file="${project.build.directory}/apidocs/${project.package.path}/StreamEx.html"
                  token="${token.S}" value="${token.StreamEx}" />
                <jar
                  destfile="${project.build.directory}/${project.build.finalName}-javadoc.jar"
                  update="true">
                  <fileset dir="${project.build.directory}/apidocs"
                    includes="${project.package.path}/EntryStream.html" />
                  <fileset dir="${project.build.directory}/apidocs"
                    includes="${project.package.path}/StreamEx.html" />
                </jar>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.4.0</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${project.package}</Bundle-SymbolicName>
            <Bundle-Name>${project.name}</Bundle-Name>
            <Export-Package>${project.package}</Export-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </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>
      <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>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.5.201505241946</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>default-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <configuration>
              <rules>
                <rule implementation="org.jacoco.maven.RuleConfiguration">
                  <element>BUNDLE</element>
                  <limits>
                    <limit implementation="org.jacoco.report.check.Limit">
                      <counter>COMPLEXITY</counter>
                      <value>COVEREDRATIO</value>
                      <minimum>0.60</minimum>
                    </limit>
                  </limits>
                </rule>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>4.0.0</version>
      </plugin>
    </plugins>
  </build>

  <scm>
    <connection>scm:git:https://github.com/amaembo/streamex.git</connection>
    <developerConnection>scm:git:https://github.com/amaembo/streamex.git</developerConnection>
    <url>https://github.com/amaembo/streamex.git</url>
  </scm>
</project>