Could not resolve dependencies for my Maven project

Devin Cannava :

I am trying to create a program that will use the sikulix libraries. So I copy pasted the dependencies from https://mvnrepository.com/artifact/com.sikulix/sikulixapi/1.1.2. Then I ran mvn install to install the libraries and I got this error
[ERROR] Failed to execute goal on project auto-fish: Could not resolve dependencies for project com.bine:auto-fish:jar:1.0: Could not find artifact com.github.vidstige:jadb:jar:-v1.0-g94ebf38-23 in central (https://repo.maven.apache.org/maven2)

After doing some research I realized I may need to add a repositories tag with the sikulixapi repo. That gave me this error.

[ERROR] Failed to execute goal on project auto-fish: Could not resolve dependencies for project com.bine:auto-fish:jar:1.0: Could not find artifact com.github.vidstige:jadb:jar:-v1.0-g94ebf38-23 in Sikulix Repo (https://mvnrepository.com/artifact/com.sikulix/sikulixapi)

At this point I am unsure as to what I should do. This is my first every Maven project. `

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0

<groupId>com.bine</groupId>
<artifactId>auto-fish</artifactId>
<version>1.0</version>

<name>auto-fish</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
</properties>

 <repositories>
    <repository>
        <id>Sikulix Repo</id>
        <url>https://mvnrepository.com/artifact/com.sikulix/sikulixapi</url>
    </repository>

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.sikulix/sikulixapi -->
    <dependency>
        <groupId>com.sikulix</groupId>
        <artifactId>sikulixapi</artifactId>
        <version>1.1.2</version>
    </dependency>

</dependencies>

<build>
    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
        <plugins>
            <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.2</version>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
            <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
        </plugins>
    </pluginManagement>
</build>

` The code is split up but note that they are all in the pom file for my maven project. Also the first 5 lines aren't not showing up for some reason but I feel like they are not important. And i'm using Vs code for all this.

And if you're wondering the goal of this is to create something that will play some dumb fishing game for me, but this is more of a test to see if I can pull it off rather than something I actually need lol.

Mark Peters :

If you look at your vidstige artifact in mvnrepository.com, you'll see it lists "Mulesoft" as the only repo that contains it. Following that link shows https://repository.mulesoft.org/nexus/content/repositories/public/ as the optional repository URL you should be adding, not the mvnrepository URL you added which was just a link to the mvnrepository search engine results.

So in short, this should hopefully work:

<repository>
    <id>Mulesoft Repo</id>
    <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
</repository>

Note I'm unfamiliar with this repository, so if it requires any kind of authentication or licensing you would want to follow up with instructions from that repo owner.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=161018&siteId=1