Skip to content

Commit 397d7e9

Browse files
Add pom.xml to SampleApplication
1 parent 921e874 commit 397d7e9

File tree

2 files changed

+69
-4
lines changed

2 files changed

+69
-4
lines changed

SampleApplication/README.MD

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
SampleApplication is intended to provide a starting point for building custom Java application integrations using the SendSafely Java Client API.
22

33
# Instructions
4-
Download the most recent release of the SendSafely Client API, extract, and copy all of the contained jar files into the SampleApplication/lib folder.
4+
Download the most recent release of the SendSafely Client API from [GitHub](https://github.com/SendSafely/Java-Client-API/releases) or a [public maven repository](https://mvnrepository.com/artifact/com.sendsafely/sendsafely-java-api) and copy the jar files into the SampleApplication/lib folder. Alternatively, build and run SampleApplication using the Maven instructions below.
55

6-
## Compile
6+
## Manual
7+
### Build
78

89
`mkdir bin`
910

1011
`javac -cp "lib/*" -d bin src/*.java`
1112

12-
## Run (macOS/Linux)
13+
### Run (macOS/Linux)
1314

1415
```
1516
java -cp "lib/*:bin" SendSafelyRefApp
1617
```
1718

18-
## Run (Windows)
19+
### Run (Windows)
1920

2021
```
2122
java -cp "lib/*;bin/" SendSafelyRefApp
2223
```
24+
## Maven
25+
### Build
26+
```mvn clean compile package```
27+
28+
### Run (macOS/Linux)
29+
```java -cp "lib/*:target/SampleApplication-1.0-SNAPSHOT.jar" SendSafelyRefApp```
30+
31+
### Run (Windows)
32+
```java -cp "lib/*;target/SampleApplication-1.0-SNAPSHOT.jar" SendSafelyRefApp```
2333

2434
### Command Line Argments
2535

SampleApplication/pom.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.sendsafely</groupId>
8+
<artifactId>SampleApplication</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
11+
<name>SampleApplication</name>
12+
<url>https://www.sendsafely.com</url>
13+
<packaging>jar</packaging>
14+
15+
<dependencies>
16+
<dependency>
17+
<groupId>com.sendsafely</groupId>
18+
<artifactId>sendsafely-java-api</artifactId>
19+
<version>3.1.5</version>
20+
</dependency>
21+
</dependencies>
22+
23+
<build>
24+
<sourceDirectory>src</sourceDirectory>
25+
<plugins>
26+
<plugin>
27+
<groupId>org.apache.maven.plugins</groupId>
28+
<artifactId>maven-dependency-plugin</artifactId>
29+
<executions>
30+
<execution>
31+
<id>copy-dependencies</id>
32+
<phase>package</phase>
33+
<goals>
34+
<goal>copy-dependencies</goal>
35+
</goals>
36+
<configuration>
37+
<outputDirectory>lib</outputDirectory>
38+
<overWriteReleases>false</overWriteReleases>
39+
<overWriteSnapshots>false</overWriteSnapshots>
40+
<overWriteIfNewer>true</overWriteIfNewer>
41+
</configuration>
42+
</execution>
43+
</executions>
44+
</plugin>
45+
<plugin>
46+
<artifactId>maven-compiler-plugin</artifactId>
47+
<version>3.8.1</version>
48+
<configuration>
49+
<source>1.8</source>
50+
<target>1.8</target>
51+
</configuration>
52+
</plugin>
53+
</plugins>
54+
</build>
55+
</project>

0 commit comments

Comments
 (0)