Skip to content
Adrian Papari edited this page Jan 6, 2019 · 6 revisions

Fluid Entity API Maven installation

We recommend making a multi-module maven project and not fighting the Maven conventions.

  1. packaging your components in one artifact, example: my-components
  2. package your game in another artefact, example: my-systems
  3. Add my-components as a dependency to my-systems
  4. Add the following odb fluid plugin to my-systems:
 <build>
        <plugins>
            <plugin>
                <groupId>net.onedaybeard.artemis</groupId>
                <artifactId>artemis-fluid-maven-plugin</artifactId>
                <version>2.2.0</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals><goal>generate</goal></goals>
                    </execution>
                </executions>
                <configuration>
                    <preferences>
                        <!-- prefix for Pos E::[get]pos() -->
                        <prefixComponentGetter>_</prefixComponentGetter>
                        <!-- prefix for E E::[]pos() -->
                        <prefixComponentCreate></prefixComponentCreate>
                        <!-- prefix for boolean E::[has]Pos() -->
                        <prefixComponentHas>has</prefixComponentHas>
                        <!-- prefix for E E::[remove]Pos() -->
                        <prefixComponentRemove>remove</prefixComponentRemove>
                        <!-- add tag convenience methods to E -->
                        <generateTagMethods>true</generateTagMethods>
                        <!-- add group convenience methods to E -->
                        <generateGroupMethods>true</generateGroupMethods>
                        <!--  Generate boolean accessors for flag components? -->
                        <generateBooleanComponentAccessors>true</generateBooleanComponentAccessors>
                        <!-- global setting. overridden by @Fluid annotation. -->
                        <swallowGettersWithParameters>false</swallowGettersWithParameters>
                    </preferences>
                </configuration>
            </plugin>
        </plugins>
    </build>
  1. Run 'mvn clean:compile'. If it worked you should find generated source in target/generated-sources/fluid/.

See https://github.com/DaanVanYperen/odb-fluid-maven-quickstart for a working example.

Clone this wiki locally