• 0.61.0

Plugin Details

This report describes goals, parameters details, requirements and sample usage of this plugin.

Goals

Goals available for this plugin:

Goal Description
eo:assemble Pull all necessary EO XML files from Objectionary and parse them all.

This goal combines MjParse, MjProbe and MjPull. See their documentation to find out more details. The runs these goals repeatedly until no new objects are pulled or parsed in a cycle.

eo:clean Implementation of maven clean plugin, just deleting target/eo directory.

This goal simply deletes the directory containing all the files used for compilation.

eo:compile Compile and lint all EO files.

This goal combines MjAssemble, MjLint, MjResolve and MjPlace goals. See their documentation to find out more details. The is useful to run the whole compilation process in one go without the need to call each goal separately.

eo:help Display help information on eo-maven-plugin.
Call mvn eo:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
eo:lint Mojo that runs all lints and checks errors and warnings, preferably after the assemble goal.

This goal goes through all XMIR files generated in the previous steps (see MjParse or MjPull goals) and runs all available lints on them. If any errors or warnings are found, they are logged to the console, and depending on the configuration, the build may fail. The linting results are also embedded back into the XMIR files for future reference. Lints might use caching to speed up the process on subsequent runs. Cached files are stored in the CACHE directory. The results of linting are saved in the DIR directory.

eo:parse Parse EO to XML.

This is the initial goal that parses all found EO sources to XMIRs. You can read more about XMIR format here

The goal scans all the EO sources registered in the foreign file catalog (see MjRegister and MjPull) and then parses those that were not parsed before (i.e. do not have XMIRs yet) to XMIR format. The resulting XMIR files are stored in the DIR directory.

eo:place Take binary files from where MjResolve placed them and copy to the target/classes directory.

Input directory is MjResolve.DIR. Output directory is MjPlace#targetDir.


See also: Place catalog
eo:print Print XMIR to EO.

This goal goes through all XMIR sources found in the specified directory, converts them back to EO format, and saves the resulting EO files in the specified output directory, preserving the original directory structure. Input XMIR files are found in printSourcesDir, output EO files are saved in printOutputDir.

eo:probe Go through all `probe` and `also` metas in XMIR files, try to locate the objects pointed by `probe` in Objectionary, and if found, register them in the catalog. More about the purpose of this Mojo is in this issue.

This goal just modifies the "foreign" catalog by adding newly discovered objects to it. It does not download or pull the sources of these objects, that is the job of MjPull goal which usually goes after this one. This goal does not create any files on the disk either.

eo:pull Pull EO files from Objectionary.

This goal goes through all objects from "foreign" catalog and looks for those without sources and pulls them from Objectionary remote repository. The pulled sources are stored in the DIR directory.

eo:register Find and register all .eo sources in the "foreign" catalog.

This goal scans the <sourcesDir> directory for all .eo files matching the inclusion and exclusion GLOB filters specified in the <includeSources> and <excludeSources> parameters respectively. By default, it includes all .eo files found recursively. Each found EO source is then registered in the "foreign" catalog that later processed by other goals like MjParse, MjAssemble or MjCompile. This goal only changes the "foreign" catalog and does not save any generated files.

eo:resolve Find all required runtime dependencies, download them from Maven Central, unpack and place to the target/eo directory.

The motivation for this mojo is simple: Maven doesn't have a mechanism for adding .JAR files to transpile/test classpath in runtime.

This goal goes through all dependencies found in the MjPull goal, finds their implementations (i.e. transitive dependencies), downloads them from Maven Central, unpacks them and places the resulting files to the DIR directory.

eo:transpile Transpile.

This Maven Mojo class transpiles XMIR files into Java source files. The goal of this class is to automate the process of transforming EO intermediate representations (XMIRs) into Java code, optimize the output, and integrate the results into the Maven build lifecycle for further processing.

This is one of the final goals that transpiles XMIRs to Java files generated by MjAssemble, MjParse or MjPull goals. The resulting Java files are stored in the DIR directory. The intermediate optimized XMIRs are stored in the PRE directory.

eo:unplace It deletes binary files, which were previously copied by "place" mojo so these binaries are not got into result JAR.
eo:unspile Goes through all .class files and deletes those that were created from autogenerated sources so these binaries are not got into result JAR.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.9.15
JDK 17

System Requirements History

The following specifies the minimum requirements to run this Maven plugin for historical versions:

Plugin Version Maven JDK
from 0.45.0 to 0.60.0 - 11
from 0.1 to 0.44.0 - 8

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eolang</groupId>
          <artifactId>eo-maven-plugin</artifactId>
          <version>0.61.0</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.eolang</groupId>
        <artifactId>eo-maven-plugin</artifactId>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"