Common maven recipes - e-ucm/ead GitHub Wiki

Currently eAdventure 2.0 is developed with Maven 3.1.1

All the tasks related to the project build are done through several maven profiles. The rest of this page describes the different scenarios and the build instructions (profiles' activation) in order to complete the task.

Apply source format conventions and add license headers

As a prior step to create PR you need to format properly the generated code. Just in case you do not have configured your IDE to do it automatically for you, you need to make sure to run:

mvn com.googlecode.maven-java-formatter-plugin:maven-java-formatter-plugin:0.4:format com.mycila:license-maven-plugin:2.0:format

This awkward syntax is required due to java-formatter and license plugins are not found, by default, by maven. In order to simplify the run of this plugins manually you should add the following config to your settings.xml:

<settings>
  ...
  <pluginGroups>
    <pluginGroup>com.googlecode.maven-java-formatter-plugin</pluginGroup>
    <pluginGroup>com.mycila</pluginGroup>
  </pluginGroups>
</setttings>

Then it is possible to run the previous command just typing:

mvn java-formatter:format license:format

Source code formatting and checking license header is done automatically as part of the maven install process.

Generate the Model Classes

Part of the eAdventure code base is generated automatically using a data model defined using JSON schema. To (re)generate the model classes you need to run:

# This generates the model classes and adjust the formatting and add the header license
mvn -Pbuild-schema clean install

Generate Editor's Skins

The editor's skin is composed of several graphics assets. In order to optimize the loading time, a texture atlas is generated running this command:

mvn clean install

If you only want to regenerate skins, overwriting previous ones, use

mvn es.e-ucm.ead:ead-maven-plugin:generate-skins

Generate nightly releases

mvn clean package
mvn -Pdo-nightly-release deploy

Note: the last instruction (deploy) actually uploads the release to sourceforge. Should you just want to generate the release artifact (i.e. application bundle), use this instruction instead:

mvn clean package
mvn -Pdo-nightly-release package

For more info about the release process, see Release process

Generate android APKs

To generate android APKs as part of the build process during development, it is needed to use the android-build profile, so to launch a build process is needed to run:

mvn -Pandroid-build clean install

Generate engine artifact for editor exportation

The editor needs a version of the engine artifact for the exportation process. The release process generate this artifact, but if it is needed to generate the artifact manually it is needed to run:

mvn clean package -pl :engine-desktop
mvn -Pdo-nightly-release package -pl :engine-desktop

Generate repo-library (bundled, with all resources)

The utility for creating repository elements and libraries for mokap is created using the profile "bundle" in project repo-builder:

mvn clean package -pl :repo-builder
mvn -Pbundle package -pl :repo-builder

This will generate, under target/, the "jar-with-dependencies" file that you can just run to regenerate the repo, and the zipped sources. In case you just want to get them already compiled, you can use the next links:

⚠️ **GitHub.com Fallback** ⚠️