Skip to content
carlosame edited this page Jan 2, 2024 · 2 revisions

Apache Maven Notes

Using EchoSVG from a Maven project

This project is not posted to Maven Central, and Apache Maven is closely tied to that repository. Therefore you need to use a different Maven repository, for example you could configure css4j's repository in your pom.xml:

<repositories>
    <repository>
        <id>css4j</id>
        <name>CSS4J repository</name>
        <url>https://css4j.github.io/maven/</url>
    </repository>
</repositories>

and then:

<!-- This artifact is not in Maven Central -->
<dependency>
    <groupId>io.sf.carte</groupId>
    <artifactId>echosvg-transcoder</artifactId>
    <version>${echosvg.version}</version>
</dependency>

or

<!-- This artifact is not in Maven Central -->
<dependency>
    <groupId>io.sf.carte</groupId>
    <artifactId>echosvg-all</artifactId>
    <version>${echosvg.version}</version>
</dependency>

Disclaimer

Please note that css4j's Maven repository is a very small one hosted on Github Pages. The fact that it only contains a few artifacts may slow down your build, due to Apache Maven expecting to find all of the artifacts in the configured repositories. Maven was designed to work with Central-like repositories, not with small ones like this.

And given that Github controls the Pages hosting, there are no service guarantees.

You are encouraged to use Gradle instead of Maven, as it is more flexible and allows configuring which artifact groups can be downloaded from which repository.

Clone this wiki locally