Reputation: 5241
I am starting with Apache Wicket framework. I developed SPA applications until now where I was able to watch changes in realtime. In wicket is frontend rendered on server, so can there are some way how to get live preview of my code?
I stared project from scratch from wicket page where I have only HomePage, and let's say I build and run that project with commands mvn clean package
and mvn jetty:run
Now I need change some css, f.e. background color. This css I have included by default with link in HomePage like this:
<head>
<meta charset="utf-8" />
<title>Apache Wicket Quickstart</title>
<link href='https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:regular,bold' rel='stylesheet' type='text/css' />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" title="Stylesheet" />
<link rel="stylesheet" href="./bootstrap/css/bootstrap.css" type="text/css" media="screen" title="Stylesheet" />
</head>
But I don't see that change in running code, I already have to stop server, rebuild project, a run server for every little change ... how to avoid these unnecessary steps? I am using wicket 8, thank you.
Upvotes: 1
Views: 379
Reputation: 17513
The easiest way is to use embedded Jetty. Wicket Quickstart Maven archetype provides everything pre-configured. You just have to run Start.java in your IDE and every change in HTML/CSS/JS files in the webapp/ folder will be autodetected. For the files which are in the classpath (src/main/java or src/main/resources) you will need to compile the Maven module. This happens automatically on every change in Eclipse. In IDEA you have to do it manually via Build menu -> Make module.
Upvotes: 2