Skip to content

Commit

Permalink
add some debug options
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier Lamy <[email protected]>
  • Loading branch information
olamy committed Oct 30, 2023
1 parent 31c609e commit dad52e5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
<Export-Package>org.example;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
<Import-Package>javax.sql, jakarta.transaction;version="2.0.0"</Import-Package>
<_nouses>true</_nouses>
<Jetty-Environment>ee10</Jetty-Environment>
</instructions>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=jakarta.servlet.ServletContainerInitializer</Provide-Capability>
<Export-Package>org.example.initializer;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
<_nouses>true</_nouses>
<Jetty-Environment>ee10</Jetty-Environment>
</instructions>
</configuration>
</plugin>
Expand Down
6 changes: 6 additions & 0 deletions jetty-ee10/jetty-ee10-osgi/test-jetty-ee10-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
<properties>
<assembly-directory>target/distribution</assembly-directory>
<bundle-symbolic-name>${project.groupId}.boot.test.osgi</bundle-symbolic-name>
<bundle.debug>false</bundle.debug>
<maven.deploy.skip>true</maven.deploy.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<pax.exam.LEVEL>WARN</pax.exam.LEVEL>
<pax.exam.debug.port>0</pax.exam.debug.port>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -519,7 +522,10 @@
<configuration>
<skipTests>${skipTests}</skipTests>
<systemPropertyVariables>
<bundle.debug>${bundle.debug}</bundle.debug>
<mavenRepoPath>${session.repositorySession.localRepository.basedir.absolutePath}</mavenRepoPath>
<pax.exam.debug.port>${pax.exam.debug.port}</pax.exam.debug.port>
<pax.exam.LEVEL>${pax.exam.LEVEL}</pax.exam.LEVEL>
<settingsFilePath>${env.GLOBAL_MVN_SETTINGS}</settingsFilePath>
</systemPropertyVariables>
<argLine>-Dconscrypt-version=${conscrypt.version}</argLine>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.options.extra.VMOption;
import org.ops4j.pax.tinybundles.core.TinyBundle;
import org.ops4j.pax.tinybundles.core.TinyBundles;
import org.osgi.framework.Bundle;
Expand Down Expand Up @@ -103,6 +104,11 @@ public static List<Option> configurePaxExamLogging()
options.add(systemProperty("pax.exam.logging").value("none"));
String paxExamLogLevel = System.getProperty("pax.exam.LEVEL", "WARN");
options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(paxExamLogLevel));
int debugPort = Integer.getInteger("pax.exam.debug.port", -1);
if (debugPort > 0)
{
options.add(new VMOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=" + debugPort));
}
return options;
}

Expand Down

0 comments on commit dad52e5

Please sign in to comment.