在Jenkins Build -ODM期间增加了Maven的第三方依赖性问题



我正在尝试使用Jenkins Pipeline和Maven插件在Eclipse之外构建ODM项目。我正在关注链接:https://www.ibm.com/support/knowledgecenter/en/ssqp76_8.9.0/com.ib.ibm.odm.designer.run/build/build_topics/con_build_buildcmd_intro.htmd_intro.htmd_intro.htmd_intro.run/尽管此链接在我的本地(Windows)中没有Jenkins管道的情况下运行良好,但是当我尝试在Jenkins(Linux Machine)中运行相同的设置时,我会收到以下错误:

[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>

请让我知道是否有人面临类似问题或可能解决上述问题。

预先感谢。

可能的分辨率:"安装构建命令maven插件及其相关的操作决策管理器伪像在您的Maven存储库中"

要将构建命令maven插件部署到远程 maven存储库中,您必须在环境中配置maven。然后,您使用以下命令:mvn部署:deploy-file -dfile = rules-compiler-maven-plugin.jar -dpomfile = rules-compiler-maven-plugin.pom /blockquote>

这需要访问Jenkins/Maven Server,在许多公司中,DevOps将完成。

您在Maven存储库中安装构建命令Maven插件及其相关的操作决策管理器。

部署构建命令插件

您仅在包含构建代理的每台计算机上部署一次插件。

要将构建命令maven插件部署到远程Maven存储库中,您必须首先在环境中配置Maven。

然后,在<InstallDir>/buildcommand/rules-compiler中,打开命令提示符。使用以下命令:

mvn deploy:deploy-file -Dfile=rules-compiler.jar -DpomFile=rules-compiler-maven-plugin.pom

如果您没有远程存储库,则可以在本地测试该插件。您运行以下命令:

mvn install:install-file -Dfile=rules-compiler.jar -DpomFile=rules-compiler-maven-plugin.pom

此命令在您的本地Maven存储库中添加以下插件:

com/ibm/rules/buildcommand/rules-compiler

部署注释存档

如果要构建COBOL项目或使用XOM注释的项目,则还必须在构建项目之前将注释存档部署到环境中。

<InstallDir>/buildcommand/rules-compiler中,打开命令提示符。使用以下命令:

mvn deploy:deploy-file -Dfile=rules-compiler.jar -DpomFile=xom-annotations.pom

如果您没有远程存储库,则可以在本地测试该插件。您运行以下命令:

mvn install:install-file -Dfile=rules-compiler.jar -DpomFile=xom-annotations.pom

此命令在您的本地Maven存储库中添加以下插件:

com/ibm/rules/buildcommand/xom-annotation

相关内容

  • 没有找到相关文章

最新更新