Skip to content

Commit

Permalink
ElektraInitiative#3713 updated maven and gradle sample projects
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Tucek authored and a-kraschitzer committed Apr 14, 2021
1 parent 89b7fad commit 80a00f6
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 94 deletions.
5 changes: 0 additions & 5 deletions examples/external/java/read-keys-example-gradle/README.md

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion examples/external/java/read-keys-example/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a fully working example for how to use Elektra with Maven.
This is a fully working example for how to use Elektra with Maven or Gradle.

Make sure Elektra and the JNA binding are installed correctly.

Expand Down
20 changes: 18 additions & 2 deletions examples/external/java/read-keys-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.target}</source>
<target>${maven.compiler.target}</target>
Expand All @@ -41,7 +41,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<version>3.3.0</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
Expand All @@ -65,6 +65,22 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<mainClass>org.libelektra.app.App</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.libelektra.KeySet;
import org.libelektra.exception.KDBException;

class App
public class App
{

private final static String MOUNT_SPACE = "user:/";
Expand Down
4 changes: 2 additions & 2 deletions src/bindings/jna/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Simply add libelektra as dependency using:
</dependency>
```

[Here](../../../examples/external/java/read-keys-example/pom.xml) is a full example using Maven, which should work out of the box if you execute `mvn compile` in the example directory `../../../examples/external/java/read-keys-example/` and start the compiled `App.class`.
[Here](../../../examples/external/java/read-keys-example/pom.xml) is a full example using Maven, which should work out of the box by executing `mvn compile exec:java` in the example directory `../../../examples/external/java/read-keys-example/`.

#### Gradle

Expand All @@ -107,7 +107,7 @@ dependencies {
}
```

[Here](../../../examples/external/java/read-keys-example-gradle/build.gradle) is a full example using Gradle, which should work out of the box if you execute `./gradlew run` in the example directory `../../../examples/external/java/read-keys-example-gradle/`.
[Here](../../../examples/external/java/read-keys-example/build.gradle) is a full example using Gradle, which should work out of the box by executing `./gradlew run` in the example directory `../../../examples/external/java/read-keys-example/`.

### Using Elektra Plugins

Expand Down

0 comments on commit 80a00f6

Please sign in to comment.