mvn versions:display-plugin-updates says I can update from 3 to 2

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mvn versions:display-plugin-updates says I can update from 3 to 2

Jason Young
Did I do something wrong?

$ mvn versions:display-plugin-updates
...
[INFO] Require Maven 2.0.1 to use the following plugin updates:
[INFO]   maven-war-plugin ................................... 3.2.3 -> 2.0.2

--

Jason Young
Reply | Threaded
Open this post in threaded view
|

Re: mvn versions:display-plugin-updates says I can update from 3 to 2

John Patrick
Technically you didn't do anything wrong...
If you don't configure what version of java and maven your project
requires, then versions will tell you about all options available.

So that is saying if you want users to build using maven 2.0.1 then
the maven-war-plugin needs to be 2.0.2.

If you add something like below which says I can run on maven 3.6.0 or
newer, I can also only run on java 1.8, or java 11 or newer, e.g. not
java 9 and not java 10. Then when you re-run versions older versions
of maven won't be shown. Also check your using versions 2.7
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-enforcer-plugin</artifactId>
  <version>3.0.0-M2</version>
  <executions>
    <execution>
      <id>enforce-requirements</id>
      <goals>
        <goal>enforce</goal>
      </goals>
      <configuration>
        <rules>
          <requireJavaVersion>
            <version>[1.8,9),[11,)</version>
          </requireJavaVersion>
          <requireMavenVersion>
            <version>[3.6.0,)</version>
          </requireMavenVersion>
        </rules>
      </configuration>
    </execution>
  </executions>
</plugin>

Hope that helps.

John

On Fri, 6 Sep 2019 at 16:37, Jason Young <[hidden email]> wrote:

>
> Did I do something wrong?
>
> $ mvn versions:display-plugin-updates
> ...
> [INFO] Require Maven 2.0.1 to use the following plugin updates:
> [INFO]   maven-war-plugin ................................... 3.2.3 -> 2.0.2
>
> --
>
> Jason Young

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: mvn versions:display-plugin-updates says I can update from 3 to 2

Jason Young
Thanks! I finally tried looking at this. This works for me.

Side note: We use the enforcer plugin only when we enable a certain profile
because of MENFORCER-306. We can't downgrade before that defect because
of MENFORCER-268. 306 is fixed in 3.0.0-M3, which is not in Maven Central
yet. I forgot to enable the profile.

On Sat, Sep 7, 2019 at 4:37 AM John Patrick <[hidden email]> wrote:

> Technically you didn't do anything wrong...
> If you don't configure what version of java and maven your project
> requires, then versions will tell you about all options available.
>
> So that is saying if you want users to build using maven 2.0.1 then
> the maven-war-plugin needs to be 2.0.2.
>
> If you add something like below which says I can run on maven 3.6.0 or
> newer, I can also only run on java 1.8, or java 11 or newer, e.g. not
> java 9 and not java 10. Then when you re-run versions older versions
> of maven won't be shown. Also check your using versions 2.7
> <plugin>
>   <groupId>org.apache.maven.plugins</groupId>
>   <artifactId>maven-enforcer-plugin</artifactId>
>   <version>3.0.0-M2</version>
>   <executions>
>     <execution>
>       <id>enforce-requirements</id>
>       <goals>
>         <goal>enforce</goal>
>       </goals>
>       <configuration>
>         <rules>
>           <requireJavaVersion>
>             <version>[1.8,9),[11,)</version>
>           </requireJavaVersion>
>           <requireMavenVersion>
>             <version>[3.6.0,)</version>
>           </requireMavenVersion>
>         </rules>
>       </configuration>
>     </execution>
>   </executions>
> </plugin>
>
> Hope that helps.
>
> John
>
> On Fri, 6 Sep 2019 at 16:37, Jason Young <[hidden email]>
> wrote:
> >
> > Did I do something wrong?
> >
> > $ mvn versions:display-plugin-updates
> > ...
> > [INFO] Require Maven 2.0.1 to use the following plugin updates:
> > [INFO]   maven-war-plugin ................................... 3.2.3 ->
> 2.0.2
> >
> > --
> >
> > Jason Young
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>