PavelKastornyy/ansi4j

[Question] Is this project available on Maven

Closed this issue · 4 comments

Igrium commented

How do you actually use this as a dependency? Is it available in some maven repo? Are their jar files to download somewhere? Thanks for any clarification.

Hello @sam54123 . This project uses maven, but it is not in any maven repo. However, it is very easy to build this project and after that it will be available in your local maven repo.

How to build:

git clone https://github.com/PavelKastornyy/ansi4j.git
cd ansi4j
mvn clean install

After building, add the following dependencies to YOUR project.

        <dependency>
            <groupId>pk.ansi4j</groupId>
            <artifactId>ansi4j-core-api</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>pk.ansi4j</groupId>
            <artifactId>ansi4j-core-impl</artifactId>
            <version>1.1.0</version>
        </dependency>

If you need CSS extension, then also add the following:

        <dependency>
            <groupId>pk.ansi4j</groupId>
            <artifactId>ansi4j-css-api</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>pk.ansi4j</groupId>
            <artifactId>ansi4j-css-impl</artifactId>
            <version>1.1.0</version>
        </dependency> 
Igrium commented

Thanks! I ended up using JitPack to reference it directly from GitHub. Here's an excerpt from my buildscript if anyone needs it:

repositories {
    maven { url 'https://jitpack.io' }
}

// ...

dependencies {
    implementation 'com.github.PavelKastornyy.ansi4j:ansi4j-core-api:ansi4j-1.0.0'
    implementation 'com.github.PavelKastornyy.ansi4j:ansi4j-core-impl:ansi4j-1.0.0'
}

@sam54123 Thank you for sharing another solution. Only use a newer version - 1.1.0. I mean

dependencies {
    implementation 'com.github.PavelKastornyy.ansi4j:ansi4j-core-api:ansi4j-1.1.0'
    implementation 'com.github.PavelKastornyy.ansi4j:ansi4j-core-impl:ansi4j-1.1.0'
}