CoinGecko-Java
CoinGecko-Java copied to clipboard
Use in maven project
How can I integrate this in my maven project?
^^^^^^^^^^^^^^^^^^^^^^^
clone.
add my parent pom to the pom.xml.
<parent>
<groupId>io.github.parentpom</groupId>
<artifactId>ppom</artifactId>
<version>3.4.6</version>
</parent>
then run mvn clean install
command.
Where should i clone the project ?
thats not what i ment haha i dont want to use this project i just want to add it as a dependency, since there is no jar file available and the instruction clone. (which does not help at all cause i could clone it into my trashcan haha)
adding the
You have to do it like @portlek said.
you should add this parent stuff to the pom.xml of the coingecko then run mvn clean install command, it will build the project into the local .m2 folder.
<parent>
<groupId>io.github.parentpom</groupId>
<artifactId>ppom</artifactId>
<version>3.4.6</version>
</parent>
then you can use it as a dependency like that;
<dependency>
<groupId>com.litesoftwares</groupId>
<artifactId>coingecko-java</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency
Hello @Philipinho @fabianpol, just wondering why we cannot find such dependency on https://repo.maven.apache.org posted in a released manner (without -SNAPSHOT) ???
Basically, I plugged a GitHub-Action on one of my GitHub repo which triggers a build each time I open a branch. Note it is perfectly building/compiling locally on my laptop.
But it is failing for the following reason on GitHub...
Error: Failed to execute goal on project barbuzzz: Could not resolve dependencies for project com.development.foo:barbuzzz:jar:0.0.1-SNAPSHOT: Could not find artifact com.litesoftwares:coingecko-java:jar:1.0-SNAPSHOT -> [Help 1]
Any idea would be appreciated :)
@llva I will work on adding the project to Maven soon.
Any news on this issue? I would be really interested in this and would offer to help or test as well, if you could need some help.
My solution was: Add this to your master pom.xml
<repositories>
<!-- Jitpack allows GitHub Maven projects to be linked as dependencies -->
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Then add this to your dependencies.
<!-- https://github.com/Philipinho/CoinGecko-Java -->
<dependency>
<groupId>com.github.Philipinho</groupId>
<artifactId>CoinGecko-Java</artifactId>
<version>master-2777edc9a4-1</version>
</dependency>
Finally build (Alt+F5)
Would be great if you could publish the library to maven repository. Many thanks in advance
Yes please, would be great!
FYI you can get it from maven by adding this to your pom.xml:
<dependencies>
<dependency>
<groupId>com.github.philipinho</groupId>
<artifactId>CoinGecko-Java</artifactId>
<version>master-SNAPSHOT</version>
</dependency>
</dependency>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
See https://jitpack.io/#philipinho/CoinGecko-Java for more details.
My solution was: Add this to your master pom.xml
<repositories> <!-- Jitpack allows GitHub Maven projects to be linked as dependencies --> <repository> <id>jitpack.io</id> <url>https://jitpack.io</url> </repository> </repositories>
Then add this to your dependencies.
<!-- https://github.com/Philipinho/CoinGecko-Java --> <dependency> <groupId>com.github.Philipinho</groupId> <artifactId>CoinGecko-Java</artifactId> <version>master-2777edc9a4-1</version> </dependency>
Finally build (Alt+F5)
I can confirm that this is working perfectly.