I've been writing integration tests for a few weeks, the data from the database was only received when I start maven in intellij and this helped me a lot because every time I stopped maven the data was cleared, but when I decided to press maven install then validate because the program had new functionalities and the database is no longer cleared. How can I set it again so that every time the database is cleared after stopping maven in intellij?
Related
I have a web project that I'm running on jboss server, but whenever I modify something and do mvn clean install and restart the server, or even just shut it down and then start it again, it seems not to see the changes and keeps loading the first version of the project. For example if I modify an html file and change the text and then run the install, then if I restart the server it doesn't load the changes.
I've checked my configurations against the correct ones I've found in some answers but they were ok. These are my server configs:
Also, I've read that starting the server in debug mode would just require a clean install of the project to republish the changes, but that doesn't work either. Are there more settings to change?
eclipse is sometimes sketchy with updating the deployed application on to your jboss.
try the following:
right clicking your application server, press clean.
then right click again and press publish.
start the server
I exported Eclipse product without generate p2 repository for windows. When I run it for the first time it was starting very slow about a minute or more.
I removed all unused dependencies.
The product includes native launcher artifacts.
I don't use any arguments when i started application.
What should I do to reduce start-up time?
I'm trying to run the JHipster application via my Eclipse Juno, using jdk 1.7.
The app seems to be loading properly (no console errors), but when i'm trying to reach the server with the client side (or via Postman, by sending a request to the REST servlets in port 8080), it's not responding.
However, when i'm running "mvn spring-boot:run" in the command shell, the server is loaded successfully and is responding to the exact same requests. Also, I managed to run the same command via eclipse with some maven configuration but it seems to be running only the target files (jars) and not the source code. I still haven't been able to run the source code of this app using eclipse in order to properly debug it.
Any suggestions?
Thanks!
So the answer is quite trivial, but since I spent several hours to reach it, it might save some time for others-
Download & install STS IDE.
Import the project as existing Maven project.
Run/Debug the project.
I tried to run it via Eclipse the whole time (wasn't familiar with STS to be honest) and this probably needs some extra configuration (another comment with explanations on eclipse configuration will be much appreciated). Once you work with STS, it's easy.
You should not need STS, just Eclipse with the J2EE stuff.
I've imported the sample jhipster in Eclipse (without STS) as a Maven project and everything was OK, after installing the maven dependencies.
To run the project, run as an application and search for the Application (com.mycompany.myapp.Application)
This app works for me: https://github.com/jhipster/jhipster-sample-app. It is stuck on Boot RC5 which probably means it's a bit old. Maybe Julien can comment on that (or update it)?
Maven is a great addition to Eclipse but why does it take almost 10x as long to debug a Mavenized web service project compared to a similar one not managed with Maven?
For example, I have two Apache CXF projects. One is a Maven project and the other is just a plain Dynamic Web project. Debugging the former via Debug As -> Maven Build using goals: clean package tomcat:run-war or even just clean tomcat:run-war takes about 160 seconds from when I initiate the debug action till when the webservice is ready for invocation. However, debugging the latter via Debug As -> Debug On Server takes only 12 seconds. This is killing any productivity I gained by managing my dependencies using Maven.
I see what Maven is doing each time, but it sure looks like some optimizations can be done to expedite the process, especially if this project has already been built before.
For someone trying, so far in vain, to sell Maven to my superiors, this is a serious impediment. Any suggestions or ideas?
TIA.
So our new webapp project is based on maven. I'm really liking the dependency management and IDE agnostic approach but I'm having problems with compilation and debugging.
Here's how I would currently get a clean copy of the project working
Check out the main project from SVN
Open the project in IDE (I've tried in eclipse 3.4 and netbeans 6.7)
The IDE will automatically open two subprojects one being the webapp, the other being a supporting utils jar.
From the command line I run mvn war:inplace on the webapp module which builds a working copy of the webapp with all dependencies in WEB-INF/lib/
This then runs fine but whenever I change a java class I have to clean and build / reload the app context.
I've googled high and low but no one seems to be complaining about this so I guess there must be something really obvious I'm missing. How is everyone else handling incremental compilation and hot deploy with maven?
To clarify all I'm looking for is the replicate the behavior I used to have before maven where I could make simple changes to java classes and they would be instantaneously compiled and hot deployed to a running webapp. I don't need anything fancy like jRebel etc I just want the new tool to give me the same functionality I enjoyed with my old tools.
If you can use mvn jetty:run it will read the classes and resources directly from the project. Using Maven2 Eclipse plugin and running the server embedded in Eclipse has auto-publishing, which gets you there in the end, although it's slower. And JRebel starting with 2.0 (as you may know) can map the Maven module directly to the deployed application, so you get instant build and redeploy. Those are the only solutions I know of.
Netbeans should support it out of the box. Though, there remains a bug related to this: http://netbeans.org/bugzilla/show_bug.cgi?id=177230
In-place deployment works for me with Netbeans 7.0.1 and Tomcat 6.0.x if I use Tomcat 7.0.x in-place deployment doesn't work. Tomcat always copies application to $CATALINA_HOME/temp :(