jgitver-maven-plugin
jgitver-maven-plugin copied to clipboard
Breaks NetBeans Tomcat web app deployment
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
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.
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