我们正在使用声明性管道,最新的Jenkins.构建在docker slave容器中执行,该容器具有maven和其他工具.我们当前的Jenkinsfile类似于:
stage('build') { steps { sh 'mvn clean install'} }
stage('test') { /* functional tests using a different tool */ }
stage('publish') {
steps {
// mvn clean deploy -DskipTests -DaltDeploymentRepository... (rebuilds, which we want to avoid, as its a multimodule project)
// withMaven(options:[artifactsPublisher()] { } ... (from maven-pipeline-plugin)
}
}
Run Code Online (Sandbox Code Playgroud)
Jenkins经典模式有一个Maven Integration插件,它提供了一个"部署工件到Maven存储库"的部分,它使用Maven RedeployPublisher只发布工件.我正在寻找相当于此的管道,我认为maven-pipeline-plugin可以做到这一点,但是找不到一个例子.任何指针赞赏!
我使用带有Grails 2.3.x资产管道的angular-ui-bootstrap:1.6.1插件.其中一个组件 - alert.js正在尝试加载/template/alert/alert.html,但这会解析为404.
我试过包括grails.assets.includes = [*/ .html],没有帮助.
有什么解决方法吗?无论如何让资产管道包含部分模板?
我使用 mvn 3.6.1 并且在以下情况下无法正确解析 ${revision} :
父存储库(单独的存储库):top/pom.xml:
<groupId>com.x</groupId>
<artifactId>top</artifactId>
<version>${revision}</version>
Run Code Online (Sandbox Code Playgroud)
mvn -Drevision=1.0.0 clean deploy # 在本地 .m2 中安装良好并部署到 nexus
派生子存储库(单独的存储库)
<groupId>com.x</groupId>
<artifactId>child</artifactId>
<version>${revision}</version>
<parent>
<groupId>com.x</groupId>
<artifactId>top</artifactId>
<version>${revision}</version> <!-- This is not resolving -->
<relativePath/>
</parent>
Run Code Online (Sandbox Code Playgroud)
mvn -Drevision=1.0.0 全新安装会引发错误不可解析的父 pom 错误:
Non-resolvable parent POM for com.x:child:${revision}: Could not transfer artifact com.x:top:pom:${revision} from/to nexus ($nexusUrl): Failed to transfer file ${nexusUrl}/com/x/top/$%7Brevision%7D/top-$%7Brevision%7D.pom with status code 400 and 'parent.relativePath' points at no local POM @ line 12, column 1
Run Code Online (Sandbox Code Playgroud)
因为它正在寻找字面意思“com.x:top:pom:${revision}”而不是v alue。即使我删除标签也会发生同样的错误。
如果我将以下父级与本地相对路径一起使用,它可以正常工作:
<parent>
<groupId>com.x</groupId>
<artifactId>top</artifactId> …Run Code Online (Sandbox Code Playgroud)