Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maven support for java #16

Closed
BritikovKI opened this issue Aug 2, 2020 · 2 comments
Closed

Maven support for java #16

BritikovKI opened this issue Aug 2, 2020 · 2 comments

Comments

@BritikovKI
Copy link

Steps to reproduce

I am trying to create Java application(not Android), which will use incubed, but I have issues with loading it via maven(actually with building it locally as well, but it is whole other story).

I've followed the steps, written in the manual:
https://in3.readthedocs.io/en/develop/getting_started.html#java
and added the dependency to the pom.xml file, but it failed to work.

<dependency>
            <groupId>it.slock</groupId>
            <artifactId>in3</artifactId>
            <version>2.21</version>
</dependency>

To check if such dependency exists I've opened to the https://repo.maven.apache.org/maven2/, but there is no such thing as it.slock.

Expected behavior

Incubed is loaded with help of maven.

Actual behavior

Here is result of mvn install:

[ERROR] Failed to execute goal on project IncubedClient: Could not resolve dependencies for project org.example:IncubedClient:jar:1.0-SNAPSHOT: Failure to find it.slock:in3:jar:2.21 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

System configuration

LinuxMint 19.3 (tricia). Kernel 5.3.0-62.
Java: 11, Maven: 3.6.0

Incubed version

none

Request

none

Incubed Configuration

none

Chain

none

@leonardotc
Copy link
Contributor

Hello @BritikovKI. Currently we still have not pushed a jar release into maven central (we are working on that). The current jar is hosted on github and for that you will need to reference a repository in your pom.xml and, most likely, register the server on your settings.xml. Please follow the procedure as described here: https://docs.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages.

Another way of doing this is hosting your own instance of Nexus, upload the artifact manually and referencing it on your pom.xml. For more information on Nexus, please check the following: https://www.sonatype.com/nexus-repository-oss.

Except for those, you could always add the dependency manually to classpath (this is different from command line to IDE environment) but you may have to use a plugin to copy the jar to the final output folder depending on what you are trying to develop/archetype.

@BritikovKI
Copy link
Author

Thanks for response, this solution worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants