You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Al Sutton <al...@alsutton.com> on 2008/01/20 11:03:22 UTC

Jar clash in the maven build

Just to make things more interesting we have entered jar hell :(.

Maven is picking up struts-annotations which has a freemarker-2.3.4 
dependency and inserting it into the classpath before the S2.1 specified 
2.3.11 dependency thus giving a compile and run classpath of;

....
 ....m2\repository\freemarker\freemarker\2.3.4\freemarker-2.3.4.jar
 ....m2\repository\org\freemarker\freemarker\2.3.11\freemarker-2.3.11.jar
...

Which of means that;

a) We can't use the latest freemarker because the struts-annotations 
dependency will always slip the 2.3.4 one in before us.
b) We have two sets of freemarker classes on the classpath


Now I can see the problem is because S-Ann is using 
<groupId>freemarker</groupId> and S2.1 is using 
<groupId>org.freemarker</groupId>, but which one is the standard we should 
be using and which should be changed?

Al.



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


Re: Jar clash in the maven build

Posted by James Mitchell <jm...@gmail.com>.
Well, that's not exactly what will happen.  Core pulls in freemarker
2.3.11, but labels annotations as optional, which means it will not
include 2.3.4 (through transitive dependence).

But regardless, you are right, they need to be the same.



On Jan 20, 2008 5:03 AM, Al Sutton <al...@alsutton.com> wrote:
> Just to make things more interesting we have entered jar hell :(.
>
> Maven is picking up struts-annotations which has a freemarker-2.3.4
> dependency and inserting it into the classpath before the S2.1 specified
> 2.3.11 dependency thus giving a compile and run classpath of;
>
> ....
>  ....m2\repository\freemarker\freemarker\2.3.4\freemarker-2.3.4.jar
>  ....m2\repository\org\freemarker\freemarker\2.3.11\freemarker-2.3.11.jar
> ...
>
> Which of means that;
>
> a) We can't use the latest freemarker because the struts-annotations
> dependency will always slip the 2.3.4 one in before us.
> b) We have two sets of freemarker classes on the classpath
>
>
> Now I can see the problem is because S-Ann is using
> <groupId>freemarker</groupId> and S2.1 is using
> <groupId>org.freemarker</groupId>, but which one is the standard we should
> be using and which should be changed?
>
> Al.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>



-- 
James Mitchell

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


Re: Jar clash in the maven build

Posted by Al Sutton <al...@alsutton.com>.
Thanks Wendy,

I've tried to raise a MEV, but when I click new all I get is the search bar. 
Does the JIRA for Maven require users to have a login :(.

----- Original Message ----- 
From: "Wendy Smoak" <ws...@gmail.com>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Sunday, January 20, 2008 4:54 PM
Subject: Re: Jar clash in the maven build


> On Jan 20, 2008 3:03 AM, Al Sutton <al...@alsutton.com> wrote:
>> Just to make things more interesting we have entered jar hell :(.
>>
>> Maven is picking up struts-annotations which has a freemarker-2.3.4
>> dependency and inserting it into the classpath before the S2.1 specified
>> 2.3.11 dependency thus giving a compile and run classpath of;
>>
>> ....
>>  ....m2\repository\freemarker\freemarker\2.3.4\freemarker-2.3.4.jar
>>  ....m2\repository\org\freemarker\freemarker\2.3.11\freemarker-2.3.11.jar
>
> As far as Maven knows, those are two completely separate things-- the
> groupId is different.
>
> You can use an exclusion to get rid of the wrong one, and/or file a
> MEV ticket to get it relocated in the central repo.
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 


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


Re: Jar clash in the maven build

Posted by Al Sutton <al...@alsutton.com>.
OK, I've registered the issues for freemarker and velocity.

The issue with the S1.2 inclusion I think is something we need greater 
discussion on because we need to decide if we're going to use 
org.apache.struts or struts for our own groupId.

----- Original Message ----- 
From: "Wendy Smoak" <ws...@gmail.com>
To: "Struts Developers List" <de...@struts.apache.org>
Sent: Sunday, January 20, 2008 4:54 PM
Subject: Re: Jar clash in the maven build


> On Jan 20, 2008 3:03 AM, Al Sutton <al...@alsutton.com> wrote:
>> Just to make things more interesting we have entered jar hell :(.
>>
>> Maven is picking up struts-annotations which has a freemarker-2.3.4
>> dependency and inserting it into the classpath before the S2.1 specified
>> 2.3.11 dependency thus giving a compile and run classpath of;
>>
>> ....
>>  ....m2\repository\freemarker\freemarker\2.3.4\freemarker-2.3.4.jar
>>  ....m2\repository\org\freemarker\freemarker\2.3.11\freemarker-2.3.11.jar
>
> As far as Maven knows, those are two completely separate things-- the
> groupId is different.
>
> You can use an exclusion to get rid of the wrong one, and/or file a
> MEV ticket to get it relocated in the central repo.
>
> -- 
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 


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


Re: Jar clash in the maven build

Posted by Wendy Smoak <ws...@gmail.com>.
On Jan 20, 2008 3:03 AM, Al Sutton <al...@alsutton.com> wrote:
> Just to make things more interesting we have entered jar hell :(.
>
> Maven is picking up struts-annotations which has a freemarker-2.3.4
> dependency and inserting it into the classpath before the S2.1 specified
> 2.3.11 dependency thus giving a compile and run classpath of;
>
> ....
>  ....m2\repository\freemarker\freemarker\2.3.4\freemarker-2.3.4.jar
>  ....m2\repository\org\freemarker\freemarker\2.3.11\freemarker-2.3.11.jar

As far as Maven knows, those are two completely separate things-- the
groupId is different.

You can use an exclusion to get rid of the wrong one, and/or file a
MEV ticket to get it relocated in the central repo.

-- 
Wendy

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