CoinGecko-Java icon indicating copy to clipboard operation
CoinGecko-Java copied to clipboard

Use in maven project

Open zephirus opened this issue 3 years ago • 15 comments

How can I integrate this in my maven project?

zephirus avatar Apr 11 '21 11:04 zephirus

^^^^^^^^^^^^^^^^^^^^^^^

LysergikProductions avatar May 24 '21 10:05 LysergikProductions

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.

portlek avatar May 27 '21 13:05 portlek

Where should i clone the project ?

gagangag avatar Jun 24 '21 12:06 gagangag

image

portlek avatar Jun 24 '21 13:06 portlek

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 <groupId>io.github.parentpom</groupId> <artifactId>ppom</artifactId> 3.4.6 to my project also does not help. I guess ill switch to a better documented api.

gagangag avatar Jun 24 '21 13:06 gagangag

You have to do it like @portlek said.

zephirus avatar Jun 24 '21 13:06 zephirus

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

portlek avatar Jun 24 '21 15:06 portlek

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 avatar Sep 17 '21 21:09 llva

@llva I will work on adding the project to Maven soon.

Philipinho avatar Nov 03 '21 19:11 Philipinho

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.

1Maxnet1 avatar Dec 15 '21 12:12 1Maxnet1

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)

dehidehidehi avatar Dec 25 '21 21:12 dehidehidehi

Would be great if you could publish the library to maven repository. Many thanks in advance

marinkobabic avatar Jan 16 '22 21:01 marinkobabic

Yes please, would be great!

LucasDijk avatar May 02 '22 09:05 LucasDijk

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.

anwfr avatar Jun 23 '22 07:06 anwfr

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.

boritopalito avatar Jul 27 '23 10:07 boritopalito