Skip to content

Instantly share code, notes, and snippets.

@markswell
Last active December 14, 2023 12:14
Show Gist options
  • Save markswell/6946a2af38b1fe865d12f50027af8310 to your computer and use it in GitHub Desktop.
Save markswell/6946a2af38b1fe865d12f50027af8310 to your computer and use it in GitHub Desktop.
To integrate Intellij Idea community with wildfly server just put this file into root path of application and run with command ./intellij_wildfly_integration.sh. For debug in your Intellij Idea Community enable debug of wildfly into standalone.xml file and create a configuration of type “Remote JVM Debug” and attach in “Run/Attach to process”.
#!/bin/bash
mvn clean package -DskipTests
WILDFLY_PATH=/opt/wildfly-26.1.1.Final
$WILDFLY_PATH/bin/standalone.sh &
ARTIFACT=$(ls target/*.war | sed "s/target\///g")
$WILDFLY_PATH/bin/jboss-cli.sh -c --controller=127.0.0.1:9990 --command="undeploy $ARTIFACT"
rm $WILDFLY_PATH/standalone/deployments/$ARTIFACT*
cp target/$ARTIFACT $WILDFLY_PATH/standalone/deployments/
$WILDFLY_PATH/bin/jboss-cli.sh -c --controller=127.0.0.1:9990 --command="deploy --force $WILDFLY_PATH/standalone/deployments/$ARTIFACT"
echo "Deploy it's done: $ARTIFACT"
@kauanmocelin
Copy link

What a purpose of configure "Remote JVM Debug"? For me only “Run/Attach to process” are enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment