MyGit

HubSpot/dependency-management-maven-plugin

Fork: 6 Star: 5 (更新于 1970-01-01 00:00:00)

license: 暂无

Language: Java .

最后发布版本: dependency-management-maven-plugin-0.11 ( 2018-02-01 03:27:38)

GitHub网址

dependency-management-plugin

This plugin has been adopted by the basepom project, and now lives here

Maven Plugin for validating that the versions in dependency management and plugin management match the resolved versions. Can be run as a standalone plugin or as a rule with the maven-enforcer-plugin.

Available parameters

  • skip

    Skips plugin execution entirely. Defaults to false.

  • fail

    Whether to fail the build if any errors are found. Defaults to false.

  • requireManagement

    Wrapper for configuration to make dependency and/or plugin management required. See here for an example

Minimal usage example

<plugins>
  ...
  <plugin>
    <groupId>com.hubspot.maven.plugins</groupId>
    <artifactId>dependency-management-plugin</artifactId>
    <version>0.4</version>
    <executions>
      <execution>
        <goals>
          <goal>analyze</goal>
        </goals>
        <phase>validate</phase>
      </execution>
    </executions>
  </plugin>
  ...
</plugins>

Full usage example

<plugins>
  ...
  <plugin>
    <groupId>com.hubspot.maven.plugins</groupId>
    <artifactId>dependency-management-plugin</artifactId>
    <version>0.4</version>
    <executions>
      <execution>
        <goals>
          <goal>analyze</goal>
        </goals>
        <phase>validate</phase>
        <configuration>
          <fail>true</fail>
          <requireManagement>
            <dependencies>true</dependencies>
            <plugins>true</plugins>
            <allowVersions>false</allowVersions>
            <allowExclusions>false</allowExclusions>
            <overrides>
              <override>
                <patterns>
                  <pattern>com.example:*</pattern>
                </patterns>
                <dependencies>false</dependencies>
              </override>
            </overrides>
          </requireManagement>
        </configuration>
      </execution>
    </executions>
  </plugin>
  ...
</plugins>

Enforcer plugin example

<plugins>
  ...
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <version>1.4</version>
    <dependencies>
      <dependency>
        <groupId>com.hubspot.maven.plugins</groupId>
        <artifactId>dependency-management-plugin</artifactId>
        <version>0.4</version>
      </dependency>
    </dependencies>
    <executions>
      <execution>
        <goals>
          <goal>enforce</goal>
        </goals>
        <configuration>
          <fail>true</fail>
          <rules>
            <dependencyManagementRule implementation="com.hubspot.maven.plugins.dependency.management.DependencyManagementRule">
              <requireManagement>
                <dependencies>true</dependencies>
                <plugins>true</plugins>
                <allowVersions>false</allowVersions>
                <allowExclusions>false</allowExclusions>                
                <exceptions>
                  <exception>com.example:*</exception>
                </exceptions>                
              </requireManagement>
            </dependencyManagementRule>
          </rules>
        </configuration>
      </execution>
    </executions>
  </plugin>
  ...
</plugins>

最近版本更新:(数据更新于 1970-01-01 00:00:00)

2018-02-01 03:27:38 dependency-management-maven-plugin-0.11

HubSpot/dependency-management-maven-plugin同语言 Java最近更新仓库

2024-09-26 22:56:51 PBH-BTN/PeerBanHelper

2024-09-24 22:34:56 kestra-io/kestra

2024-09-22 17:06:16 Eanya-Tonic/CCTV_Viewer

2024-09-20 23:12:17 apache/incubator-seata

2024-09-20 16:21:35 alibaba/nacos

2024-09-19 23:40:03 spring-projects/spring-boot