Skip to content

Export Plugin

Lars edited this page Sep 7, 2020 · 1 revision

Table of contents

Non-Maven Project

Export your project as jar file, but without including the RemoteLight dependency.

Eclipse

Right click on the project folder > Export > select Java > JAR file > Next > select the export destination folder and click on Finish.

IntelliJ

Follow the steps in the Package an application into a JAR section. Be sure to remove the RemoteLight artifact before building the jar.
remove RemoteLight artifact in IntelliJ

Maven Project

Maven offers a more advanced jar building. It is possible to add multiple different build plugins but we will only use the maven-compiler-plugin.

The compiler plugin will compile the source code using source and target java version 8.

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>8</source>
                <target>8</target>
            </configuration>
        </plugin>
    </plugins>
</build>

To build the jar file we only need to run mvn clean install. The generated jar file is located in target folder.