Skip to content
This repository was archived by the owner on Nov 10, 2021. It is now read-only.

Maven (pom.xml)

Julian edited this page Nov 13, 2016 · 4 revisions

Add the repositories...

<repositories>

(...)

    <repository>
        <id>aclib-releases</id>
        <url>http://dl.bintray.com/alternacraft/maven/</url>
    </repository>
    <repository>
        <id>aclib-snapshots</id>
        <url>http://oss.jfrog.org/oss-snapshot-local/</url>
    </repository>

(...)

</repositories>

and the dependency.

<dependencies>

(...)

    <dependency>
        <groupId>com.alternacraft</groupId>
        <artifactId>aclib</artifactId>    
        <version>LATEST</version>      
        <scope>compile</scope>
    </dependency>

(...)

</dependencies>

Finally, you have to add the shade plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>2.4.3</version>
    <executions>
        <execution>
            <id>libs</id>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <relocations>
                    <!-- This is just for avoiding problems with plugins which use this library -->
                    <relocation>
                        <pattern>com.alternacraft.aclib</pattern>
                        <shadedPattern>${project.groupId}.${project.artifactId}.ACLIB</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
        </execution>      
    </executions>
</plugin>

Clone this wiki locally