Maven JArchitect Plugin

Maven JArchitect Plugin




Installing maven JArchitect plugin

  • First step: Create a JArchitect project (.jdproj) from JArchitect tool
  • Download jarchitect-maven-plugin-1.0.jar.
  • To install the jarchitect maven plug-in, execute the following command:
  • mvn install:install-file -Dfile={jarchitect-maven-plugin.jar Path} -DgroupId=org.jarchitect.plugins -DartifactId=jarchitect-maven-plugin -Dversion=1.0 -Dpackaging=maven-plugin.


Analyzing a project with maven jarchitect plugin

    Once you have installed the Jarchitect maven plug-in, you can now analyze any project that contains your pom.xml.

  • First add the following code to the pom.xml

<Build>
  <Plugins >
    <Plugin>
      <groupId>org.jarchitect.plugins</groupId>
      <artifactId>jarchitect-maven-plugin</artifactId>
      <version>1.0</version>
    <configuration>
      <outputDirectory>{jarchitect output directory PATH}</outputDirectory>
      <jarchitectpath>{jarchitect console PATH}</jarchitectpath>
      <jdprojpath>{.jdproj file PATH}</jdprojpath>
    </configuration>
    <executions>
      <execution>
      <phase>compile</phase>
      <goals>
         <goal>analyze</goal>
      </goals>
      </execution>
    </executions>
    </Plugin>
  </Plugins>
</Build>


  • Execute the following command to analyze your project.
  • mvn org.jarchitect.plugins:jarchitect-maven-plugin:1.0:analyze

  • Check now your JArchitect output directory you must see something like this:


Go to top