Skip to content

Commit 7c91e86

Browse files
Release Notes
Update: - Release name is changed to make badge as just Release - Travis YML removed. - POM files updated. - ReadMe & Deploy md file updated.
1 parent 7c33e51 commit 7c91e86

File tree

9 files changed

+50
-181
lines changed

9 files changed

+50
-181
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ on:
22
release:
33
types: [published]
44

5-
name: Create Release
5+
name: Release
66

77
jobs:
88
build:
9-
name: Create Release
9+
name: Java SDK Release
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

README.md

Lines changed: 28 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[![Build Status](https://travis-ci.org/splunk/splunk-sdk-java.svg?branch=master)](https://travis-ci.org/splunk/splunk-sdk-java)
1+
![Build Status](https://github.com/splunk/splunk-sdk-java/actions/workflows/release.yml/badge.svg?branch=master)
22
# The Splunk Software Development Kit for Java
33

4-
#### Version 1.6.4
4+
#### Version 1.7.0
55

66
The Splunk Software Development Kit (SDK) for Java contains library code and
77
examples designed to enable developers to build applications using Splunk.
@@ -40,40 +40,15 @@ Here's what you need to get going with the Splunk SDK for Java.
4040
If you haven't already installed Splunk, download it
4141
[here](http://www.splunk.com/download). For more about installing and running
4242
Splunk and system requirements, see
43-
[Installing & Running Splunk](http://dev.splunk.com/view/SP-CAAADRV). The Splunk SDK for Java has been tested with Splunk Enterprise 7.0 and 7.2.
43+
[Installing & Running Splunk](http://dev.splunk.com/view/SP-CAAADRV). The Splunk SDK for Java has been tested with Splunk Enterprise 8.0 and 8.2.0.
4444

4545
#### Splunk SDK for Java
4646

4747
[Get the Splunk SDK for Java](http://dev.splunk.com/view/SP-CAAAECN)—download the SDK as a ZIP, then extract the files and build the SDK. Or, download the JAR and add it to your project.
4848

4949
If you want to contribute to the SDK, clone the repository from [GitHub](https://github.com/splunk/splunk-sdk-java).
5050

51-
52-
#### Java and Ant
53-
54-
You'll need Java version 8 or higher, from [OpenJDK](https://openjdk.java.net) or [Oracle](https://www.oracle.com/technetwork/java). The Splunk SDK for Java has been tested with OpenJDK v8 and v11.
55-
56-
You'll also need Ant, which you can install from the
57-
[Apache website](http://ant.apache.org/bindownload.cgi).
58-
59-
The Splunk SDK for Java is compatible with Java 8. Be aware that **Java 8 disables Secure Sockets Layer version 3 (SSLv3) by default**, so you will need to use Transport Layer Security (TLS) instead. To see an example of how to do this, see the [`ssl_protocols`](https://github.com/splunk/splunk-sdk-java/blob/master/examples/com/splunk/examples/ssl_protocols/Pro...) example. Alternatively, you can re-enable SSLv3 in Java settings, but this is not recommended.
60-
61-
If you are using Windows, you'll need to make sure the following system
62-
variables are created and set:
63-
64-
* **ANT_HOME** should be set to the location where Ant is installed.
65-
66-
* **JAVA_HOME** should be set to the directory where the JDK is installed.
67-
68-
* **PATH** should include the path to the **%ANT_HOME%\bin** directory.
69-
70-
For full installation instructions, you can find more information here:
71-
72-
* [Java Platform Installation](http://www.oracle.com/technetwork/java/javase/index-137561.html)
73-
74-
* [Installing Apache Ant](http://ant.apache.org/manual/install.html)
75-
76-
#### Using Maven
51+
#### Java using Maven
7752

7853
You can use [Apache Maven](http://maven.apache.org/) to build your Splunk SDK for Java projects. With a few updates to your project's `pom.xml` file, it will retrieve all necessary dependencies and seamlessly build your project.
7954

@@ -100,42 +75,43 @@ To add the Splunk SDK for Java `.JAR` file as a dependency:
10075
<dependency>
10176
<groupId>com.splunk</groupId>
10277
<artifactId>splunk</artifactId>
103-
<version>1.6.4.0</version>
78+
<version>1.7.0</version>
10479
</dependency>
10580
</dependencies>
10681
```
10782

10883
Be sure to update the version number to match the version of the Splunk SDK for Java that you are using.
10984

110-
> Note: You can make similar changes to use [Ivy](http://ant.apache.org/ivy/history/latest-milestone/tutorial/start.html) or [Gradle](http://www.gradle.org/) as well.
85+
> Note: You can make similar changes to use [Gradle](http://www.gradle.org/) as well.
11186
11287
### Building the SDK and documentation
11388

11489
To build the SDK, open a command prompt in the **/splunk-sdk-java**
11590
directory and enter:
11691

117-
ant
92+
mvn
11893

11994
or
12095

121-
ant dist
96+
mvn package
12297

12398
This command builds all of the .class and .jar files. If you just want to build
12499
the .class files, enter:
125100

126-
ant build
101+
mvn compile
127102

128103
To remove all build artifacts from the repository, enter:
129104

130-
ant clean
105+
mvn clean
131106

132-
To build the documentation for the SDK, enter:
107+
To build the documentation for the SDK, it is being automatically generated with <b>mvn package</b>, otherwise enter:
133108

134-
ant javadoc
109+
cd splunk
110+
mvn javadoc:javadoc
135111

136-
### Examples and unit tests
112+
### Unit tests
137113

138-
The Splunk SDK for Java includes several examples and unit tests that are run at
114+
The Splunk SDK for Java includes several unit tests that are run at
139115
the command line.
140116

141117
#### Set up the .splunkrc file
@@ -187,56 +163,24 @@ shouldn't be used for storing user credentials for production. And, if you're
187163
at all concerned about the security of your credentials, just enter them at
188164
the command line rather than saving them in this file.
189165

190-
191-
#### Run examples
192-
193-
After you build the SDK, examples are put in the **/splunk-sdk-
194-
java/dist/examples** directory. To run the examples, run the Java interpreter
195-
at the command line using the `-jar` flag to specify the target example jar
196-
file, and include any arguments that are required by the example. To get help
197-
for an example, use the `--help` argument with an example.
198-
199-
For example, to see the command-line arguments for the Search example, open a
200-
command prompt in the **/splunk-sdk-java** directory and enter:
201-
202-
java -jar dist/examples/search.jar --help
203-
204-
To run the Search example, open a command prompt in the **/splunk-sdk-java**
205-
directory and enter:
206-
207-
java -jar dist/examples/search.jar "search * | head 10" --output_mode=csv
208-
209-
There is also a helper script called run in the root of the repository that
210-
simplifies running the SDK examples. For example, on Mac OS X you could
211-
simply enter:
212-
213-
./run search "search * | head 10" --output_mode=csv
214-
215-
All the the example jars are completely self contained. They can be used
216-
completely independently of the SDK's repository.
217-
218166
#### Run unit tests
219167

220168
To run the SDK unit tests, open a command prompt in the **/splunk-sdk-java**
221169
directory and enter:
222170

223-
ant test
224-
225-
To run the units from anywhere in the repository, enter:
171+
mvn test
226172

227-
ant test -find
228-
229-
You can also run specific test classes by passing the class to the -Dtestcase=
173+
You can also run specific test classes by passing the class to the -Dtest=
230174
option, e.g.,
231175

232-
ant test -Dtestcase=AtomFeedTest
176+
mvn test -Dtest=AtomFeedTest
233177

234-
The ant configuration can also produce a single HTML report of all the tests run
235-
using the target testreport (which also understands the -Dtestcase= option), e.g.
178+
The maven configuration can also produce an HTML report of all the tests automatically when **mvn package / mvn test** are executed.
179+
Alternate way to generate report is using below command under splunk directory:
236180

237-
ant testreport
181+
mvn jacoco:report
238182

239-
The report will be written in build/reports/tests/index.html.
183+
The report will be written in **/splunk-sdk-java/splunk/target/site/surefire-report.html**.
240184

241185
It's also possible to run the units within Java IDEs such as IntelliJ and
242186
Eclipse. For example, to open the Splunk SDK for Java project in Eclipse:
@@ -249,17 +193,12 @@ Eclipse. For example, to open the Splunk SDK for Java project in Eclipse:
249193

250194
#### Measure code coverage
251195

252-
To measure the code coverage of the test suite, open a
253-
command prompt in the **/splunk-sdk-java** directory and enter:
254-
255-
ant coverage
256-
257-
To run code coverage from anywhere in the repository, enter:
196+
Measurement of code coverage is generated along with <b>mvn package / mvn test</b>:
258197

259-
ant coverage -find
198+
mvn jacoco:report
260199

261200
To view the coverage report, open
262-
**/splunk-sdk-java/build/reports/coverage/index.html** in your web browser.
201+
**/splunk-sdk-java/splunk/target/test-report/index.html** in your web browser.
263202

264203
## Repository
265204

@@ -271,41 +210,21 @@ ouputs</td>
271210
</tr>
272211

273212
<tr>
274-
<td><b>/build</b></td>
213+
<td><b>/splunk/target</b></td>
275214
<td>This directory is created by the build and contains intermediate build
276215
ouputs</td>
277216
</tr>
278217

279218
<tr>
280-
<td><b>/dist</b></td>
281-
<td>This directory is created by the build and contains final build
282-
outputs</td>
283-
</tr>
284-
285-
<tr>
286-
<td><b>/examples</b></td>
287-
<td>Examples demonstrating various SDK features</td>
288-
</tr>
289-
290-
<tr>
291-
<td><b>/lib</b></td>
292-
<td>Third-party libraries used by examples and unit tests</td>
293-
</tr>
294-
295-
<tr>
296-
<td><b>/splunk</b></td>
219+
<td><b>/splunk/src/main</b></td>
297220
<td>Source for <code>com.splunk</code></td>
298221
</tr>
299222

300223
<tr>
301-
<td><b>/tests</b></td>
224+
<td><b>/splunk/src/test</b></td>
302225
<td>Source for unit tests</td>
303226
</tr>
304227

305-
<tr>
306-
<td><b>/util</b></td>
307-
<td>Utilities shared by examples and units</td>
308-
</tr>
309228
</table>
310229

311230
### Changelog

deploy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare -r scriptDirectory="$(dirname $(readlink -e $0))"
44
declare -r scriptName="$(basename $0)"
5-
declare -r version="1.6.4"
5+
declare -r version="1.7.0"
66

77
if [[ $# -ne 1 ]]; then
88
echo 1>&2 "Usage: ${scriptName} {local|staging||production}"

deploy.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ deploy \<repository-name>
99

1010
##DESCRIPTION
1111

12-
Deploy transmits **dist/splunk-1.6.4.jar**, **dist/splunk-1.6.4-javadoc.jar**, and
13-
**dist/splunk-1.6.4-sources.jar** to the **local**, **staging**, or **production**
12+
Deploy transmits **dist/splunk-1.7.0.jar**, **dist/splunk-1.7.0-javadoc.jar**, and
13+
**dist/splunk-1.7.0-sources.jar** to the **local**, **staging**, or **production**
1414
maven repository. Repository names are mapped to locations as follows.
1515

1616
| repository-name | location |
@@ -21,18 +21,18 @@ maven repository. Repository names are mapped to locations as follows.
2121

2222
After deployment you should find this tree structure at the location of your repository
2323

24-
com/splunk/splunk/1.6.4/
25-
├── splunk-1.6.4-javadoc.jar
26-
├── splunk-1.6.4-javadoc.jar.md5
27-
├── splunk-1.6.4-javadoc.jar.sha1
28-
├── splunk-1.6.4-sources.jar
29-
├── splunk-1.6.4-sources.jar.md5
30-
├── splunk-1.6.4-sources.jar.sha1
31-
├── splunk-1.6.4.jar
32-
├── splunk-1.6.4.jar.md5
33-
├── splunk-1.6.4.jar.sha1
34-
├── splunk-1.6.4.pom
35-
├── splunk-1.6.4.pom.md5
36-
└── splunk-1.6.4.pom.sha1
24+
com/splunk/splunk/1.7.0/
25+
├── splunk-1.7.0-javadoc.jar
26+
├── splunk-1.7.0-javadoc.jar.md5
27+
├── splunk-1.7.0-javadoc.jar.sha1
28+
├── splunk-1.7.0-sources.jar
29+
├── splunk-1.7.0-sources.jar.md5
30+
├── splunk-1.7.0-sources.jar.sha1
31+
├── splunk-1.7.0.jar
32+
├── splunk-1.7.0.jar.md5
33+
├── splunk-1.7.0.jar.sha1
34+
├── splunk-1.7.0.pom
35+
├── splunk-1.7.0.pom.md5
36+
└── splunk-1.7.0.pom.sha1
3737

3838
Verify this structure prior to release.

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<dependency>
3737
<groupId>com.splunk</groupId>
3838
<artifactId>splunk</artifactId>
39-
<version>1.6.5</version>
39+
<version>1.7.0</version>
4040
<scope>provided</scope>
4141
</dependency>
4242
<dependency>

pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<modelVersion>4.0.0</modelVersion>
77

88
<properties>
9-
<version.number>1.6.5</version.number>
9+
<version.number>1.7.0</version.number>
1010
<maven.resources.overwrite>true</maven.resources.overwrite>
1111
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1212
<maven.compiler.source>8</maven.compiler.source>
@@ -60,12 +60,6 @@
6060
<artifactId>maven-deploy-plugin</artifactId>
6161
<version>3.0.0-M1</version>
6262
<configuration>
63-
<!-- Below altDeploymentRepository is used for local deployment. Commented out for now. -->
64-
<!--
65-
<altDeploymentRepository>
66-
localRepository::default::file:./target/local-deploy
67-
</altDeploymentRepository>
68-
-->
6963
<skip>true</skip>
7064
</configuration>
7165
</plugin>

splunk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<artifactId>splunk</artifactId>
8-
<version>1.6.5</version>
8+
<version>1.7.0</version>
99
<parent>
1010
<artifactId>splunk-sdk-java</artifactId>
1111
<groupId>com.splunk</groupId>

splunk/src/main/java/com/splunk/HttpService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public boolean verify(String s, SSLSession sslSession) {
8080
private String prefix = null;
8181

8282
static Map<String, String> defaultHeader = new HashMap<String, String>() {{
83-
put("User-Agent", "splunk-sdk-java/1.6.4");
83+
put("User-Agent", "splunk-sdk-java/1.7.0");
8484
put("Accept", "*/*");
8585
}};
8686

0 commit comments

Comments
 (0)