Skip to content

Setup Installation

Thomas Deutsch edited this page Mar 16, 2019 · 7 revisions

Setup - Installation - Dependencies - Maven - Gradle

All tcmj-pug-enums artifacts are available from a bintray repository

https://dl.bintray.com/tcmj/tcmj-pug-enums/com/tcmj/pug/tcmj-pug-enums/


Maven

Maven Repository (settings.xml)

  • You can define the repository globally in your settings.xml
<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'
          xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-tcmj-tcmj-pug-enums</id>
                    <name>bintray</name>
                    <url>http://dl.bintray.com/tcmj/tcmj-pug-enums</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>bintray-tcmj-tcmj-pug-enums</id>
                    <name>bintray-plugins</name>
                    <url>http://dl.bintray.com/tcmj/tcmj-pug-enums</url>
                </pluginRepository>
            </pluginRepositories>
            <id>bintray</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>bintray</activeProfile>
    </activeProfiles>
</settings>

Maven Dependencies to use the maven plugin

...
    <build>
        <plugins>
            <plugin>
                <groupId>com.tcmj.plugins</groupId>
                <artifactId>pug-enum-maven-plugin</artifactId>
                <version>1.3.5</version>
                <executions>
                    <execution>
                        <id>my-country-enum</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate-enum</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <className>com.tcmj.Planets</className>
                     ...
                </configuration>
            </plugin>
        </plugins>
    </build>

...

Maven Dependencies for usage in java code

<!-- The API is used in each sub module -->
<dependency>
  <groupId>com.tcmj.pug</groupId>
  <artifactId>pug-enum-api</artifactId>
  <version>1.3.5</version>
</dependency>

<!-- Implementations of datasources (Html,Json) -->
<dependency>
  <groupId>com.tcmj.pug</groupId>
  <artifactId>pug-enum-datasources</artifactId>
  <version>1.3.5</version>
</dependency>

<!-- Implementations of Java enum class builders  -->
<dependency>
  <groupId>com.tcmj.pug</groupId>
  <artifactId>pug-enum-builder</artifactId>
  <version>1.3.5</version>
</dependency>

<!-- Implementations of exporters (FileSystem, ClassLoader)  -->
<dependency>
  <groupId>com.tcmj.pug</groupId>
  <artifactId>pug-enum-exporter</artifactId>
  <version>1.3.5</version>
</dependency>

<!-- Usage Examples  -->
<dependency>
  <groupId>com.tcmj.pug</groupId>
  <artifactId>pug-enum-examples-api</artifactId>
  <version>1.3.5</version>
</dependency>

Gradle

Gradle Repository

repositories {
    maven {
        url  "http://dl.bintray.com/tcmj/tcmj-pug-enums" 
    }
}

Gradle Dependencies

compile 'com.tcmj.pug:tcmj-pug-enums:1.3.5'
compile 'com.tcmj.pug:pug-enum-api:1.3.5'
compile 'com.tcmj.pug:pug-enum-datasources:1.3.5'
compile 'com.tcmj.pug:pug-enum-builder:1.3.5'
compile 'com.tcmj.pug:pug-enum-exporter:1.3.5'
compile 'com.tcmj.pug:pug-enum-examples-api:1.3.5'

compile 'com.tcmj.plugins:pug-enum-maven-plugin:1.3.5'