首页 文章

使用常 Spring 藤发布文件时是否尊重[conf]令牌?

提问于
浏览
1

我正在学习Ivy(http://ant.apache.org/ivy/)并将其作为构建过程的一部分进行集成 . 它进展顺利,但我坚持使用常 Spring 藤发布任务 . 具体来说,我想使用以下模式(包括当前配置的名称)发布到本地存储库:

$/[organisation]/[module]/[revision]/[type]s/[conf]/[artifact].[ext]

所以我设置了自定义解析器:

<filesystem name="modifiedLocalRepo">
    <ivy pattern="${ivy.local.default.root}/[organisation]/[module]/[revision]/[type]s/[conf]/[artifact].[ext]" />
    <artifact pattern="${ivy.local.default.root}/[organisation]/[module]/[revision]/[type]s/[conf]/[artifact].[ext]" />
</filesystem>

并配置了发布任务:

<ivy:publish 
    settingsRef="ivy.ext.settings.custom" <!--Location of definition of modifiedLocalRepo-->
    resolver="modifiedLocalRepo" 
    artifactspattern="bin/Debug/[module].[ext]" 
    pubrevision="1.1-Test" 
    overwrite="true"
    conf="primary"
/>

并在ivy.xml文件中定义conf:

<info organisation="Mine" module="Dependency"/>
<configurations defaultconf="primary"> <!--Don't think defaultconf should be necessary-->
    <conf name="primary"/>
</configurations>
<publications>
    <artifact name="Dependency" ext="dll" type="bin" conf="primary"/>
    <artifact name="Dependency" ext="pdb" type="bin" conf="primary"/>
</publications>

我有流程工作,常 Spring 藤配置,解决,项目构建和发布的工件(使用我上面的自定义解析器) . 但[conf]令牌始终解析为“默认” . 所以发布的目录具有以下结构:

*.ivy2\local\Mine\Dependency\1.1-Test\bins\default*

而不是结构

*.ivy2\local\Mine\Dependency\1.1-Test\bins\primary*

我一直在修补它,在它们有效的地方设置conf值,defaultconf值等,但它始终是“默认的” .

我正在使用ant来进行构建,并且已经在调试模式下运行(-d),检查了输出并发现没什么用处 . 我查看了<echoproperties >的输出,发现没什么用处 . 我已经阅读了常 Spring 藤文档,只发现在检索和报告输出中使用[conf]作为标记 .

我可以附加我正在使用的完整xml文件来进行有限的测试构建,如果它有用的话 .

在常 Spring 藤发布的工件模式中,[conf]令牌是否有效/受到尊重?如果是这样,我错过了什么?谢谢!

Update: 使用Ivy 2.3.0-rc2并决定尝试回滚并使用Ivy 2.0.0 . 同样的问题 .

1 回答

  • 0

    github看一下我的常 Spring 藤项目 . 我进行了设置,因此您可以轻松地将其添加到现有的Ant项目中 .

    我们使用Maven存储库,因此我将其设置为创建 pom.xml ,然后使用 mvn deploy:deploy-file 将其部署回Maven存储库 . 我们使用Jenkins进行构建,因此我们使用Jenkins运行 mvn deploy-file 来进行部署 . 我想我们可以使用 <ivy:publish> ,但从未真正尝试过 .

相关问题