Skip to content

igor-suhorukov/aspectj-scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AspectJ scripting agent

Scripting extension for AspectJ java agent. Allow java bytecode instrumentation at jvm startup by using MVEL expression and execute code from maven artifact repositories

Any AspectJ pointcut expression available with aspect types: AROUND, BEFORE, AFTER, AFTER_RETURNING, AFTER_THROWING

For example:

    {
      "name": "org.aspect.testing.Aspect6",
      "type": "AROUND",
      "pointcut": "execution(public static void main(String[]))",
      "init": {
        "expression": "System.out.println(\"Start jvm\")"
      },
      "dispose": {
        "expression": "System.out.println(\"Stop jvm\")"
      }
    },

Agent configuration:

  • org.aspectj.weaver.loadtime.configuration = config:file/http choose "config:file" or "config:http"
  • org.aspectj.weaver.loadtime.configuration.debug = true / false
  • org.aspectj.weaver.loadtime.configuration.filter = default - all aspects from configuration or any valid MVEL expression to filter aspects by "aspectByInstance/entry/key" value
  • repo.remote.url = default - maven central or http://... valid path to other repository
  • repo.local.path = path - local directory to store maven artifacts

Thanks Steve Reed for maven classloader

About

Aspectj load-time weaving scripting agent

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages