Giter Club home page Giter Club logo

Comments (6)

khmarbaise avatar khmarbaise commented on August 28, 2024 1

So I have enhanced the display-dependency-updates output to support plugin dependencies which are defined like this:

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.4</version>
        <configuration>
          <plugins>
            <plugin>
              <groupId>com.mebigfatguy.fb-contrib</groupId>
              <artifactId>fb-contrib</artifactId>
              <version>7.0.1</version>
            </plugin>
          </plugins>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

and also it support the usage via pluginManagement like this:

 <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>localhost</groupId>
          <artifactId>dummy-maven-plugin</artifactId>
          <version>1.0</version>
          <dependencies>
            <dependency>
              <groupId>localhost</groupId>
              <artifactId>dummy-api</artifactId>
              <version>1.2</version>
            </dependency>
          </dependencies>
        </plugin>
     </plugins>
...
</project>

from versions.

mattnelson avatar mattnelson commented on August 28, 2024

It looks like this was recently broken. When I look at a site I built a few months back, the plugin dependencies are listed. It doesn't appear to be an issue with the java/plugin version, my hunch is that something changed between maven 3.0 and 3.3 to break this functionality.

from versions.

khmarbaise avatar khmarbaise commented on August 28, 2024

The question is how the plugin dependencies have been defined. If they have been defined via a property like this:

  <properties>
    <dep.version>1.0</dep.version>
 </properties>
 <...
    <plugins>
      <plugin>
         <groupId>...</groupId>
         <dependencies>
           <dependency>
            ... 
              <version>${dep.version}</version>
           </dependency>

         </dependencies>

it will be updated via update-properties. There is an integration test to check it-update-properties-004.
Unfortunately I don't have more information. I will close the issue. If you have further details please don't hesitate to reopen the issue.

from versions.

ptamarit avatar ptamarit commented on August 28, 2024

Hello,

I'm not able to reopen this issue, but I do have the same problem.

With the following 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>test</groupId>
  <artifactId>test</artifactId>
  <version>0.1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <prerequisites>
    <maven>3.5.0</maven>
  </prerequisites>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>3.0.4</version>
        <configuration>
          <plugins>
            <plugin>
              <groupId>com.mebigfatguy.fb-contrib</groupId>
              <artifactId>fb-contrib</artifactId>
              <version>7.0.1</version>
            </plugin>
          </plugins>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

One would expect that a command like mvn versions:display-dependency-updates (or maybe mvn versions:display-plugin-updates) would show that a newer version of fb-contrib is available (currently 7.0.2), but it's not the case.

A plugin dependency is still a dependency, so adding this check in the display-dependency-updates goal would make the most sense to me. Another option would be to add yet another goal named display-plugin-dependency-updates.

Cheers,
Pablo

from versions.

khmarbaise avatar khmarbaise commented on August 28, 2024

Ok reopened. First you use prerequisites on your jar packaging is simply wrong and will produce a WARNING in Maven 3.5.0.
Apart from that a plugin dependency is something different than a usual dependency cause it's limited to the classpath of the plugin...But of course it would make sense to produce an update check for those dependencies as well...

Thanks for those supplemental informations...

from versions.

ptamarit avatar ptamarit commented on August 28, 2024

Hi,

You're welcome, and thanks for the very useful plugin!
Regarding prerequisite vs enforcer, I commented on #48.

Cheers,
Pablo

from versions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.