Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-149

Make maven work out of the box by installing agent jar from classpath if unconfigured

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.1
    • Component/s: Tools
    • Labels:
      None

      Description

      The agent installer currently uses environment variable BYTEMAN_HOME or System property org.jboss.bbyteman.home to locate the Byteman agent jar (byteman.jar) when it is trying to install the agent into a VM. This is because it needs to supply a path to the agent jar as a parameter when loading the agent. This is highly flexible but poses a problem for the BMUnit package when it tries to autoload the jar running under maven. It poses a requirement to explicitly download and install the agent jar in a known location which debars maven from managing the Byteman jar dependencies.

      A solution is for the install program to look for a reference to the agent jar in the classpath and, if found, use that path to load it. This should only be done as a last effort if BYTEMAN_HOME and org.jboss.byteman.home are not set. The agent should use the path set in System property java.class.path and look for a path ending in "byteman.jar", "byteman-NN.NN.NN.jar" or "byteman-NN.NN.NN.AAAAA.jar" where NN and AAAAA represent a digit sequence and an alphanum sequence. That will allow for versioned jars and snapshot jars.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                adinn Andrew Dinn
              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: