You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by EJ Ciramella <ec...@casenetinc.com> on 2010/08/16 19:21:14 UTC

maven 3 and the enforcer plugin

Hello list -

I've noticed during upgrade testing that maven 3 and the enforcer plugin (1.0-beta-1) is starting to fail a jdk enforcement test.

I've set it up to accept 1.5.0_18 and beyond (nothing earlier) but now it's failing even though I'm running that exact jdk.

Any suggestions?

________________________________
CONFIDENTIALITY NOTICE: This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

RE: maven 3 and the enforcer plugin

Posted by EJ Ciramella <ec...@casenetinc.com>.
The move to use a hyphen is backward compatible thankfully :-)

-----Original Message-----
From: Jesse Farinacci [mailto:jieryn@gmail.com]
Sent: Thursday, August 19, 2010 1:50 PM
To: Maven Users List
Subject: Re: maven 3 and the enforcer plugin

Hi,

On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <ec...@casenetinc.com> wrote:
> What's really weird is with maven 2.2.1, this rule is just fine.
> I literally just setup m3 just to see what would break, this is the first thing that jumps out.
> The java version is reported like this:
>

That is weird. Perhaps you should open a JIRA with the enforcer
plugin[1]? To get past this issue for the time being, you should
create m2 vs m3 profiles with different executions of the m-enforcer-p
which use the _ vs - formats for JDK normalization.

[1] http://jira.codehaus.org/browse/MENFORCER

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

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


CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

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


Re: maven 3 and the enforcer plugin

Posted by Brian Fox <br...@infinity.nu>.
I wrote it and it's interesting to me as well. I use some core logic
in there, but off the top of my head, none of the normalization is
related to core. I'll probably dig in just out of curiosity.

On Thu, Aug 19, 2010 at 3:07 PM, EJ Ciramella <ec...@casenetinc.com> wrote:
> Gotcha - it's interesting this works (the underscore) with 2.2.1 but m3 doesn't like it (and I changed nothing in the poms).
>
> Well, it's corrected now - thanks all!
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
> Sent: Thursday, August 19, 2010 2:32 PM
> To: Maven Users List
> Subject: Re: maven 3 and the enforcer plugin
>
> No action. [1] states that:
> "Your required range should therefore use the x.y.z-b format for
> comparison."
>
> [1] http://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html
>
> /Anders
>
> On Thu, Aug 19, 2010 at 20:26, EJ Ciramella <ec...@casenetinc.com>wrote:
>
>> Ok, so now I'm confused - using a hyphen allows both 2.2.1 AND
>> 3-Something-beta-2 to work.
>>
>> So is this a bug?  I'd think it's a bug with the enforcer plugin around its
>> normalization.
>>
>> Let me know what action you guys would like me to take.
>>
>> -----Original Message-----
>> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
>> Behalf Of Anders Hammar
>> Sent: Thursday, August 19, 2010 2:24 PM
>> To: Maven Users List
>> Subject: Re: maven 3 and the enforcer plugin
>>
>> If it's th exact same version of the plugin (I believe there is only one),
>> I'd say it's a maven 3 regression and might need to be fixed there (and not
>> in the plugin).
>> Creating a ticket for both projects and linking them together would
>> probably
>> be a good idea.
>>
>> /Anders
>> On Thu, Aug 19, 2010 at 19:49, Jesse Farinacci <ji...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <eciramella@casenetinc.com
>> >
>> > wrote:
>> > > What's really weird is with maven 2.2.1, this rule is just fine.
>> > > I literally just setup m3 just to see what would break, this is the
>> first
>> > thing that jumps out.
>> > > The java version is reported like this:
>> > >
>> >
>> > That is weird. Perhaps you should open a JIRA with the enforcer
>> > plugin[1]? To get past this issue for the time being, you should
>> > create m2 vs m3 profiles with different executions of the m-enforcer-p
>> > which use the _ vs - formats for JDK normalization.
>> >
>> > [1] http://jira.codehaus.org/browse/MENFORCER
>> >
>> > -Jesse
>> >
>> > --
>> > There are 10 types of people in this world, those
>> > that can read binary and those that can not.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>>
>> CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within
>> including any attachments is only for the recipient(s) to which it is
>> intended and may contain confidential and/or privileged material. Any
>> review, retransmission, dissemination or other use of; or taking of any
>> action in reliance upon this information by persons or entities other than
>> the intended recipient is prohibited. If you received this in error, please
>> send the e-mail back by replying to the sender and permanently delete the
>> entire message and its attachments from all computers and network systems
>> involved in its receipt.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: maven 3 and the enforcer plugin

Posted by Anders Hammar <an...@hammar.net>.
As I always say: even if something works, it doesn't make it the correct
way. :-)

/Anders

On Thu, Aug 19, 2010 at 21:07, EJ Ciramella <ec...@casenetinc.com>wrote:

> Gotcha - it's interesting this works (the underscore) with 2.2.1 but m3
> doesn't like it (and I changed nothing in the poms).
>
> Well, it's corrected now - thanks all!
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Thursday, August 19, 2010 2:32 PM
> To: Maven Users List
> Subject: Re: maven 3 and the enforcer plugin
>
> No action. [1] states that:
> "Your required range should therefore use the x.y.z-b format for
> comparison."
>
> [1]
> http://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html
>
> /Anders
>
> On Thu, Aug 19, 2010 at 20:26, EJ Ciramella <eciramella@casenetinc.com
> >wrote:
>
> > Ok, so now I'm confused - using a hyphen allows both 2.2.1 AND
> > 3-Something-beta-2 to work.
> >
> > So is this a bug?  I'd think it's a bug with the enforcer plugin around
> its
> > normalization.
> >
> > Let me know what action you guys would like me to take.
> >
> > -----Original Message-----
> > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> > Behalf Of Anders Hammar
> > Sent: Thursday, August 19, 2010 2:24 PM
> > To: Maven Users List
> > Subject: Re: maven 3 and the enforcer plugin
> >
> > If it's th exact same version of the plugin (I believe there is only
> one),
> > I'd say it's a maven 3 regression and might need to be fixed there (and
> not
> > in the plugin).
> > Creating a ticket for both projects and linking them together would
> > probably
> > be a good idea.
> >
> > /Anders
> > On Thu, Aug 19, 2010 at 19:49, Jesse Farinacci <ji...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <
> eciramella@casenetinc.com
> > >
> > > wrote:
> > > > What's really weird is with maven 2.2.1, this rule is just fine.
> > > > I literally just setup m3 just to see what would break, this is the
> > first
> > > thing that jumps out.
> > > > The java version is reported like this:
> > > >
> > >
> > > That is weird. Perhaps you should open a JIRA with the enforcer
> > > plugin[1]? To get past this issue for the time being, you should
> > > create m2 vs m3 profiles with different executions of the m-enforcer-p
> > > which use the _ vs - formats for JDK normalization.
> > >
> > > [1] http://jira.codehaus.org/browse/MENFORCER
> > >
> > > -Jesse
> > >
> > > --
> > > There are 10 types of people in this world, those
> > > that can read binary and those that can not.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> > CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted
> within
> > including any attachments is only for the recipient(s) to which it is
> > intended and may contain confidential and/or privileged material. Any
> > review, retransmission, dissemination or other use of; or taking of any
> > action in reliance upon this information by persons or entities other
> than
> > the intended recipient is prohibited. If you received this in error,
> please
> > send the e-mail back by replying to the sender and permanently delete the
> > entire message and its attachments from all computers and network systems
> > involved in its receipt.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within
> including any attachments is only for the recipient(s) to which it is
> intended and may contain confidential and/or privileged material. Any
> review, retransmission, dissemination or other use of; or taking of any
> action in reliance upon this information by persons or entities other than
> the intended recipient is prohibited. If you received this in error, please
> send the e-mail back by replying to the sender and permanently delete the
> entire message and its attachments from all computers and network systems
> involved in its receipt.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: maven 3 and the enforcer plugin

Posted by EJ Ciramella <ec...@casenetinc.com>.
Gotcha - it's interesting this works (the underscore) with 2.2.1 but m3 doesn't like it (and I changed nothing in the poms).

Well, it's corrected now - thanks all!

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Thursday, August 19, 2010 2:32 PM
To: Maven Users List
Subject: Re: maven 3 and the enforcer plugin

No action. [1] states that:
"Your required range should therefore use the x.y.z-b format for
comparison."

[1] http://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html

/Anders

On Thu, Aug 19, 2010 at 20:26, EJ Ciramella <ec...@casenetinc.com>wrote:

> Ok, so now I'm confused - using a hyphen allows both 2.2.1 AND
> 3-Something-beta-2 to work.
>
> So is this a bug?  I'd think it's a bug with the enforcer plugin around its
> normalization.
>
> Let me know what action you guys would like me to take.
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Thursday, August 19, 2010 2:24 PM
> To: Maven Users List
> Subject: Re: maven 3 and the enforcer plugin
>
> If it's th exact same version of the plugin (I believe there is only one),
> I'd say it's a maven 3 regression and might need to be fixed there (and not
> in the plugin).
> Creating a ticket for both projects and linking them together would
> probably
> be a good idea.
>
> /Anders
> On Thu, Aug 19, 2010 at 19:49, Jesse Farinacci <ji...@gmail.com> wrote:
>
> > Hi,
> >
> > On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <eciramella@casenetinc.com
> >
> > wrote:
> > > What's really weird is with maven 2.2.1, this rule is just fine.
> > > I literally just setup m3 just to see what would break, this is the
> first
> > thing that jumps out.
> > > The java version is reported like this:
> > >
> >
> > That is weird. Perhaps you should open a JIRA with the enforcer
> > plugin[1]? To get past this issue for the time being, you should
> > create m2 vs m3 profiles with different executions of the m-enforcer-p
> > which use the _ vs - formats for JDK normalization.
> >
> > [1] http://jira.codehaus.org/browse/MENFORCER
> >
> > -Jesse
> >
> > --
> > There are 10 types of people in this world, those
> > that can read binary and those that can not.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within
> including any attachments is only for the recipient(s) to which it is
> intended and may contain confidential and/or privileged material. Any
> review, retransmission, dissemination or other use of; or taking of any
> action in reliance upon this information by persons or entities other than
> the intended recipient is prohibited. If you received this in error, please
> send the e-mail back by replying to the sender and permanently delete the
> entire message and its attachments from all computers and network systems
> involved in its receipt.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

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


Re: maven 3 and the enforcer plugin

Posted by Anders Hammar <an...@hammar.net>.
No action. [1] states that:
"Your required range should therefore use the x.y.z-b format for
comparison."

[1] http://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html

/Anders

On Thu, Aug 19, 2010 at 20:26, EJ Ciramella <ec...@casenetinc.com>wrote:

> Ok, so now I'm confused - using a hyphen allows both 2.2.1 AND
> 3-Something-beta-2 to work.
>
> So is this a bug?  I'd think it's a bug with the enforcer plugin around its
> normalization.
>
> Let me know what action you guys would like me to take.
>
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Thursday, August 19, 2010 2:24 PM
> To: Maven Users List
> Subject: Re: maven 3 and the enforcer plugin
>
> If it's th exact same version of the plugin (I believe there is only one),
> I'd say it's a maven 3 regression and might need to be fixed there (and not
> in the plugin).
> Creating a ticket for both projects and linking them together would
> probably
> be a good idea.
>
> /Anders
> On Thu, Aug 19, 2010 at 19:49, Jesse Farinacci <ji...@gmail.com> wrote:
>
> > Hi,
> >
> > On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <eciramella@casenetinc.com
> >
> > wrote:
> > > What's really weird is with maven 2.2.1, this rule is just fine.
> > > I literally just setup m3 just to see what would break, this is the
> first
> > thing that jumps out.
> > > The java version is reported like this:
> > >
> >
> > That is weird. Perhaps you should open a JIRA with the enforcer
> > plugin[1]? To get past this issue for the time being, you should
> > create m2 vs m3 profiles with different executions of the m-enforcer-p
> > which use the _ vs - formats for JDK normalization.
> >
> > [1] http://jira.codehaus.org/browse/MENFORCER
> >
> > -Jesse
> >
> > --
> > There are 10 types of people in this world, those
> > that can read binary and those that can not.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
> CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within
> including any attachments is only for the recipient(s) to which it is
> intended and may contain confidential and/or privileged material. Any
> review, retransmission, dissemination or other use of; or taking of any
> action in reliance upon this information by persons or entities other than
> the intended recipient is prohibited. If you received this in error, please
> send the e-mail back by replying to the sender and permanently delete the
> entire message and its attachments from all computers and network systems
> involved in its receipt.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: maven 3 and the enforcer plugin

Posted by EJ Ciramella <ec...@casenetinc.com>.
Ok, so now I'm confused - using a hyphen allows both 2.2.1 AND 3-Something-beta-2 to work.

So is this a bug?  I'd think it's a bug with the enforcer plugin around its normalization.

Let me know what action you guys would like me to take.

-----Original Message-----
From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On Behalf Of Anders Hammar
Sent: Thursday, August 19, 2010 2:24 PM
To: Maven Users List
Subject: Re: maven 3 and the enforcer plugin

If it's th exact same version of the plugin (I believe there is only one),
I'd say it's a maven 3 regression and might need to be fixed there (and not
in the plugin).
Creating a ticket for both projects and linking them together would probably
be a good idea.

/Anders
On Thu, Aug 19, 2010 at 19:49, Jesse Farinacci <ji...@gmail.com> wrote:

> Hi,
>
> On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <ec...@casenetinc.com>
> wrote:
> > What's really weird is with maven 2.2.1, this rule is just fine.
> > I literally just setup m3 just to see what would break, this is the first
> thing that jumps out.
> > The java version is reported like this:
> >
>
> That is weird. Perhaps you should open a JIRA with the enforcer
> plugin[1]? To get past this issue for the time being, you should
> create m2 vs m3 profiles with different executions of the m-enforcer-p
> which use the _ vs - formats for JDK normalization.
>
> [1] http://jira.codehaus.org/browse/MENFORCER
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

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


Re: maven 3 and the enforcer plugin

Posted by Anders Hammar <an...@hammar.net>.
If it's th exact same version of the plugin (I believe there is only one),
I'd say it's a maven 3 regression and might need to be fixed there (and not
in the plugin).
Creating a ticket for both projects and linking them together would probably
be a good idea.

/Anders
On Thu, Aug 19, 2010 at 19:49, Jesse Farinacci <ji...@gmail.com> wrote:

> Hi,
>
> On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <ec...@casenetinc.com>
> wrote:
> > What's really weird is with maven 2.2.1, this rule is just fine.
> > I literally just setup m3 just to see what would break, this is the first
> thing that jumps out.
> > The java version is reported like this:
> >
>
> That is weird. Perhaps you should open a JIRA with the enforcer
> plugin[1]? To get past this issue for the time being, you should
> create m2 vs m3 profiles with different executions of the m-enforcer-p
> which use the _ vs - formats for JDK normalization.
>
> [1] http://jira.codehaus.org/browse/MENFORCER
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: maven 3 and the enforcer plugin

Posted by Jesse Farinacci <ji...@gmail.com>.
Hi,

On Thu, Aug 19, 2010 at 1:41 PM, EJ Ciramella <ec...@casenetinc.com> wrote:
> What's really weird is with maven 2.2.1, this rule is just fine.
> I literally just setup m3 just to see what would break, this is the first thing that jumps out.
> The java version is reported like this:
>

That is weird. Perhaps you should open a JIRA with the enforcer
plugin[1]? To get past this issue for the time being, you should
create m2 vs m3 profiles with different executions of the m-enforcer-p
which use the _ vs - formats for JDK normalization.

[1] http://jira.codehaus.org/browse/MENFORCER

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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


RE: maven 3 and the enforcer plugin

Posted by EJ Ciramella <ec...@casenetinc.com>.
What's really weird is with maven 2.2.1, this rule is just fine.

I literally just setup m3 just to see what would break, this is the first thing that jumps out.

The java version is reported like this:

Java -version
java version "1.5.0_18"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02)
Java HotSpot(TM) Client VM (build 1.5.0_18-b02, mixed mode, sharing)

Maven version is like this:

mvn -version
Apache Maven 3.0-beta-2 (r983206; 2010-08-07 07:00:51-0400)
Java version: 1.5.0_18
Java home: C:\Program Files (x86)\Java\jdk1.5.0_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.2" arch: "x86" Family: "windows"

But, when I switch from "_" to "-", m3 passes.

Weird....

-----Original Message-----
From: Jesse Farinacci [mailto:jieryn@gmail.com]
Sent: Thursday, August 19, 2010 12:13 PM
To: Maven Users List
Subject: Re: maven 3 and the enforcer plugin

Thanks EJ,

On Thu, Aug 19, 2010 at 10:04 AM, EJ Ciramella
<ec...@casenetinc.com> wrote:
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (default-cli) @ <foo> ---
> [INFO] Maven Version: 3.0-beta-2
> [INFO] JDK Version: 1.5.0_18 normalized as: 1.5.0-18
> [INFO] OS Info: Arch: x86 Family: windows Name: windows xp Version: 5.2
> [INFO] ------------------------------------------------------------------------

So, as you should be able to deduce by now, and also given Brett's
hypothesis earlier, it seems that you should be using -18 instead of
_18.

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

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


CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

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


Re: maven 3 and the enforcer plugin

Posted by Jesse Farinacci <ji...@gmail.com>.
Thanks EJ,

On Thu, Aug 19, 2010 at 10:04 AM, EJ Ciramella
<ec...@casenetinc.com> wrote:
> [INFO] ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (default-cli) @ <foo> ---
> [INFO] Maven Version: 3.0-beta-2
> [INFO] JDK Version: 1.5.0_18 normalized as: 1.5.0-18
> [INFO] OS Info: Arch: x86 Family: windows Name: windows xp Version: 5.2
> [INFO] ------------------------------------------------------------------------

So, as you should be able to deduce by now, and also given Brett's
hypothesis earlier, it seems that you should be using -18 instead of
_18.

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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


RE: maven 3 and the enforcer plugin

Posted by EJ Ciramella <ec...@casenetinc.com>.
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info (default-cli) @ <foo> ---
[INFO] Maven Version: 3.0-beta-2
[INFO] JDK Version: 1.5.0_18 normalized as: 1.5.0-18
[INFO] OS Info: Arch: x86 Family: windows Name: windows xp Version: 5.2
[INFO] ------------------------------------------------------------------------

-----Original Message-----
From: Jesse Farinacci [mailto:jieryn@gmail.com]
Sent: Wednesday, August 18, 2010 8:00 PM
To: Maven Users List
Subject: Re: maven 3 and the enforcer plugin

Greetings,

On Wed, Aug 18, 2010 at 7:46 PM, Brett Randall <ja...@gmail.com> wrote:
> I don't know this plugin/rule well, but looking at your output, could
> it relate to the underscore versus hyphen in the detected versus
> normalized JDK version string?  Maybe try a hyphen in your version
> rule.
>

Try adding an execution of enforcer:display-info to see the normalized
version of the JDK which you should feed to the enforcement rule.
Here's an example from my system:

[INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info
(display-info) @ isvt ---
[INFO] Maven Version: 3.0-beta-2
[INFO] JDK Version: 1.6.0_21 normalized as: 1.6.0-21
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 2.6.32.18

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

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


CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

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


Re: maven 3 and the enforcer plugin

Posted by Jesse Farinacci <ji...@gmail.com>.
Greetings,

On Wed, Aug 18, 2010 at 7:46 PM, Brett Randall <ja...@gmail.com> wrote:
> I don't know this plugin/rule well, but looking at your output, could
> it relate to the underscore versus hyphen in the detected versus
> normalized JDK version string?  Maybe try a hyphen in your version
> rule.
>

Try adding an execution of enforcer:display-info to see the normalized
version of the JDK which you should feed to the enforcement rule.
Here's an example from my system:

[INFO] --- maven-enforcer-plugin:1.0-beta-1:display-info
(display-info) @ isvt ---
[INFO] Maven Version: 3.0-beta-2
[INFO] JDK Version: 1.6.0_21 normalized as: 1.6.0-21
[INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 2.6.32.18

-Jesse

-- 
There are 10 types of people in this world, those
that can read binary and those that can not.

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


Re: maven 3 and the enforcer plugin

Posted by Brett Randall <ja...@gmail.com>.
I don't know this plugin/rule well, but looking at your output, could
it relate to the underscore versus hyphen in the detected versus
normalized JDK version string?  Maybe try a hyphen in your version
rule.

Brett


On 8/19/10, EJ Ciramella <ec...@casenetinc.com> wrote:
> Mvn version output:
>
> Apache Maven 3.0-beta-2 (r983206; 2010-08-07 07:00:51-0400)
> Java version: 1.5.0_18
> Java home: C:\Program Files (x86)\Java\jdk1.5.0_18\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows xp" version: "5.2" arch: "x86" Family: "windows"
> 'cmd' is not recognized as an internal or external command,
> operable program or batch file.
>
> Plugin Config:
>
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-enforcer-plugin</artifactId>
>     <version>1.0-beta-1</version>
>     <executions>
>       <execution>
>         <id>enforce-versions</id>
>         <goals>
>           <goal>enforce</goal>
>         </goals>
>         <configuration>
>           <rules>
>             <requireJavaVersion>
>               <version>[1.5.0_18,)</version>
>               <message>[ERROR] The currently supported version of java is
> 1.5.0_18 or higher</message>
>             </requireJavaVersion>
>           </rules>
>         </configuration>
>       </execution>
>     </executions>
>   </plugin>
>
> Stacktraces:
>
> [DEBUG]
> =======================================================================
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @
> <foo> ---
> [DEBUG] Created new class realm
> plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1
> [DEBUG] Created new class realm maven.api
> [DEBUG] Populating class realm
> plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1
> [DEBUG]   Included:
> org.apache.maven.plugins:maven-enforcer-plugin:maven-plugin:1.0-beta-1
> [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.5.8
> [DEBUG]   Included:
> org.apache.maven.reporting:maven-reporting-api:jar:2.0.9
> [DEBUG]   Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-10
> [DEBUG]   Included: commons-cli:commons-cli:jar:1.0
> [DEBUG]   Included:
> org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
> [DEBUG]   Included: commons-lang:commons-lang:jar:2.3
> [DEBUG]   Included: org.apache.maven.enforcer:enforcer-api:jar:1.0-beta-1
> [DEBUG]   Included: org.apache.maven.enforcer:enforcer-rules:jar:1.0-beta-1
> [DEBUG]   Included: org.beanshell:bsh:jar:2.0b4
> [DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.9
> [DEBUG]   Excluded:
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
> [DEBUG]   Excluded: classworlds:classworlds:jar:1.1
> [DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-core:jar:2.0.9
> [DEBUG]   Excluded:
> org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9
> [DEBUG]   Excluded: org.apache.maven:maven-monitor:jar:2.0.9
> [DEBUG] Configuring mojo
> org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce from
> plugin realm ClassRealm[plugin>org
> .apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1, parent:
> ClassRealm[maven.api, parent: null]]
> [DEBUG] Configuring mojo
> 'org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce' with
> basic configurator -->
> [DEBUG]   (s) fail = true
> [DEBUG]   (s) failFast = false
> [DEBUG]   (f) ignoreCache = false
> [DEBUG]   (s) project = MavenProject: <foo> @ <foo>
> [DEBUG]   (s) version = [1.5.0_18,)
> [DEBUG]   (f) message = [ERROR] The currently supported version of java is
> 1.5.0_18 or higher
> [DEBUG]   (s) rules =
> [org.apache.maven.plugins.enforcer.RequireJavaVersion@d72200]
> [DEBUG]   (s) session = org.apache.maven.execution.MavenSession@1a80aea
> [DEBUG]   (s) skip = false
> [DEBUG] -- end configuration --
> [DEBUG] Executing rule:
> org.apache.maven.plugins.enforcer.RequireJavaVersion
> [DEBUG] Rule org.apache.maven.plugins.enforcer.RequireJavaVersion is
> cacheable.
> [DEBUG] Detected Java String: 1.5.0_18
> [DEBUG] Normalized Java String: 1.5.0-18
> [DEBUG] Parsed Version: Major: 1 Minor: 5 Incremental: 0 Build: 18
> Qualifier: null
> [DEBUG] Adding failure due to exception
> org.apache.maven.enforcer.rule.api.EnforcerRuleException: [ERROR] The
> currently supported version of java is 1.5.0_18 or higher
>         at
> org.apache.maven.plugins.enforcer.AbstractVersionEnforcer.enforceVersion(AbstractVersionEnforcer.java:101)
>         at
> org.apache.maven.plugins.enforcer.RequireJavaVersion.execute(RequireJavaVersion.java:65)
>         at
> org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:185)
>         at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79)
>         at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86)
>         at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
>         at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>         at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> [WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion
> failed with message:
> [ERROR] The currently supported version of java is 1.5.0_18 or higher
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 0.953s
> [INFO] Finished at: Wed Aug 18 10:05:56 EDT 2010
> [INFO] Final Memory: 3M/508M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce
> (enforce-versions) on project <foo>: Some Enforcer rules have failed. Look
> above for specific messages explaining why the rule failed. -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-
> beta-1:enforce (enforce-versions) on project <foo>: Some Enforcer rules have
> failed. Look above for specific messages exp
> laining why the rule failed.
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:152)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79)
>         at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86)
>         at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
>         at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>         at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
>         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
>         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>         at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer
> rules have failed. Look above for specific messages expla
> ining why the rule failed.
>         at
> org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:218)
>         at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
>         at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144)
>         ... 19 more
> [ERROR]
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please
> read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> 'cmd' is not recognized as an internal or external command,
>
> -----Original Message-----
> From: bmathus@gmail.com [mailto:bmathus@gmail.com] On Behalf Of Baptiste
> MATHUS
> Sent: Wednesday, August 18, 2010 8:56 AM
> To: Maven Users List
> Subject: Re: maven 3 and the enforcer plugin
>
> Le 16 août 2010 19:21:14 UTC+2, EJ Ciramella <ec...@casenetinc.com> a
> écrit :
>
>> Hello list -
>>
>> I've noticed during upgrade testing that maven 3 and the enforcer plugin
>> (1.0-beta-1) is starting to fail a jdk enforcement test.
>>
>> I've set it up to accept 1.5.0_18 and beyond (nothing earlier) but now
>> it's
>> failing even though I'm running that exact jdk.
>>
>
> Did you try running mvn -X or -e ? This will print stack trace and provide
> you with more informations. Please post this output here.
>
> Cheers
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor !
>
> CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within
> including any attachments is only for the recipient(s) to which it is
> intended and may contain confidential and/or privileged material. Any
> review, retransmission, dissemination or other use of; or taking of any
> action in reliance upon this information by persons or entities other than
> the intended recipient is prohibited. If you received this in error, please
> send the e-mail back by replying to the sender and permanently delete the
> entire message and its attachments from all computers and network systems
> involved in its receipt.
>

-- 
Sent from my mobile device

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


RE: maven 3 and the enforcer plugin

Posted by EJ Ciramella <ec...@casenetinc.com>.
Mvn version output:

Apache Maven 3.0-beta-2 (r983206; 2010-08-07 07:00:51-0400)
Java version: 1.5.0_18
Java home: C:\Program Files (x86)\Java\jdk1.5.0_18\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.2" arch: "x86" Family: "windows"
'cmd' is not recognized as an internal or external command,
operable program or batch file.

Plugin Config:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <version>1.0-beta-1</version>
    <executions>
      <execution>
        <id>enforce-versions</id>
        <goals>
          <goal>enforce</goal>
        </goals>
        <configuration>
          <rules>
            <requireJavaVersion>
              <version>[1.5.0_18,)</version>
              <message>[ERROR] The currently supported version of java is 1.5.0_18 or higher</message>
            </requireJavaVersion>
          </rules>
        </configuration>
      </execution>
    </executions>
  </plugin>

Stacktraces:

[DEBUG] =======================================================================
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) @ <foo> ---
[DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1
[DEBUG] Created new class realm maven.api
[DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1
[DEBUG]   Included: org.apache.maven.plugins:maven-enforcer-plugin:maven-plugin:1.0-beta-1
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.5.8
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-api:jar:2.0.9
[DEBUG]   Included: org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-10
[DEBUG]   Included: commons-cli:commons-cli:jar:1.0
[DEBUG]   Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG]   Included: commons-lang:commons-lang:jar:2.3
[DEBUG]   Included: org.apache.maven.enforcer:enforcer-api:jar:1.0-beta-1
[DEBUG]   Included: org.apache.maven.enforcer:enforcer-rules:jar:1.0-beta-1
[DEBUG]   Included: org.beanshell:bsh:jar:2.0b4
[DEBUG]   Excluded: org.apache.maven:maven-artifact:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-plugin-api:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-project:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-settings:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-model:jar:2.0.9
[DEBUG]   Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1
[DEBUG]   Excluded: classworlds:classworlds:jar:1.1
[DEBUG]   Excluded: org.apache.maven:maven-profile:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-artifact-manager:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-repository-metadata:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-plugin-registry:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-core:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-error-diagnostics:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-plugin-descriptor:jar:2.0.9
[DEBUG]   Excluded: org.apache.maven:maven-monitor:jar:2.0.9
[DEBUG] Configuring mojo org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce from plugin realm ClassRealm[plugin>org
.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce' with basic configurator -->
[DEBUG]   (s) fail = true
[DEBUG]   (s) failFast = false
[DEBUG]   (f) ignoreCache = false
[DEBUG]   (s) project = MavenProject: <foo> @ <foo>
[DEBUG]   (s) version = [1.5.0_18,)
[DEBUG]   (f) message = [ERROR] The currently supported version of java is 1.5.0_18 or higher
[DEBUG]   (s) rules = [org.apache.maven.plugins.enforcer.RequireJavaVersion@d72200]
[DEBUG]   (s) session = org.apache.maven.execution.MavenSession@1a80aea
[DEBUG]   (s) skip = false
[DEBUG] -- end configuration --
[DEBUG] Executing rule: org.apache.maven.plugins.enforcer.RequireJavaVersion
[DEBUG] Rule org.apache.maven.plugins.enforcer.RequireJavaVersion is cacheable.
[DEBUG] Detected Java String: 1.5.0_18
[DEBUG] Normalized Java String: 1.5.0-18
[DEBUG] Parsed Version: Major: 1 Minor: 5 Incremental: 0 Build: 18 Qualifier: null
[DEBUG] Adding failure due to exception
org.apache.maven.enforcer.rule.api.EnforcerRuleException: [ERROR] The currently supported version of java is 1.5.0_18 or higher
        at org.apache.maven.plugins.enforcer.AbstractVersionEnforcer.enforceVersion(AbstractVersionEnforcer.java:101)
        at org.apache.maven.plugins.enforcer.RequireJavaVersion.execute(RequireJavaVersion.java:65)
        at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:185)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
[ERROR] The currently supported version of java is 1.5.0_18 or higher
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.953s
[INFO] Finished at: Wed Aug 18 10:05:56 EDT 2010
[INFO] Final Memory: 3M/508M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions) on project <foo>: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.0-
beta-1:enforce (enforce-versions) on project <foo>: Some Enforcer rules have failed. Look above for specific messages exp
laining why the rule failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:152)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:87)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:79)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:86)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:58)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:252)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:100)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:443)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:166)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:130)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Some Enforcer rules have failed. Look above for specific messages expla
ining why the rule failed.
        at org.apache.maven.plugins.enforcer.EnforceMojo.execute(EnforceMojo.java:218)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:144)
        ... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
'cmd' is not recognized as an internal or external command,

-----Original Message-----
From: bmathus@gmail.com [mailto:bmathus@gmail.com] On Behalf Of Baptiste MATHUS
Sent: Wednesday, August 18, 2010 8:56 AM
To: Maven Users List
Subject: Re: maven 3 and the enforcer plugin

Le 16 août 2010 19:21:14 UTC+2, EJ Ciramella <ec...@casenetinc.com> a
écrit :

> Hello list -
>
> I've noticed during upgrade testing that maven 3 and the enforcer plugin
> (1.0-beta-1) is starting to fail a jdk enforcement test.
>
> I've set it up to accept 1.5.0_18 and beyond (nothing earlier) but now it's
> failing even though I'm running that exact jdk.
>

Did you try running mvn -X or -e ? This will print stack trace and provide
you with more informations. Please post this output here.

Cheers
--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

CONFIDENTIALITY NOTICE:  This e-mail and the information transmitted within including any attachments is only for the recipient(s) to which it is intended and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of; or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please send the e-mail back by replying to the sender and permanently delete the entire message and its attachments from all computers and network systems involved in its receipt.

Re: maven 3 and the enforcer plugin

Posted by Baptiste MATHUS <ml...@batmat.net>.
Le 16 août 2010 19:21:14 UTC+2, EJ Ciramella <ec...@casenetinc.com> a
écrit :

> Hello list -
>
> I've noticed during upgrade testing that maven 3 and the enforcer plugin
> (1.0-beta-1) is starting to fail a jdk enforcement test.
>
> I've set it up to accept 1.5.0_18 and beyond (nothing earlier) but now it's
> failing even though I'm running that exact jdk.
>

Did you try running mvn -X or -e ? This will print stack trace and provide
you with more informations. Please post this output here.

Cheers
-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !