jgitver-maven-plugin icon indicating copy to clipboard operation
jgitver-maven-plugin copied to clipboard

Breaks NetBeans Tomcat web app deployment

Open jlanawalt opened this issue 3 years ago • 1 comments

Issue

version:1.7.1

usage context: Attempting to run or debug a Maven based web application.

  • [ ] maven command line: Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
  • [ ] netbeans: 8.2 & 12

Problem description:

After adding the jgitver-maven-plugin using the CONFIGURABLE strategy, policy:MAX, autoIncrementPatch:true, useCommitDistance:true, useDirty:true, useSnapshot:false, useGitCommitTimestamp:false, useGitCommitId:true, gitCommitIdLength:8, nonQualifierBranches:master,develop, regexVersionTag:v?([0-9]+(?:.[0-9]+){0,2}(?:-[a-zA-Z0-9-_]+)?)

Before adding the configuration for the plugin the Run tab would finish with something like this:

Deploying on Apache Tomcat 8.5.53.0 profile mode: false debug mode: false force redeploy: true Checking data source definitions for missing JDBC drivers... Starting Tomcat process... Waiting for Tomcat... Tomcat server started. In-place deployment at -1.20-SNAPSHOT deploy?config=file%3A%2FC%3A%2FUsers%2F%2Fcontext9000774174008928411.xml&path=/AppName OK - Deployed application at context path [/AppName] Start is in progress... start?path=/AppName OK - Started application at context path [/AppName]

After switching to jgitver it has ended with one of these two outputs:

Deploying on Apache Tomcat 8.5.53.0 profile mode: false debug mode: false force redeploy: true Checking data source definitions for missing JDBC drivers... Starting Tomcat process... Waiting for Tomcat... Tomcat server started.

OR

Deploying on Apache Tomcat 8.5.53.0 profile mode: false debug mode: false force redeploy: true Checking data source definitions for missing JDBC drivers... Starting Tomcat process... Waiting for Tomcat... Tomcat server started. Undeploying ... undeploy?path=/AppName OK - Undeployed application at context path [/AppName]

I believe the issue is based on some assumption of the version being in pom.xml. I currently have the version element value at 1.20-jgitver to remind myself of the switch. When I put the current calculated version, 1.20.1-3-0ff7fcdf-dirty, into the source pom.xml then the In-place deployment works.

jlanawalt avatar Mar 09 '21 19:03 jlanawalt

As the IDEs are not very friendly with jgitver, and in your case we are also talking about the tomcat integration, I would recommend to deactivate jgitver inside the IDE : -Djgitver.skip=true

McFoggy avatar Mar 10 '21 08:03 McFoggy