Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20947

Enable Jolokia in camel.debug profile of generated Quarkus project with Camel JBang

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 4.8.0
    • camel-jbang
    • None
    • Unknown

    Description

      What do you think about enabling Jolokia in the camel.debug profile of the generated project with Camel JBang?

      it will allow to do remote Camel debugging, so for instance with project deployed on Kubernetes or OpenShift

      For Quarkus project, this could be done with:

              <profile>
                  <id>camel.debug</id>
                  <activation>
                      <property>
                          <name>camel.debug</name>
                          <value>true</value>
                      </property>
                  </activation>
                  <dependencies>
                      <dependency>
                          <groupId>org.apache.camel.quarkus</groupId>
                          <artifactId>camel-quarkus-debug</artifactId>
                      </dependency>
                  </dependencies>
                  <build>
                      <plugins>
                          <plugin>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-dependency-plugin</artifactId>
                              <version>3.7.1</version>
                              <executions>
                                  <execution>
                                      <id>copy</id>
                                      <phase>generate-sources</phase>
                                      <goals>
                                          <goal>copy</goal>
                                      </goals>
                                      <configuration>
                                          <artifactItems>
                                            <artifactItem>
                                              <groupId>org.jolokia</groupId>
                                              <artifactId>jolokia-agent-jvm</artifactId>
                                              <version>2.0.3</version>
                                              <type>jar</type>
                                              <classifier>javaagent</classifier>
                                            </artifactItem>
                                          </artifactItems>
                                          <stripVersion>true</stripVersion>
                                      </configuration>
                                  </execution>
                              </executions>
                          </plugin>
                          <plugin>
                              <groupId>${quarkus.platform.group-id}</groupId>
                              <artifactId>quarkus-maven-plugin</artifactId>
                              <configuration>
                                  <jvmArgs>-Dcamel.main.shutdownTimeout=30 -Dquarkus.camel.source-location-enabled=true -javaagent:target/dependency/jolokia-agent-jvm-javaagent.jar=port=7878,host=localhost</jvmArgs>
                              </configuration>
                          </plugin>
                      </plugins>
                  </build>
              </profile>
       

      Attachments

        Issue Links

          Activity

            People

              apupier Aurélien Pupier
              apupier Aurélien Pupier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: