Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1321

IntelliJ debugging with the maven wildfly-swarm-plugin not working

    Details

    • Type: Documentation
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Explained
    • Affects Version/s: 2017.5.0
    • Fix Version/s: None
    • Component/s: documentation, plugins
    • Labels:
      None
    • Story Points:
      5

      Description

      Hey folks,

      i am using the IntelliJ IDE with the maven wildfly-swarm-plugin. Trying to enable debugging when executing the wildfly-swarm:run goal.

      The plugin is configured with debugPort = 5005 as followed:

      build>
          <finalName>demo</finalName>
          <plugins>
            <plugin>
              <groupId>org.wildfly.swarm</groupId>
              <artifactId>wildfly-swarm-plugin</artifactId>
              <version>${version.wildfly.swarm}</version>
              
              <executions>
                <execution>
                  <goals>
                    <goal>package</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <debugPort>5005</debugPort>
              </configuration>
            </plugin>
          </plugins>
        </build>
      

      The execution seems to stuck, if a debugPort is set:

      /home/christian/.sdkman/candidates/java/current/bin/java -Dmaven.multiModuleProjectDirectory=/home/christian/workspace/onkelpixel/wildfly-swarm -Dmaven.home=/home/christian/.sdkman/candidates/maven/3.5.0 -Dclassworlds.conf=/home/christian/.sdkman/candidates/maven/3.5.0/bin/m2.conf -javaagent:/opt/intellij/idea-IU-171.3780.107/lib/idea_rt.jar=38733:/opt/intellij/idea-IU-171.3780.107/bin -Dfile.encoding=UTF-8 -classpath /home/christian/.sdkman/candidates/maven/3.5.0/boot/plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.1.2 wildfly-swarm:run
      [INFO] Scanning for projects...
      [INFO] 
      [INFO] ------------------------------------------------------------------------
      [INFO] Building WildFly Swarm Example 1.0.0-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO] 
      [INFO] >>> wildfly-swarm-plugin:2017.5.0:run (default-cli) > package @ wildfly-swarm >>>
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wildfly-swarm ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /home/christian/workspace/onkelpixel/wildfly-swarm/src/main/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wildfly-swarm ---
      [INFO] Nothing to compile - all classes are up to date
      [INFO] 
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ wildfly-swarm ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /home/christian/workspace/onkelpixel/wildfly-swarm/src/test/resources
      [INFO] 
      [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ wildfly-swarm ---
      [INFO] No sources to compile
      [INFO] 
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ wildfly-swarm ---
      [INFO] No tests to run.
      [INFO] 
      [INFO] --- maven-war-plugin:2.2:war (default-war) @ wildfly-swarm ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [wildfly-swarm] in [/home/christian/workspace/onkelpixel/wildfly-swarm/target/demo]
      [INFO] Processing war project
      [INFO] Webapp assembled in [97 msecs]
      [INFO] Building war: /home/christian/workspace/onkelpixel/wildfly-swarm/target/demo.war
      [INFO] 
      [INFO] --- wildfly-swarm-plugin:2017.5.0:package (default) @ wildfly-swarm ---
      Resolving 47 out of 207 artifacts
      [INFO] Repackaging .war: /home/christian/workspace/onkelpixel/wildfly-swarm/target/demo.war
      [INFO] Repackaged .war: /home/christian/workspace/onkelpixel/wildfly-swarm/target/demo.war
      [INFO] 
      [INFO] <<< wildfly-swarm-plugin:2017.5.0:run (default-cli) < package @ wildfly-swarm <<<
      [INFO] 
      [INFO] 
      [INFO] --- wildfly-swarm-plugin:2017.5.0:run (default-cli) @ wildfly-swarm ---
      [INFO] Starting .war
      Listening for transport dt_socket at address: 5005
      

      In IntelliJ i configured a "run-configuration" for the wildfly-swarm:run goal and started it in non-debugging mode. My expectation was, that the maven goal will only listen on the debug port, if i start the run-configuration in debug-mode.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cremich Christian Bonzelet
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: