Pom archivo / Jar no en una ubicación central

gc7__:

Estoy tratando de ejecutar un frasco independiente para mi proyecto de Java que está funcionando muy bien en IntelliJ.

La dependencia JRAW está incluido en mi archivo pom, pero mientras se ejecuta mvn clean installestoy recibiendo el siguiente error

[ERROR] Failed to execute goal on project reddit-crawl-maven: Could not resolve dependencies for project com.test1:reddit-crawl-maven:jar:1.0-SNAPSHOT: Could not find artifact net.dean.jraw:JRAW:jar:1.1.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

Se menciona aquí que el archivo jar está presente en la primavera de lanzamiento Lib .

¿Cómo hago para que mi mirada archivo pom en la biblioteca de la primavera instaed del centro de maven.

También estoy funcionando mvn -U clean installpara evitar el error siguiente

ERROR] Failed to execute goal on project reddit-crawl-maven: Could not resolve dependencies for project com.test1:reddit-crawl-maven:jar:1.0-SNAPSHOT: Failure to find net.dean.jraw:JRAW:jar:1.1.0 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]

Enfoques alternativos:

  1. Sería incluso trabajo si las obras repositorio con memoria caché locales ya que quieren hacer un JAR independiente (independiente de la plataforma).

  2. Si pudiera descargar el JRAW.JAR directamente desde la fuente y compilar maven en consecuencia.

Aquí está mi archivo pom, si eso ayuda:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.test1</groupId>
    <artifactId>reddit-crawl-maven</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <kotlin.version>1.1.3</kotlin.version>
        <junit.version>4.12</junit.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-runtime</artifactId>
            <version>${kotlin.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-test-junit</artifactId>
            <version>${kotlin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.dean.jraw</groupId>
            <artifactId>JRAW</artifactId>
            <version>1.1.0</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.moshi</groupId>
            <artifactId>moshi</artifactId>
            <version>1.8.0</version>
        </dependency>
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>3.12.1</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <!--<mainClass>com.test1.Main</mainClass>-->
                            <mainClass>event.handlers.InventoryEventHandler</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>com.test1.Main</addClasspath>
                        </manifest>
                        <descriptorRefs>
                            <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>


</project>
Mickael:

Cuando nos fijamos en repositorios Maven , hay una nota:

Nota: este artefacto se encuentra en la primavera Lib lanzamiento repositorio ( http://repo.spring.io/libs-release/ )

Creo que se necesita para declarar este repositorio en su pom.xmlsiguiente manera:

<repository>
    <id>spring-lib-release-repo</id>
    <name>Spring Lib Release Repository</name>
    <url>http://repo.spring.io/libs-release/</url>
</repository>

Supongo que te gusta

Origin http://43.154.161.224:23101/article/api/json?id=234701&siteId=1
Recomendado
Clasificación