maven: плагин в хранилище, но mvn не находит его - PullRequest
0 голосов
/ 08 ноября 2018

Очень странная вещь:

мы используем хранилище Nexus, и когда я объявляю

    <dependency>
        <groupId>com.oracle.weblogic</groupId>
        <artifactId>wls-maven-plugin</artifactId>
        <version>12.1.3.0</version>
    </dependency>

Загружается в хранилище:

Downloading: https://my.secret.domain/nexus/content/groups/public-thirdparty/com/oracle/weblogic/wls-maven-plugin/12.1.3.0/wls-maven-plugin-12.1.3.0.pom
Downloaded: https://my.secret.domain/nexus/content/groups/public-thirdparty/com/oracle/weblogic/wls-maven-plugin/12.1.3.0/wls-maven-plugin-12.1.3.0.pom (474 B at 1.2 KB/sec)
Downloading: https://my.secret.domain/nexus/content/groups/public-thirdparty/com/oracle/weblogic/wls-maven-plugin/12.1.3.0/wls-maven-plugin-12.1.3.0.jar
Downloaded: https://my.secret.domain/nexus/content/groups/public-thirdparty/com/oracle/weblogic/wls-maven-plugin/12.1.3.0/wls-maven-plugin-12.1.3.0.jar (146 KB at 557.8 KB/sec)

(и фактически присутствует), но когда я пытаюсь использовать его как плагин:

        <plugin>
            <groupId>com.oracle.weblogic</groupId>
            <artifactId>wls-maven-plugin</artifactId>
            <version>12.1.3.0</version>
            <executions>
                <execution>
                    <id>wls-appc</id>
                    <phase>package</phase>
                    <goals>
                        <goal>appc</goal>
                    </goals>
                    <configuration>
                        <artifactLocation>com.oracle.weblogic:wls-dev:zip:12.1.3.0</artifactLocation>
                        <middlewareHome>${env.BEA_HOME}</middlewareHome>
                        <classpath>${util.classpath}</classpath>
                    </configuration>
                </execution>
            </executions>
        </plugin>

внезапно он больше не находит его:

[ERROR] Plugin com.oracle.weblogic:wls-maven-plugin:12.1.3.0 or one of its dependencies could not be resolved: Failure to find com.oracle.weblogic:wls-maven-plugin:jar:12.1.3.0 in https://my.secret.domain/nexus/content/repositories/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]

примечание: он загружает его из другого хранилища по сравнению с тем, где он его не находит:

https://my.secret.domain/nexus/content/groups/public-thirdparty

против

https://my.secret.domain/nexus/content/repositories/public

но это локально там ...

кто-нибудь может помочь?

Я действительно озадачен этим ...

если потребуется дополнительная информация, я буду рад предоставить ее ...

1 Ответ

0 голосов
/ 08 ноября 2018

Видимо, это была проблема:

<mirror>
    <id>nexus</id>
    <mirrorOf>external:*,!digit</mirrorOf>
    <url>https://my.secret.domain/nexus/content/repositories/public</url>
</mirror>

<mirror>
    <id>digit</id>
    <mirrorOf>digit</mirrorOf>
    <url>https://my.secret.domain/nexus/content/groups/public-thirdparty/</url>
</mirror>  

В settings.xml ...

Если вы указываете на «groups» -> "https://my.secret.domain/nexus/content/groups/public-thirdparty/" (в нашей конфигурации), он загружает плагин, но пытается проверить его только с помощью репозиториев (поэтому https://my.secret.domain/nexus/content/repositories/public) и не не найти это ...

-X действительно помог в этом ...

...