Getting Started with Aspectran

Aspectran requires Java 8 or later, and was developed to be easily compatible with the latest version of Java.

Requirements

Aspectran-based applications require Aspectran JAR files for their execution environment.
These JAR files are published to the Maven Repository, therefore you can use any Java build tool to build an Aspectran project.

  • Java SE 1.8 or higher
  • Maven 3.4 or higher

Maven

Maven central

You will find all Aspectran Maven artifacts directly in the central Maven repository here:
https://repo1.maven.org/maven2/com/aspectran/

See all versions available on the Maven Central Repository.

Use the following definition to use Aspectran in your maven project:

<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-all</artifactId>
  <version>6.6.2</version>
</dependency>

Aspectran can also be used with more low-level jars:

<!-- To build a daemon application that runs in the background -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-daemon</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To embed Aspectran in your application -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-embed</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To build command-line based applications -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-shell</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To build command-line based applications that use the feature-rich JLine -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-shell-jline</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To build a servlet-based web application -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-web</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To build a web application server with embedded Jetty -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-with-jetty</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To build MyBatis applications on top of the Aspectran -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-with-mybatis</artifactId>
  <version>6.6.2</version>
</dependency>
<!-- To build a web application server with embedded Undertow -->
<dependency>
  <groupId>com.aspectran</groupId>
  <artifactId>aspectran-with-undertow</artifactId>
  <version>6.6.2</version>
</dependency>

Note that Aspectran 6 requires Java 8, so an explicit declaration of 1.8 compatibility to the compiler may also be required:

<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <compilerVersion>1.8</compilerVersion>
        <source>1.8</source>
        <target>1.8</target>
      </configuration>
    </plugin>
  </plugins>
</build>

Latest release

Build Status Coverage Status Maven central Sonatype Nexus (Snapshots)

Aspectran 6.6.2 is the latest release and recommended version for all users.

Aspectran releases on GitHub

API Reference