Проблема с добавлением сторонней зависимости в Maven во время сборки Jenkins - ODM - PullRequest
0 голосов
/ 01 марта 2019

Я пытаюсь построить проекты ODM вне затмения, используя конвейер Jenkins и плагин Maven.Я перехожу по ссылке: https://www.ibm.com/support/knowledgecenter/en/SSQP76_8.9.0/com.ibm.odm.dserver.rules.designer.run/build_topics/con_buildcmd_intro.html Хотя эта ссылка хорошо работает без конвейера Jenkins в моем локальном (Windows), но когда я пытаюсь запустить ту же настройку в Jenkins (Linux-машина), я получаю следующую ошибку:

[WARNING] The POM for com.ibm.rules.buildcommand:rules-compiler-maven-plugin:jar:8.10.0.0 is missing, no dependency information available
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ helloWorld:hello-xom:[unknown-version], /var/lib/jenkins/workspace/odm-devops-build/Hello XOM/pom.xml, line 19, column 21
[ERROR] Unresolveable build extension: Plugin com.ibm.rules.buildcommand:rules-compiler-maven-plugin:8.10.0.0 or one of its dependencies could not be resolved: Failure to find com.ibm.rules.buildcommand:rules-compiler-maven-plugin:jar:8.10.0.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 @ 
[ERROR] Unknown packaging: decisionservice @ helloWorld:hello-main:[unknown-version], /var/lib/jenkins/workspace/odm-devops-build/Hello Main Service/pom.xml, line 14, column 16

Файл pom, о котором говорится в приведенной выше ошибке, имеет следующий вид:

<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>helloWorld</groupId>
        <artifactId>parent</artifactId>
        <version>1.0.0</version>
        <relativePath>..</relativePath>
    </parent>

    <artifactId>hello-main</artifactId>
    <packaging>decisionservice</packaging>

    <build>
        <plugins>
            <plugin>
                <groupId>com.ibm.rules.buildcommand</groupId>
                <artifactId>rules-compiler-maven-plugin</artifactId>
                <configuration>

                    <deployments>
                        <deployment>
                            <name>simple dep</name>
                        </deployment>
                    </deployments>

                    <resolvers>
                        <resolver>
              <!-- The values of the kind and url of the project correspond to the 'kind' and 'url' attribute values of an 'entries' element in the .ruleproject file. -->
                            <kind>JAVA_PROJECT</kind>
                            <url>platform:/Hello XOM</url>
              <!-- The artifactKey references the groupId and artifactId of a Maven dependency. -->
                            <artifactKey>${project.groupId}:hello-xom</artifactKey>
                        </resolver>
                    </resolvers>

                </configuration>
            </plugin>
        </plugins>

    </build>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>hello-xom</artifactId>
            <type>jar</type>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

</project>

Пожалуйста, дайте мне знать, если кто-то сталкивался с подобной проблемой или имеет возможное решение длявышеуказанный вопрос.

Заранее спасибо.

1 Ответ

0 голосов
/ 29 марта 2019

Возможное решение: «установить плагин Build Command Maven и связанные с ним артефакты диспетчера операционных решений в вашем хранилище Maven« ... »на каждом компьютере, содержащем агенты сборки» *

Для развертывания сборкиПодключите плагин Maven к удаленному репозиторию Maven, вы должны настроить Maven в своей среде.Затем вы используете следующую команду: mvn deploy: deploy-file -Dfile = rules-compiler-maven-plugin.jar -DpomFile = rules-compiler-maven-plugin.pom

Для этого требуется доступ ксервер Jenkins / Maven, и во многих компаниях это будет сделано DevOps.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...