Skip to content

Commit

Permalink
Reactivate Pebble extension
Browse files Browse the repository at this point in the history
closes: #234
  • Loading branch information
erdlet committed Apr 30, 2021
1 parent a47b665 commit de9d1c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ext/pebble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<parent>
<groupId>org.eclipse.krazo.ext</groupId>
<artifactId>krazo-ext-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.1.0-SNAPSHOT</version>
</parent>
<artifactId>krazo-pebble</artifactId>
<packaging>jar</packaging>
Expand All @@ -33,7 +33,7 @@
<dependency>
<groupId>io.pebbletemplates</groupId>
<artifactId>pebble</artifactId>
<version>3.1.4</version>
<version>3.1.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2015 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019 Eclipse Krazo committers and contributors
* Copyright (c) 2018-2021 Eclipse Krazo committers and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,7 +21,7 @@
import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.extension.Extension;
import com.mitchellbosecke.pebble.extension.escaper.EscapingStrategy;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.loader.Servlet5Loader;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.krazo.engine.ViewEngineConfig;

Expand Down Expand Up @@ -118,7 +118,7 @@ public PebbleEngine pebbleEngine() {
}
});

engine.loader(new ServletLoader(servletContext));
engine.loader(new Servlet5Loader(servletContext));

return engine.build();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2014-2015 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019 Eclipse Krazo committers and contributors
* Copyright (c) 2018-2021 Eclipse Krazo committers and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@

import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.extension.escaper.EscapeFilter;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.loader.Servlet5Loader;
import org.junit.Before;
import org.junit.Test;

Expand Down Expand Up @@ -48,7 +48,7 @@ public void shouldCreateAnInstanceOfPebbleEngine() {

@Test
public void shouldUseServletContextLoader() {
assertTrue(pebbleEngineProducer.pebbleEngine().getLoader() instanceof ServletLoader);
assertTrue(pebbleEngineProducer.pebbleEngine().getLoader() instanceof Servlet5Loader);
}

@Test
Expand Down
3 changes: 1 addition & 2 deletions ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
<!-- remove until jakarta is supported by thymeleaf -->
<!-- <module>thymeleaf</module>-->
<module>velocity</module>
<!-- remove until jakarta servlet is supported by pebble -->
<!-- <module>pebble</module>-->
<module>pebble</module>
</modules>

<dependencies>
Expand Down

0 comments on commit de9d1c0

Please sign in to comment.