是否有一个 Maven 插件可以验证所有依赖项是否已发布?

发布于 2024-08-31 06:01:00 字数 103 浏览 3 评论 0原文

“maven-release-plugin”具有此功能,但它不能作为单独的目标使用。

我想我在某处见过这个功能,但我找不到了。如果有人知道在哪里可以找到这样的插件,那就太好了。

The 'maven-release-plugin' has this feature, but it is not available as separate goal.

I think I have seen this functionality somewhere, but I can't find it again. Would be great if somebody knows where to find such a plugin.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

懷念過去 2024-09-07 06:01:00

maven enforcer 插件 有一个 requireReleaseDeps 规则允许强制不将快照包含为依赖项< /em>。这可能就是您正在寻找的。

如果您像这样配置插件(请检查规则文档以获取更多选项):

<project>
  [...]
  <build>
   <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.0-beta-1</version>
        <configuration>
          <rules>
            <requireReleaseDeps>
              <message>No Snapshots Allowed!</message>
            </requireReleaseDeps>
          </rules>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

然后调用 mvn enforcer:enforce 将完成这项工作。

The maven enforcer plugin has a requireReleaseDeps rule allowing to enforce that no snapshots are included as dependencies. It may be what you're looking for.

If you configure the plugin like this (check the rule documentation for more options):

<project>
  [...]
  <build>
   <plugins>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.0-beta-1</version>
        <configuration>
          <rules>
            <requireReleaseDeps>
              <message>No Snapshots Allowed!</message>
            </requireReleaseDeps>
          </rules>
        </configuration>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

Then calling mvn enforcer:enforce will do the job.

莫多说 2024-09-07 06:01:00

使用 release:preparedryRun=true 一起应该做你想要的。

Using release:prepare together with dryRun=true should do what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文