Skip to content

Latest commit

 

History

History
93 lines (78 loc) · 2.17 KB

README.md

File metadata and controls

93 lines (78 loc) · 2.17 KB

BTrace Maven Support

Provides Maven integration for BTrace

Version: 2.0.0

Components

BTrace Maven Plugin (btrace-maven-plugin)

Allows compilation of BTrace scripts as a part of the Maven project lifecycle.

<plugins>
    <plugin>
	<groupId>io.btrace</groupId>
	<artifactId>btrace-maven-plugin</artifactId>
	<version>2.0.0</version>
	<executions>
	    <execution>
		<goals>
		    <goal>btracec</goal>
		</goals>
	    </execution>
	</executions>
	<configuration>
	    <classpathElements>
	        <classpathElement>/path/to/jar_or_folder</classpathElement>
	        ...
	    </classpathElements>
	</configuration>
    </plugin>
    ...
</plugins>

The plugin configuration accepts the following parameters:

  • sourceDirectory - where the sources to compile are located (default: ${project.build.sourceDirectory})
  • classPathElements - additional class path for compilation
  • outputDirectory - where to put the compiled binaries (default: ${project.build.outputDirectory})

BTrace Project Archetype (btrace-project-archetype)

A simple archetype to generate a functional scaffolding for a project containing BTrace scripts.

To bootstrap a new project use

mvn archetype:generate
  -DgroupId=[your project's group id]
  -DartifactId=[your project's artifact id]
  -DarchetypeArtifactId=btrace-project-archetype

Usage

The artifacts are hosted by bintray

Modify your maven settings.xml to include the following section:

...
<profiles>
	<profile>
		<repositories>
			<repository>
				<snapshots>
					<enabled>false</enabled>
				</snapshots>
				<id>central</id>
				<name>bintray-central</name>
				<url>https://jcenter.bintray.com</url>
			</repository>
    		</repositories>
		<pluginRepositories>
			<pluginRepository>
				<snapshots>
					<enabled>false</enabled>
				</snapshots>
				<id>central</id>
				<name>bintray-central</name>
				<url>https://jcenter.bintray.com</url>
			</pluginRepository>
		</pluginRepositories>
		<id>bintray</id>
	</profile>
</profiles>
<activeProfiles>
	<activeProfile>bintray</activeProfile>
</activeProfiles>
</settings>
...