Skip to content

Commit dc1415f

Browse files
authored
Merge pull request #5 from sentrysoftware/feature/4-open-source-the-internal-http-client-project
[#4] Open-source the internal HTTP client project
2 parents 7f7b902 + 7ee4128 commit dc1415f

File tree

15 files changed

+1619
-67
lines changed

15 files changed

+1619
-67
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
# oss-maven-template
1+
# HTTP Java Client
22

3-
![GitHub release (with filter)](https://img.shields.io/github/v/release/sentrysoftware/oss-maven-template)
4-
![Build](https://img.shields.io/github/actions/workflow/status/sentrysoftware/oss-maven-template/deploy.yml)
5-
![GitHub top language](https://img.shields.io/github/languages/top/sentrysoftware/oss-maven-template)
6-
![License](https://img.shields.io/github/license/sentrysoftware/oss-maven-template)
3+
![GitHub release (with filter)](https://img.shields.io/github/v/release/sentrysoftware/http)
4+
![Build](https://img.shields.io/github/actions/workflow/status/sentrysoftware/http/deploy.yml)
5+
![GitHub top language](https://img.shields.io/github/languages/top/sentrysoftware/http)
6+
![License](https://img.shields.io/github/license/sentrysoftware/http)
77

8-
Repository template for all Sentry open-source Java projects, published on Maven Central.
8+
The HTTP Java Client is a simple Java library that facilitates the execution of HTTP requests. Built on Java's HttpURLConnection, it requires no external dependencies and supports various HTTP methods (GET, POST, PUT, DELETE).
9+
10+
See **[Project Documentation](https://sentrysoftware.github.io/http)** and the [Javadoc](https://sentrysoftware.github.io/http/apidocs) for more information on how to use this library in your code.
911

1012
## Build instructions
1113

pom.xml

Lines changed: 82 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
<modelVersion>4.0.0</modelVersion>
33

44
<groupId>org.sentrysoftware</groupId>
5-
<artifactId>MYARTIFACT</artifactId>
6-
<name>MY PROJECT</name>
7-
<version>0.1.00-SNAPSHOT</version>
8-
<description>SOME DESCRIPTION</description>
9-
<packaging>jar</packaging>
5+
<artifactId>http</artifactId>
6+
<name>HTTP Java Client</name>
7+
<version>1.0.00-SNAPSHOT</version>
8+
<description>HTTP Client for Java</description>
9+
<packaging>jar</packaging>
1010

1111
<organization>
1212
<name>Sentry Software</name>
1313
<url>https://sentrysoftware.com</url>
1414
</organization>
1515

16-
<url>https://github.com/sentrysoftware/MYREPO</url>
16+
<url>https://sentrysoftware.github.io/http</url>
1717
<inceptionYear>2023</inceptionYear>
1818

1919
<distributionManagement>
@@ -37,28 +37,49 @@
3737

3838
<issueManagement>
3939
<system>GitHub</system>
40-
<url>https://github.com/sentrysoftware/MYREPO/issues/</url>
40+
<url>https://github.com/sentrysoftware/http/issues/</url>
4141
</issueManagement>
4242

4343
<scm>
44-
<connection>scm:git:https://github.com/sentrysoftware/MYREPO.git</connection>
45-
<url>https://github.com/sentrysoftware/MYREPO</url>
44+
<connection>scm:git:https://github.com/sentrysoftware/http.git</connection>
45+
<url>https://github.com/sentrysoftware/http</url>
4646
<tag>HEAD</tag>
4747
</scm>
4848

4949
<developers>
5050
<developer>
51-
<name>MY NAME (@MY_ID)</name>
52-
<email>MYNAME@sentrysoftware.com</email>
51+
<name>Bertrand Martin (@bertysentry)</name>
52+
<email>bertrand@sentrysoftware.com</email>
5353
<roles>
54-
<role>Project founder</role>
54+
<role>maintainer</role>
55+
</roles>
56+
</developer>
57+
<developer>
58+
<name>Nassim Boutekedjiret (@NassimBtk)</name>
59+
<email>[email protected]</email>
60+
<roles>
61+
<role>maintainer</role>
62+
</roles>
63+
</developer>
64+
<developer>
65+
<name>Kawtar Bakour (@KawtarBK9)</name>
66+
<email>[email protected]</email>
67+
<roles>
68+
<role>maintainer</role>
69+
</roles>
70+
</developer>
71+
<developer>
72+
<name>Elyes Cherfa (@CherfaElyes)</name>
73+
<email>[email protected]</email>
74+
<roles>
75+
<role>maintainer</role>
5576
</roles>
5677
</developer>
5778
</developers>
5879

5980
<properties>
60-
<!-- Java 11 -->
61-
<maven.compiler.release>11</maven.compiler.release>
81+
<!-- Java 8 -->
82+
<maven.compiler.release></maven.compiler.release>
6283

6384
<!-- UTF-8 -->
6485
<project.build.encoding>UTF-8</project.build.encoding>
@@ -93,6 +114,11 @@
93114
<artifactId>junit-jupiter-engine</artifactId>
94115
<scope>test</scope>
95116
</dependency>
117+
<dependency>
118+
<groupId>org.junit.jupiter</groupId>
119+
<artifactId>junit-jupiter-params</artifactId>
120+
<scope>test</scope>
121+
</dependency>
96122
</dependencies>
97123

98124
<build>
@@ -107,9 +133,16 @@
107133
<version>3.6.3</version>
108134
<configuration>
109135
<detectJavaApiLink>false</detectJavaApiLink>
110-
<source>${maven.compiler.release}</source>
136+
<release>8</release>
111137
<show>public</show>
112138
<notimestamp>true</notimestamp>
139+
<failOnError>false</failOnError>
140+
<sourceFileIncludes>
141+
<include>org/sentrysoftware/http/HttpClient.java</include>
142+
<include>org/sentrysoftware/http/HttpResponse.java</include>
143+
<include>org/sentrysoftware/http/ProtocolOverridingSSLSocketFactory.java</include>
144+
</sourceFileIncludes>
145+
<sourcepath>${basedir}/src/main/java</sourcepath>
113146
</configuration>
114147
</plugin>
115148

@@ -123,6 +156,23 @@
123156
<plugin>
124157
<artifactId>maven-compiler-plugin</artifactId>
125158
<version>3.12.1</version>
159+
<executions>
160+
<execution>
161+
<id>compile-java-21</id>
162+
<phase>compile</phase>
163+
<goals>
164+
<goal>compile</goal>
165+
</goals>
166+
<configuration>
167+
<release>17</release>
168+
<compileSourceRoots>
169+
<compileSourceRoot>${basedir}/src/main/java21</compileSourceRoot>
170+
</compileSourceRoots>
171+
<multiReleaseOutput>false</multiReleaseOutput>
172+
<outputDirectory>${project.build.outputDirectory}/META-INF/versions/21</outputDirectory>
173+
</configuration>
174+
</execution>
175+
</executions>
126176
</plugin>
127177

128178
<!-- source -->
@@ -183,7 +233,7 @@
183233
<artifactId>maven-javadoc-plugin</artifactId>
184234
<executions>
185235
<execution>
186-
<id>attach-javadocs</id>
236+
<id>attach-javadocs</id>
187237
<goals>
188238
<goal>jar</goal>
189239
</goals>
@@ -195,6 +245,12 @@
195245
<plugin>
196246
<artifactId>maven-surefire-plugin</artifactId>
197247
<version>3.2.3</version>
248+
<configuration>
249+
<argLine>
250+
--add-exports java.base/sun.net.www.protocol.http=ALL-UNNAMED
251+
--add-exports java.base/sun.security.ssl=ALL-UNNAMED
252+
</argLine>
253+
</configuration>
198254
</plugin>
199255

200256
<!-- site -->
@@ -214,6 +270,14 @@
214270
<plugin>
215271
<artifactId>maven-jar-plugin</artifactId>
216272
<version>3.3.0</version>
273+
<configuration>
274+
<archive>
275+
<manifestEntries>
276+
<Add-Opens>java.base/java.lang java.base/java.util java.base/sun.net.www.protocol.http java.base/sun.security.ssl</Add-Opens>
277+
<Multi-Release>true</Multi-Release>
278+
</manifestEntries>
279+
</archive>
280+
</configuration>
217281
</plugin>
218282

219283
<!-- install -->
@@ -259,7 +323,7 @@
259323
<linkXref>true</linkXref>
260324
<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
261325
<minimumTokens>50</minimumTokens>
262-
<targetJdk>${maven.compiler.release}</targetJdk>
326+
<targetJdk>8</targetJdk>
263327
</configuration>
264328
</plugin>
265329

@@ -321,7 +385,7 @@
321385

322386
<profiles>
323387

324-
<!-- Profile for releasing the project -->
388+
<!-- Profile for releasing the project -->
325389
<profile>
326390
<id>release</id>
327391
<build>

src/main/java/org/sentrysoftware/example/Example.java

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

0 commit comments

Comments
 (0)