Skip to content

Commit

Permalink
[CHG] Modified versions to 3.0.9-SNAPSHOT
Browse files Browse the repository at this point in the history
[CHG] byteman-jboss-modules-plugin also works now with older versions of
jboss-modules (1.2.0) that use protected constructors for ModuleLoader
[NEW] byteman-install now accepts "-m" option to enable JBoss module
plugin

Signed-off-by: Fernando Miguelez <[email protected]>
  • Loading branch information
fmiguelez committed Apr 4, 2017
1 parent d9ad212 commit 5283d1c
Show file tree
Hide file tree
Showing 20 changed files with 169 additions and 82 deletions.
2 changes: 1 addition & 1 deletion agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
</parent>
<properties>
<debug.args>-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005</debug.args>
Expand Down
10 changes: 6 additions & 4 deletions bin/bminstall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@
@rem a JVM which was started without the agent. This provides an
@rem alternative to using the -javaagent java command line flag
@rem
@rem usage: bminstall [-p port] [-h host] [-b] [-s] [-Dname[=value]]* pid
@rem usage: bminstall [-p port] [-h host] [-b] [-s] [-m] [-Dname[=value]]* pid
@rem pid is the process id of the target JVM
@rem -h host selects the host name or address the agent listener binds to
@rem -p port selects the port the agent listener binds to
@rem -b adds the byteman jar to the bootstrap classpath
@rem -s sets an access-all-areas security policy for the Byteman agent code
@rem -m activates the byteman JBoss modules plugin
@rem -Dname=value can be used to set system properties whose name starts with "org.jboss.byteman."
@rem expects to find a byteman agent jar in BYTEMAN_HOME
@rem expects to find a byteman agent jar and byteman JBoss modules plugin jar (if -m is indicated) in BYTEMAN_HOME
@rem
@rem -----------------------------------------------------------------------------------
if "%OS%" == "Windows_NT" setlocal
Expand Down Expand Up @@ -84,12 +85,13 @@ if "%OS%" == "Windows_NT" endlocal
exit /b

:showUsage
echo usage: bminstall [-p port] [-h host] [-b] [-s] [-Dname[=value]]* pid
echo usage: bminstall [-p port] [-h host] [-b] [-s] [-m] [-Dname[=value]]* pid
echo pid is the process id of the target JVM
echo -h host selects the host name or address the agent listener binds to
echo -p port selects the port the agent listener binds to
echo -b adds the byteman jar to the bootstrap classpath
echo -s sets an access-all-areas security policy for the Byteman agent code
echo -m activates the byteman JBoss modules plugin
echo -Dname=value can be used to set system properties whose name starts with "org.jboss.byteman."
echo expects to find a byteman agent jar in BYTEMAN_HOME
echo expects to find a byteman agent jar and byteman JBoss modules plugin jar (if -m is indicated) in BYTEMAN_HOME
goto exitBatch
5 changes: 3 additions & 2 deletions bin/bminstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
# a JVM which was started without the agent. This provides an
# alternative to using the -javaagent java command line flag
#
# usage: bminstall [-p port] [-h host] [-b] [-s] [-Dname[=value]]* pid
# usage: bminstall [-p port] [-h host] [-b] [-s] [-m] [-Dname[=value]]* pid
# pid is the process id of the target JVM
# -h host selects the host name or address the agent listener binds to
# -p port selects the port the agent listener binds to
# -b adds the byteman jar to the bootstrap classpath
# -s sets an access-all-areas security policy for the Byteman agent code
# -m activates the byteman JBoss modules plugin
# -Dname=value can be used to set system properties whose name starts with "org.jboss.byteman."
# expects to find a byteman agent jar in BYTEMAN_HOME
# expects to find a byteman agent jar and byteman JBoss modules plugin jar (if -m is indicated) in BYTEMAN_HOME
#

# helper function to obtain java version
Expand Down
5 changes: 5 additions & 0 deletions bin/bmsetenv.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ exit /b 1

:okJar
set "BYTEMAN_JAR=%BYTEMAN_HOME%\lib\byteman.jar"
if exist "%BYTEMAN_HOME%\contrib\jboss-modules-system\byteman-jboss-modules-plugin.jar" goto okPluginJar
echo Cannot locate byteman JBoss modules plugin jar

:okPluginJar
set "BYTEMAN_MODULES_PLUGIN_JAR=%BYTEMAN_HOME%\contrib\jboss-modules-system\byteman-jboss-modules-plugin.jar"
2 changes: 1 addition & 1 deletion contrib/bmunit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<build>
Expand Down
2 changes: 1 addition & 1 deletion contrib/dtest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion contrib/jboss-modules-system/plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-jboss-modules</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,17 @@ public ModuleSpec findModule(ModuleIdentifier identifier,
}
}
};
ruleModuleLoader = new ModuleLoader(finders);
ruleModuleLoader = new ModuleLoaderWrapper(finders);
}

/**
* Utility class to allow instantiating {@link ModuleLoader} with jboss-modules <= 1.2.0 (protected constructors)
*/
public class ModuleLoaderWrapper extends ModuleLoader
{
public ModuleLoaderWrapper(ModuleFinder[] finders) {
super(finders);
}
}

public ClassbyteClassLoader createLoader(ClassLoader triggerClassLoader, String[] imports)
Expand Down
2 changes: 1 addition & 1 deletion contrib/jboss-modules-system/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion contrib/jboss-modules-system/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-jboss-modules</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion contrib/rulecheck-maven-plugin/example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<plugin>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-rulecheck-maven-plugin</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<executions>
<execution>
<id>rulecheck-test</id>
Expand Down
4 changes: 2 additions & 2 deletions contrib/rulecheck-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
4 changes: 2 additions & 2 deletions docs/asciidoc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-docs</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
</parent>

<artifactId>byteman-asciidoc</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<name>Byteman AsciiDoc Documentation</name>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
</parent>

<artifactId>byteman-docs</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
<name>Byteman Documentation</name>
<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion download/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
</parent>
<description>
The Byteman download includes the byteman agent, submit and install jars. the contributed
Expand Down
2 changes: 1 addition & 1 deletion install/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<parent>
<groupId>org.jboss.byteman</groupId>
<artifactId>byteman-root</artifactId>
<version>3.0.8</version>
<version>3.0.9-SNAPSHOT</version>
</parent>

<profiles>
Expand Down
Loading

0 comments on commit 5283d1c

Please sign in to comment.