In Intellij, why should I clean and build a war to see the changes when I launch the Google App Engine locally?

I use the Google mechanism to create war, and I noticed that whenever I make local changes, they never apply when I run locally. I realized that the only way to see the changes I made was to run mvn clean , then make and then build the artifact, and then deploy. Here is a screenshot showing my configuration:

configuration

If I miss any of these steps, restarting the server does not display any changes I made. I have done many non-google app engine webapps with intellij before, and I usually shouldn't do this. How can I avoid all these steps? They significantly increase the time required to reboot my server.

In case this helps, here is my pom.xml file:

 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <groupId>com.myapp</groupId> <artifactId>myapp</artifactId> <properties> <appengine.app.version>1</appengine.app.version> <appengine.target.version>1.8.6</appengine.target.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!-- Compile/runtime dependencies --> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-1.0-sdk</artifactId> <version>${appengine.target.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>net.sourceforge.stripes</groupId> <artifactId>stripes</artifactId> <version>1.5.7</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.5</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-jdk14</artifactId> <version>1.7.5</version> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-testing</artifactId> <version>${appengine.target.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-stubs</artifactId> <version>${appengine.target.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <version>2.5.1</version> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <archiveClasses>true</archiveClasses> <webResources> <!-- in order to interpolate version from pom into appengine-web.xml --> <resource> <directory>${basedir}/src/main/webapp/WEB-INF</directory> <filtering>true</filtering> <targetPath>WEB-INF</targetPath> </resource> <resource> <directory>${basedir}/src/main/generated</directory> <targetPath>src/main/generated</targetPath> </resource> <resource> <directory>${basedir}/src/main/scripts/img</directory> <targetPath>src/main/scripts/img</targetPath> </resource> </webResources> </configuration> </plugin> <plugin> <groupId>com.google.appengine</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>${appengine.target.version}</version> </plugin> </plugins> </build> </project> 
+7
java google-app-engine intellij-idea maven
source share
2 answers

If you use the .war artifact, yes, you need to clean and do it because it literally creates a war file, and then deploy and to update the code in the war file IntelliJ should recreate the whole war file that runs clean (delete) and make it again .

You should consider using .war exploded artefact so that IntelliJ can update the / jar class files needed without having to recreate the entire war file. However, in the screenshot, I see that you are already using an artifact with an exploded army, perhaps the problem is that you are trying to update the jar file used.

+4
source share

You can use a combination of buttons for partial hot deployment try CTRL + SHIFT + F9.

0
source share

All Articles