You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Badgerman <be...@hotmail.com> on 2008/10/29 12:56:29 UTC

Re: Freemarker (old version that struts2 uses) disappearing pages

You've probably fixed this now, but for the reference of future googlers, the
pom fix needs a slight change:

        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-core</artifactId>
            <version>2.0.11.2</version>
            <exclusions>
              <exclusion>
                <groupId>freemarker</groupId>
                <artifactId>freemarker</artifactId>
              </exclusion>
            </exclusions> 
        </dependency>
        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.11</version>
        </dependency>

And it should work. This is because the groupID for version 2.3.8 is just
'freemarker', whereas for 2.3.11 it is 'org.freemarker', so it wouldn't pick
up the exclusion for 'org.freemarker'.




Dustin S. wrote:
> 
> The Maven dependency plugin may be useful to you as well.
> http://maven.apache.org/plugins/maven-dependency-plugin/index.html ,
> specifically the dependency:tree goal.
> 
> On Fri, Apr 4, 2008 at 3:27 PM, Laurie Harper <la...@holoweb.net> wrote:
> 
>> Jonny Cavell wrote:
>>
>> > I use Maven, and if you look at struts 2.0.11.1's dependencies
>> > (
>> >
>> http://www.mvnrepository.com/artifact/org.apache.struts/struts2-core/2.0.11.1
>> > )
>> > you'll see that it's Freemarker version 2.3.8 it depends on. I can't
>> >
>>
>> 2.0.11.1 != 2.1.1 :-)
>>
>>  override this in Maven, even if I attempt to exclude it and force the
>> > latest
>> > version of Freemarker:
>> >
>> > .....
>> >                <dependency>
>> >                        <groupId>org.apache.struts</groupId>
>> >                        <artifactId>struts2-core</artifactId>
>> >                        <version>2.0.11</version>
>> >                        <exclusions>
>> >                                <exclusion>
>> >                                       
>> <groupId>org.freemarker</groupId>
>> >
>> >  <artifactId>freemarker</artifactId>
>> >                                </exclusion>
>> >                        </exclusions>
>> >                </dependency>
>> >                <dependency>
>> >                        <groupId>org.freemarker</groupId>
>> >                        <artifactId>freemarker</artifactId>
>> >                        <version>2.3.12</version>
>> >                </dependency>
>> >
>>
>> That ought to work, assuming those two stanzas are in their respective
>> correct places within the pom. Check 'mvn X' output to make sure your
>> excludes are correct with respect to the dependency graph.
>>
>>
>> L.
>>
>>
>> > Cheers
>> >
>> > Jonny
>> >
>> >
>> > Jeromy Evans - Blue Sky Minds wrote:
>> >
>> > > Jonny Cavell wrote:
>> > >
>> > > > I have a problem that seems to occur periodically.
>> > > >
>> > > > My freemarker templates, served by struts2, stop appearing - I get
>> a
>> > > > blank
>> > > > page. There are no useful messages in the logs, other than saying
>> > > > that it
>> > > > couldn't find the template (which it could find previously).
>> > > >
>> > > > First question - does anybody know what this problem might be?
>> > > >
>> > > >
>> > > >
>> > > No, other than a classpath/deployment problem.
>> > >
>> > > > I would like to upgrade to the latest version of Freemarker.
>> > > > However,
>> > > > Struts2 in its wisdom has locked me down to version 2.3.8, and this
>> > > > was
>> > > > released way back in 2006. Are there any plans to resolve this
>> > > > issue?
>> > > >
>> > > >
>> > > The 2.1.1 version of Struts uses FreeMarker 2.3.11   You may be able
>> > > to replace the 2.3.8 jar with the 2.3.11 jar without problems.
>> > >
>> > > I doubt the problem is with FreeMarker.  It's more likely to be the
>> > > FreeMarkerManager included with Struts 2 that's responsible for
>> searching
>> > > for templates in the classpath.
>> > >
>> > >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > > For additional commands, e-mail: user-help@struts.apache.org
>> > >
>> > >
>> > >
>> > >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Freemarker-%28old-version-that-struts2-uses%29-disappearing-pages-tp16467449p20225537.html
Sent from the Struts - User mailing list archive at Nabble.com.


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