myapp
12.2.1
===== web.xml =====
To tell the container that this is a web app. Change ''YOUR COOL APP NAME'' yourself.
YOUR COOL APP NAME
404
/index.html
===== pom.xml =====
This file is shamelessly heavily copy from https://www.megadix.it/blog/create-react-app-servlet/. If you want to know the details, place him a visit.
This pom build the react project, and then copy the built files, the weblog.xml, and the web.xml in to the resulting war file. Of course, you need to update the info to suit your project.
If your react code is kind of broken, and cannot pass the CI testing, you can set it to false for a while for a quick dirty test.
4.0.0
YOUR_PROJECT_GROUP_ID
YOUR_ARTIFACT_ID
0.0.1-SNAPSHOT
war
YOUR_PEOJECT_NAME
YOUR_PEOJECT_DESCRIPTION
UTF-8
build
cmdctr-webapp-${project.version}
org.apache.maven.plugins
maven-war-plugin
3.3.1
${npm.output.directory}
${basedir}
weblogic.xml
WEB-INF/
${basedir}/web.xml
org.codehaus.mojo
exec-maven-plugin
3.0.0
npm install (initialize)
exec
initialize
npm
install
npm install (clean)
exec
pre-clean
npm
install
npm run build (compile)
exec
compile
npm
run
build
true
${basedir}/npm
${NPM_CONFIG_PREFIX}/cache
${project.build.directory}/npmtmp
local
true
org.codehaus.mojo
exec-maven-plugin
http://localhost:8080/${project.artifactId}
/${project.artifactId}
prod
org.codehaus.mojo
exec-maven-plugin
https://www.YOUR_DOMAIN.COM:PORT_NUMBER/YOUR_CONTEXT_ROOT
/${project.artifactId}