SpiceIt Agent

SpiceIt Agent is a Java Agent to spice up your code at runtime.

License

License

GroupId

GroupId

gg.neko.spiceit
ArtifactId

ArtifactId

spiceit-agent
Last Version

Last Version

0.1
Release Date

Release Date

Type

Type

jar
Description

Description

SpiceIt Agent
SpiceIt Agent is a Java Agent to spice up your code at runtime.

Download spiceit-agent

How to add to project

<!-- https://jarcasting.com/artifacts/gg.neko.spiceit/spiceit-agent/ -->
<dependency>
    <groupId>gg.neko.spiceit</groupId>
    <artifactId>spiceit-agent</artifactId>
    <version>0.1</version>
</dependency>
// https://jarcasting.com/artifacts/gg.neko.spiceit/spiceit-agent/
implementation 'gg.neko.spiceit:spiceit-agent:0.1'
// https://jarcasting.com/artifacts/gg.neko.spiceit/spiceit-agent/
implementation ("gg.neko.spiceit:spiceit-agent:0.1")
'gg.neko.spiceit:spiceit-agent:jar:0.1'
<dependency org="gg.neko.spiceit" name="spiceit-agent" rev="0.1">
  <artifact name="spiceit-agent" type="jar" />
</dependency>
@Grapes(
@Grab(group='gg.neko.spiceit', module='spiceit-agent', version='0.1')
)
libraryDependencies += "gg.neko.spiceit" % "spiceit-agent" % "0.1"
[gg.neko.spiceit/spiceit-agent "0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
gg.neko.spiceit : spiceit-injector jar 0.1

test (4)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
org.junit.jupiter : junit-jupiter-api jar 5.5.2
org.junit.jupiter : junit-jupiter-engine jar 5.5.2
org.mockito : mockito-junit-jupiter jar 3.1.0

Project Modules

There are no modules declared in this project.

SpiceIt

A collection of nice, easy to use features to make your code spicier.

Build Status Coveralls github branch LGTM Grade GitHub nyan

With SpiceIt, this class: example class

produces this output: example output

Getting started

SpiceIt features are exposed by the API module: go on and import it as a Maven dependency:

<dependency>
    <groupId>gg.neko.spiceit</groupId>
    <artifactId>spiceit-api</artifactId>
    <version>0.1</version>
</dependency>

Making it work

SpiceIt needs to inject its magic into your bytecode.
It can do so with either its Maven plugin or its Java agent.

  • Maven plugin
    add this plugin to your pom.xml plugins section:
    <plugin>
        <groupId>gg.neko.spiceit</groupId>
        <artifactId>spiceit-maven-plugin</artifactId>
        <version>0.1</version>
        <executions>
            <execution>
                <goals>
                    <goal>spiceit</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
  • Java agent
    download the agent from Maven Central Repository (or compile it from source, if that's your thing) and launch your application with this option:
    -javaagent:spiceit-agent-0.1-jar-with-dependencies.jar

Check out the example projects making use of Maven plugin and Java agent.

Available features

Here are the spicy features!

  • LogIt logs methods entry, exit and error
  • TimeIt logs methods execution time

More coming soon™ 😎

Transitive dependencies

Just SLF4J for logging, already provided by SpiceIt API module.
Since it's a simple façade for various logging framework, you can choose your favorite implementation, e.g. logback or log4j.

License

Licensed under the MIT License.

Versions

Version
0.1