Eclipse works the way it works, but what you can use is
https://marketplace.eclipse.org/content/eclipse-tomcat-plugin which is
basically an update of the mighty
http://www.eclipsetotale.com/tomcatPlugin.html
I use a blank dynamic web project, with a standard plugin setup, ie default
output folder ../../WEB-INF/classes. I then fudge the WEB-INF/lib folder
by using a maven task to copy the jars from my war build process. The
devloader is good but I could not find a way to play nicely with maven.
You then use the debugging as part of the plugin.
<!-- Copy jars to /WEB-INF/lib -->
<!-- mvn -P copy-dependency-jars package -->
<profile>
<id>copy-webapp-jars</id>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<!-- Ignore Errors -->
<failOnError>false</failOnError>
</configuration>
<executions>
<!-- Stop execution here as compile is not
required -->
<execution>
<id>default-compile</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeScope>provided</excludeScope>
<excludeGroupIds>junit,org.hamcrest</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>clear-jars</id>
<!-- Make sure we build ok before deleting
old jars -->
<phase>prepare-package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target
name="deleting-jars-src/main/webapp/WEB-INF/lib">
<delete failonerror="false">
<fileset
dir="${project.basedir}/src/main/webapp/WEB-INF/lib"
includes="*.jar" />
</delete>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
On Wed, 4 Sep 2019 at 14:21, Karen Goh <[email protected]> wrote:
> Hi Expert,
>
> I am facing this problem - that Tomcat - 9.0.24 doesn't refreshes and it
> will give ma an error, even after I commented out a line. But, after
> several cleaning - using Tomcat Directory clean, right-click on the project
> in Eclipse and do a run maven force update and project built, it will still
> give me an error that point out to a commented out line.
>
> Can I know if the above indicate a corrupted Tomcat instance or what
> should I do in order not to have the above problem crop up again and again?
>
> Eclipse
> Maven Java EE, JSP, JSTL
> OS : Windows10
> Tomcat : 9.0.24
>
> Thanks & regards,
> Karen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>