GitLab's annual major release is around the corner. Along with a lot of new and exciting features, there will be a few breaking changes. Learn more here.

pom.xml 8.81 KB
Newer Older
1 2 3 4 5 6
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>

7 8
    <groupId>com.rajivprab</groupId>
    <artifactId>cava</artifactId>
9
    <version>1.14.2</version>
10

11
    <name>Cava: Clean Java</name>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
12
    <description>A library that enables users to write minimal, clean and simple Java</description>
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
    <url>https://gitlab.com/whacks/cava</url>
    <scm>
        <url>https://gitlab.com/whacks/cava</url>
    </scm>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
        <name>Rajiv Prabhakar</name>
        <email>whackri at gmaiI</email>
        </developer>
    </developers>

31 32 33 34 35
    <dependencies>
        <!-- Generic utilities -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
36
            <version>3.6</version>
37 38 39 40
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
41
            <version>2.6</version>
42 43
        </dependency>
        <dependency>
44 45 46
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
47 48
        </dependency>
        <dependency>
49 50
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
51
            <version>20170516</version>
52 53 54 55 56 57 58 59 60 61 62
        </dependency>
        <dependency>
            <groupId>org.javatuples</groupId>
            <artifactId>javatuples</artifactId>
            <version>1.2</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
63
            <scope>test</scope>
64
        </dependency>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
65 66 67 68 69
        <!-- TODO Major can of worms here. Use slf4j + log4j? Or Apache.commons.logging + log4j?
        Maven central snippets recommends using test scope here, but what does that mean for other projects like caucus?
        Does that mean that the log4j.properties will be applied only when running tests, and not in prod?
        If test scope is applied below, will I need to manually copy-paste this dependency in all my other projects?
        If I'm using apache.commons.logging (ie, LogFactory.getLog()), then why am I using this slf4j-log4j below? -->
70 71 72
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
73
            <version>1.7.25</version>
74
        </dependency>
75

Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
76 77 78
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
79
            <version>23.2-jre</version>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
80
        </dependency>
81

82 83 84
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
85
            <version>0.33</version>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
86
            <scope>test</scope>
87 88 89
        </dependency>
    </dependencies>

90 91 92 93 94 95 96
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

97 98 99 100 101
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
102
                <version>3.6.1</version>
103 104 105 106 107 108 109 110
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
111
                <version>2.19.1</version>
112 113 114 115 116 117 118 119 120 121 122
                <configuration>
                    <enableAssertions>true</enableAssertions>
                </configuration>
            </plugin>

            <!-- Code coverage. Open browser and go to:
            {proj}/target/site/jacoco-ut/index.html &&
            {proj}/target/site/jacoco-it/index.html -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
Rajiv Prabhakar's avatar
Rajiv Prabhakar committed
123
                <version>0.7.9</version>
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
                <executions>
                    <!-- Prepares the property pointing to the JaCoCo runtime agent which
                    is passed as VM argument when Maven the Surefire plugin is executed. -->
                    <execution>
                        <id>pre-unit-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
                            <!-- Sets the name of the property containing the settings for JaCoCo runtime agent. -->
                            <propertyName>surefireArgLine</propertyName>
                        </configuration>
                    </execution>

                    <!-- Ensures that the code coverage report for unit tests is created after unit tests have been run. -->
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <!-- Sets the path to the file which contains the execution data. -->
                            <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
                            <!-- Sets the output directory for the code coverage report. -->
                            <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218

            <!-- Plugin used for deploying this repo to sonatype
                    Credentials are stored in ~/.m2/settings.xml -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
                <!--
                <configuration>
                    <serverId>nexus</serverId>
                    <nexusUrl>http://localhost:8081/nexus/</nexusUrl>
                </configuration> -->
            </plugin>

            <!-- Generation of javadocs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.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-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Signing the artifacts -->
            <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>
219 220 221 222 223 224
        </plugins>
    </build>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
225
</project>