Comments (4)
Hi, can you share a sample project, that demonstrates the problem?
from jte.
Maybe this is the same problem as #280?
from jte.
Hi,
following the thread on GitHub, I was conducting tests, changing the JTE version to the latest one and switching from hot reloading to precompile from VSCode templateEngine. It works for both cases. The error appears when I perform the build in Maven, and the error message is still the same: java.lang.NoClassDefFoundError: gg/jte/CodeResolver.
private static Boolean isDevMode = false;
public static void main(String[] args) throws IOException {
Injector injector = Guice.createInjector(new CDI());
JavalinJte.init(templateEngine());
//csr
/*
Javalin restApi = Javalin.create().start(8080);
new ClienteController(restApi,injector);
new LoginController(restApi,injector);
new EmpleadoController(restApi,injector);
*/
//ssr cliente
Javalin ssr = Javalin.create().start(8080);
new CookieController(ssr,injector);
new SsrClienteController(ssr,injector);
//ssr empleado
Javalin ssrEmpleados = Javalin.create().start(8083);
new CoockieControllerEmpleado(ssrEmpleados,injector);
new SSrEmpleadoController(ssrEmpleados,injector);
}
private static TemplateEngine templateEngine()
{
if(isDevMode)
{
DirectoryCodeResolver resolver = new DirectoryCodeResolver(Paths.get("src/main/jte"));
return TemplateEngine.create(resolver,ContentType.Html);
}
return TemplateEngine.createPrecompiled(ContentType.Html);
}
pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<groupId>gg.jte</groupId>
<artifactId>jte-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<sourceDirectory>${basedir}/src/main/jte</sourceDirectory>
<contentType>Html</contentType>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<configuration>
<archive>
<manifest>
<mainClass>com.alura.hotelalura.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
from jte.
Where do you get the error message, when the maven build is running, or when you start the application that was built via maven? Can you please post the stack trace you get?
from jte.
Related Issues (20)
- For Loops won't compile for Kotlin HOT 2
- internationalization with MessageFormat HOT 6
- HTML Comments Inside Content Blocks Cause Compilation Failure in gg.jte.gradle v3.1.7+ HOT 2
- Allow expressions in HTML attribute names for certain types HOT 9
- Spring Boot integration and binary rendering HOT 6
- ${"\\"} Causes "Unexpected end of template expression" HOT 1
- Pass dynamic HTML Content to template HOT 2
- Support JTE project HOT 2
- Failed to compile with module-info.java HOT 2
- Support for read-only filesystem HOT 1
- template define with generic type HOT 1
- Generic template HOT 3
- Html Template Output HOT 2
- Add kotlin and kte documentation HOT 1
- String input instead of file input HOT 6
- Provide jte-jsp-converter for Jakarta HOT 1
- Comments break JTE HOT 5
- intellij "Cannot resolve MVC view" HOT 4
- Unable to handle model properties that contain dots (`.`) HOT 3
- KTE runtime dependencies HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jte.