You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Anders Hammar <an...@hammar.net> on 2025/01/20 19:57:36 UTC

Maven 4.0.0-rc-2 and m-install-p 4.0.0-beta-1

I've started to try out Maven 4 and have run into an issue with Maven
4.0.0-rc-2 and maven-install-plugin 4.0.0-beta-1. Are they supposed to be
compatible or is it expected?

[*ERROR*] Failed to execute goal
org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
*(default-install)* on project bom-test-parent: *Execution default-install
of goal org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
failed: An API incompatibility was encountered while executing
org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install:
java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact
org.apache.maven.api.Project.getPomArtifact()'*

[*ERROR*] *-----------------------------------------------------*

[*ERROR*] *realm =
plugin>org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1*

[*ERROR*] *strategy =
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy*

[*ERROR*] *urls[0] =
file:/Users/anders/.m2/repository/org/apache/maven/plugins/maven-install-plugin/4.0.0-beta-1/maven-install-plugin-4.0.0-beta-1.jar*

[*ERROR*] *urls[1] =
file:/Users/anders/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar*

[*ERROR*] *Number of foreign imports: 1*

[*ERROR*] *import: Entry[import  from realm ClassRealm[maven.api.v4,
parent: null]]*

/Anders

Re: Maven 4.0.0-rc-2 and m-install-p 4.0.0-beta-1

Posted by Anders Hammar <an...@hammar.net>.
Right. I just thought that there was an exception to m-install-p (and
m-deploy-p) that they needed to be v4 as there has been changes to
build/consumer pom which they need to know about. That not being the case
is nicely done!

/Anders

On Thu, Jan 23, 2025 at 8:43 PM Tamás Cservenák <ta...@cservenak.net> wrote:

> https://gist.github.com/cstamas/b0605a9fad09de4adcbd4444888baa4c
>
> This above is just to get the idea: so Maven N will support Maven
> Plugin N-1, or in other words, Maven 4 will fully support Maven 3
> plugins (but not Maven2 plugins).
>
> T
>
> On Thu, Jan 23, 2025 at 8:15 PM Anders Hammar <an...@hammar.net> wrote:
> >
> > OK. I incorrectly thought that I needed to use m-install-p v4 with Maven
> 4.
> > I just tested with m-install-p 3.1.1 and see that it works. Thanks for
> > clarifying!
> >
> > /Anders
> >
> > On Thu, Jan 23, 2025 at 11:35 AM Tamás Cservenák <ta...@cservenak.net>
> > wrote:
> >
> > > Howdy,
> > >
> > > Yes, plugins are lagging, as we currently focus on core.
> > > Given it works with Maven 3 plugins as well... you can still use Maven
> > > 4 w/ Maven 3 plugins.
> > >
> > > T
> > >
> > > On Thu, Jan 23, 2025 at 10:23 AM Anders Hammar <an...@hammar.net>
> wrote:
> > > >
> > > > It seems in fact that m-install-p 4.0.0-beta-1 is incompatible with
> Maven
> > > > 4.0.0 RCs. Using m-install-p 4.0.0-beta-2-SNAPSHOT from master seems
> to
> > > > work though. m-install-p 4.0.0-beta-1 has a dependency to Maven
> > > > 4.0.0-beta-2 and there have been some API changes since.
> > > >
> > > > So IMHO there is currently no easy way to use Maven 4.0.0 RCs if you
> want
> > > > to run "mvn install" and use build/consumer poms. Or am I missing
> > > something
> > > > here?
> > > >
> > > > /Anders
> > > >
> > > > On Mon, Jan 20, 2025 at 8:57 PM Anders Hammar <an...@hammar.net>
> wrote:
> > > >
> > > > > I've started to try out Maven 4 and have run into an issue with
> Maven
> > > > > 4.0.0-rc-2 and maven-install-plugin 4.0.0-beta-1. Are they
> supposed to
> > > be
> > > > > compatible or is it expected?
> > > > >
> > > > > [*ERROR*] Failed to execute goal
> > > > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> > > > > *(default-install)* on project bom-test-parent: *Execution
> > > > > default-install of goal
> > > > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> > > failed:
> > > > > An API incompatibility was encountered while executing
> > > > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install:
> > > > > java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact
> > > > > org.apache.maven.api.Project.getPomArtifact()'*
> > > > >
> > > > > [*ERROR*] *-----------------------------------------------------*
> > > > >
> > > > > [*ERROR*] *realm =
> > > > > plugin>org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1*
> > > > >
> > > > > [*ERROR*] *strategy =
> > > > > org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy*
> > > > >
> > > > > [*ERROR*] *urls[0] =
> > > > >
> > >
> file:/Users/anders/.m2/repository/org/apache/maven/plugins/maven-install-plugin/4.0.0-beta-1/maven-install-plugin-4.0.0-beta-1.jar*
> > > > >
> > > > > [*ERROR*] *urls[1] =
> > > > >
> > >
> file:/Users/anders/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar*
> > > > >
> > > > > [*ERROR*] *Number of foreign imports: 1*
> > > > >
> > > > > [*ERROR*] *import: Entry[import  from realm
> ClassRealm[maven.api.v4,
> > > > > parent: null]]*
> > > > >
> > > > > /Anders
> > > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: dev-help@maven.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Maven 4.0.0-rc-2 and m-install-p 4.0.0-beta-1

Posted by Tamás Cservenák <ta...@cservenak.net>.
https://gist.github.com/cstamas/b0605a9fad09de4adcbd4444888baa4c

This above is just to get the idea: so Maven N will support Maven
Plugin N-1, or in other words, Maven 4 will fully support Maven 3
plugins (but not Maven2 plugins).

T

On Thu, Jan 23, 2025 at 8:15 PM Anders Hammar <an...@hammar.net> wrote:
>
> OK. I incorrectly thought that I needed to use m-install-p v4 with Maven 4.
> I just tested with m-install-p 3.1.1 and see that it works. Thanks for
> clarifying!
>
> /Anders
>
> On Thu, Jan 23, 2025 at 11:35 AM Tamás Cservenák <ta...@cservenak.net>
> wrote:
>
> > Howdy,
> >
> > Yes, plugins are lagging, as we currently focus on core.
> > Given it works with Maven 3 plugins as well... you can still use Maven
> > 4 w/ Maven 3 plugins.
> >
> > T
> >
> > On Thu, Jan 23, 2025 at 10:23 AM Anders Hammar <an...@hammar.net> wrote:
> > >
> > > It seems in fact that m-install-p 4.0.0-beta-1 is incompatible with Maven
> > > 4.0.0 RCs. Using m-install-p 4.0.0-beta-2-SNAPSHOT from master seems to
> > > work though. m-install-p 4.0.0-beta-1 has a dependency to Maven
> > > 4.0.0-beta-2 and there have been some API changes since.
> > >
> > > So IMHO there is currently no easy way to use Maven 4.0.0 RCs if you want
> > > to run "mvn install" and use build/consumer poms. Or am I missing
> > something
> > > here?
> > >
> > > /Anders
> > >
> > > On Mon, Jan 20, 2025 at 8:57 PM Anders Hammar <an...@hammar.net> wrote:
> > >
> > > > I've started to try out Maven 4 and have run into an issue with Maven
> > > > 4.0.0-rc-2 and maven-install-plugin 4.0.0-beta-1. Are they supposed to
> > be
> > > > compatible or is it expected?
> > > >
> > > > [*ERROR*] Failed to execute goal
> > > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> > > > *(default-install)* on project bom-test-parent: *Execution
> > > > default-install of goal
> > > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> > failed:
> > > > An API incompatibility was encountered while executing
> > > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install:
> > > > java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact
> > > > org.apache.maven.api.Project.getPomArtifact()'*
> > > >
> > > > [*ERROR*] *-----------------------------------------------------*
> > > >
> > > > [*ERROR*] *realm =
> > > > plugin>org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1*
> > > >
> > > > [*ERROR*] *strategy =
> > > > org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy*
> > > >
> > > > [*ERROR*] *urls[0] =
> > > >
> > file:/Users/anders/.m2/repository/org/apache/maven/plugins/maven-install-plugin/4.0.0-beta-1/maven-install-plugin-4.0.0-beta-1.jar*
> > > >
> > > > [*ERROR*] *urls[1] =
> > > >
> > file:/Users/anders/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar*
> > > >
> > > > [*ERROR*] *Number of foreign imports: 1*
> > > >
> > > > [*ERROR*] *import: Entry[import  from realm ClassRealm[maven.api.v4,
> > > > parent: null]]*
> > > >
> > > > /Anders
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Maven 4.0.0-rc-2 and m-install-p 4.0.0-beta-1

Posted by Anders Hammar <an...@hammar.net>.
OK. I incorrectly thought that I needed to use m-install-p v4 with Maven 4.
I just tested with m-install-p 3.1.1 and see that it works. Thanks for
clarifying!

/Anders

On Thu, Jan 23, 2025 at 11:35 AM Tamás Cservenák <ta...@cservenak.net>
wrote:

> Howdy,
>
> Yes, plugins are lagging, as we currently focus on core.
> Given it works with Maven 3 plugins as well... you can still use Maven
> 4 w/ Maven 3 plugins.
>
> T
>
> On Thu, Jan 23, 2025 at 10:23 AM Anders Hammar <an...@hammar.net> wrote:
> >
> > It seems in fact that m-install-p 4.0.0-beta-1 is incompatible with Maven
> > 4.0.0 RCs. Using m-install-p 4.0.0-beta-2-SNAPSHOT from master seems to
> > work though. m-install-p 4.0.0-beta-1 has a dependency to Maven
> > 4.0.0-beta-2 and there have been some API changes since.
> >
> > So IMHO there is currently no easy way to use Maven 4.0.0 RCs if you want
> > to run "mvn install" and use build/consumer poms. Or am I missing
> something
> > here?
> >
> > /Anders
> >
> > On Mon, Jan 20, 2025 at 8:57 PM Anders Hammar <an...@hammar.net> wrote:
> >
> > > I've started to try out Maven 4 and have run into an issue with Maven
> > > 4.0.0-rc-2 and maven-install-plugin 4.0.0-beta-1. Are they supposed to
> be
> > > compatible or is it expected?
> > >
> > > [*ERROR*] Failed to execute goal
> > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> > > *(default-install)* on project bom-test-parent: *Execution
> > > default-install of goal
> > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> failed:
> > > An API incompatibility was encountered while executing
> > > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install:
> > > java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact
> > > org.apache.maven.api.Project.getPomArtifact()'*
> > >
> > > [*ERROR*] *-----------------------------------------------------*
> > >
> > > [*ERROR*] *realm =
> > > plugin>org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1*
> > >
> > > [*ERROR*] *strategy =
> > > org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy*
> > >
> > > [*ERROR*] *urls[0] =
> > >
> file:/Users/anders/.m2/repository/org/apache/maven/plugins/maven-install-plugin/4.0.0-beta-1/maven-install-plugin-4.0.0-beta-1.jar*
> > >
> > > [*ERROR*] *urls[1] =
> > >
> file:/Users/anders/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar*
> > >
> > > [*ERROR*] *Number of foreign imports: 1*
> > >
> > > [*ERROR*] *import: Entry[import  from realm ClassRealm[maven.api.v4,
> > > parent: null]]*
> > >
> > > /Anders
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Maven 4.0.0-rc-2 and m-install-p 4.0.0-beta-1

Posted by Tamás Cservenák <ta...@cservenak.net>.
Howdy,

Yes, plugins are lagging, as we currently focus on core.
Given it works with Maven 3 plugins as well... you can still use Maven
4 w/ Maven 3 plugins.

T

On Thu, Jan 23, 2025 at 10:23 AM Anders Hammar <an...@hammar.net> wrote:
>
> It seems in fact that m-install-p 4.0.0-beta-1 is incompatible with Maven
> 4.0.0 RCs. Using m-install-p 4.0.0-beta-2-SNAPSHOT from master seems to
> work though. m-install-p 4.0.0-beta-1 has a dependency to Maven
> 4.0.0-beta-2 and there have been some API changes since.
>
> So IMHO there is currently no easy way to use Maven 4.0.0 RCs if you want
> to run "mvn install" and use build/consumer poms. Or am I missing something
> here?
>
> /Anders
>
> On Mon, Jan 20, 2025 at 8:57 PM Anders Hammar <an...@hammar.net> wrote:
>
> > I've started to try out Maven 4 and have run into an issue with Maven
> > 4.0.0-rc-2 and maven-install-plugin 4.0.0-beta-1. Are they supposed to be
> > compatible or is it expected?
> >
> > [*ERROR*] Failed to execute goal
> > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> > *(default-install)* on project bom-test-parent: *Execution
> > default-install of goal
> > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install failed:
> > An API incompatibility was encountered while executing
> > org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install:
> > java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact
> > org.apache.maven.api.Project.getPomArtifact()'*
> >
> > [*ERROR*] *-----------------------------------------------------*
> >
> > [*ERROR*] *realm =
> > plugin>org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1*
> >
> > [*ERROR*] *strategy =
> > org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy*
> >
> > [*ERROR*] *urls[0] =
> > file:/Users/anders/.m2/repository/org/apache/maven/plugins/maven-install-plugin/4.0.0-beta-1/maven-install-plugin-4.0.0-beta-1.jar*
> >
> > [*ERROR*] *urls[1] =
> > file:/Users/anders/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar*
> >
> > [*ERROR*] *Number of foreign imports: 1*
> >
> > [*ERROR*] *import: Entry[import  from realm ClassRealm[maven.api.v4,
> > parent: null]]*
> >
> > /Anders
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Maven 4.0.0-rc-2 and m-install-p 4.0.0-beta-1

Posted by Anders Hammar <an...@hammar.net>.
It seems in fact that m-install-p 4.0.0-beta-1 is incompatible with Maven
4.0.0 RCs. Using m-install-p 4.0.0-beta-2-SNAPSHOT from master seems to
work though. m-install-p 4.0.0-beta-1 has a dependency to Maven
4.0.0-beta-2 and there have been some API changes since.

So IMHO there is currently no easy way to use Maven 4.0.0 RCs if you want
to run "mvn install" and use build/consumer poms. Or am I missing something
here?

/Anders

On Mon, Jan 20, 2025 at 8:57 PM Anders Hammar <an...@hammar.net> wrote:

> I've started to try out Maven 4 and have run into an issue with Maven
> 4.0.0-rc-2 and maven-install-plugin 4.0.0-beta-1. Are they supposed to be
> compatible or is it expected?
>
> [*ERROR*] Failed to execute goal
> org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install
> *(default-install)* on project bom-test-parent: *Execution
> default-install of goal
> org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install failed:
> An API incompatibility was encountered while executing
> org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1:install:
> java.lang.NoSuchMethodError: 'org.apache.maven.api.Artifact
> org.apache.maven.api.Project.getPomArtifact()'*
>
> [*ERROR*] *-----------------------------------------------------*
>
> [*ERROR*] *realm =
> plugin>org.apache.maven.plugins:maven-install-plugin:4.0.0-beta-1*
>
> [*ERROR*] *strategy =
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy*
>
> [*ERROR*] *urls[0] =
> file:/Users/anders/.m2/repository/org/apache/maven/plugins/maven-install-plugin/4.0.0-beta-1/maven-install-plugin-4.0.0-beta-1.jar*
>
> [*ERROR*] *urls[1] =
> file:/Users/anders/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/4.0.0-beta-1/maven-plugin-annotations-4.0.0-beta-1.jar*
>
> [*ERROR*] *Number of foreign imports: 1*
>
> [*ERROR*] *import: Entry[import  from realm ClassRealm[maven.api.v4,
> parent: null]]*
>
> /Anders
>