Skip to content

Commit e1d2647

Browse files
author
Jenkins
committed
Version: 5.3.0 (2022-12-15-08:08:31)
1 parent 8b4d8fa commit e1d2647

File tree

36 files changed

+107
-1059
lines changed

36 files changed

+107
-1059
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.m2/
2+
.idea/
3+
*.class
4+
*.log
5+
**/*.iml
6+
target/
7+
DevOps
8+
.m2

.gitignore-original

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*.iml
2+
.idea/
3+
target/
4+
5+
dependency-reduced-pom.xml
6+
7+
*.log

.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_3.xml

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

.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_3.xml

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

.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_5_4.xml

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

.idea/libraries/Maven__org_nameapi_ontology_core_nameapi_ontology5_core_5_0_2.xml

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

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ Then you need an executor and a mode:
4242

4343
```java
4444
CommandExecutor executor = NameApiRemoteExecutors.get();
45-
Mode mode = NameApiModeFactory.withContext(
45+
Mode mode = NameApiModeFactory.withContext(
4646
"your-api-key",
4747
context,
4848
//the default and live server is "api.nameapi.org"
4949
new Host("api.nameapi.org", Protocol.HTTPS), NameApiPortUrlFactory.version5_3())
50-
);
50+
);
5151
```
5252

5353
Now you're ready to execute commands.
@@ -61,7 +61,7 @@ This code sends a simple ping to nameapi to test the connection:
6161

6262
```java
6363
PingCommand command = new PingCommand();
64-
executor.execute(command, mode, null).get(); //returns "pong"
64+
executor.execute(command, mode, null).get(); //returns "pong"
6565
```
6666

6767

@@ -89,7 +89,7 @@ Creating a simple person looks something like this:
8989

9090
```java
9191
InputPersonName name = NameBuilders.western().fullname("John F. Kennedy").build();
92-
InputPerson inputPerson = new NaturalInputPersonBuilder().name(name).build();
92+
InputPerson inputPerson = new NaturalInputPersonBuilder().name(name).build();
9393
```
9494

9595

@@ -112,7 +112,7 @@ Using the objects created earlier:
112112

113113
```java
114114
PersonNameParserCommand command = new PersonNameParserCommand();
115-
PersonNameParserResult result = executor.execute(command, mode, inputPerson).get();
115+
PersonNameParserResult result = executor.execute(command, mode, inputPerson).get();
116116
```
117117

118118

@@ -124,7 +124,7 @@ Using the objects created earlier:
124124

125125
```java
126126
PersonGenderizerCommand command = new PersonGenderizerCommand();
127-
GenderizerResult result = executor.execute(command, mode, inputPerson).get();
127+
GenderizerResult result = executor.execute(command, mode, inputPerson).get();
128128
```
129129

130130

@@ -136,10 +136,10 @@ This service takes 2 people as input:
136136

137137
```java
138138
PersonMatcherCommand command = new PersonMatcherCommand();
139-
NaturalInputPerson person1 = new NaturalInputPersonBuilder().name( NameBuilders.western().fullname("John F. Kennedy").build() ).build();
140-
NaturalInputPerson person2 = new NaturalInputPersonBuilder().name( NameBuilders.western().fullname("Jack Kennedy").build() ).build();
141-
PersonMatcherArgument argument = new PersonMatcherArgument(person1, person2);
142-
PersonMatcherResult result = executor.execute(command, mode, argument).get();
139+
NaturalInputPerson person1 = new NaturalInputPersonBuilder().name( NameBuilders.western().fullname("John F. Kennedy").build() ).build();
140+
NaturalInputPerson person2 = new NaturalInputPersonBuilder().name( NameBuilders.western().fullname("Jack Kennedy").build() ).build();
141+
PersonMatcherArgument argument = new PersonMatcherArgument(person1, person2);
142+
PersonMatcherResult result = executor.execute(command, mode, argument).get();
143143
```
144144

145145

@@ -149,10 +149,10 @@ The Name Formatter displays personal names in the desired form. This includes th
149149

150150
```java
151151
PersonNameFormatterCommand command = new PersonNameFormatterCommand();
152-
NaturalInputPerson person = new NaturalInputPersonBuilder().name( NameBuilders.western().fullname("john f. kennedy").build() ).build();
153-
FormatterProperties properties = new FormatterProperties(true);
154-
PersonNameFormatterArgument argument = new PersonNameFormatterArgument(person, properties);
155-
FormatterResult formatterResult = executor.execute(command, mode, argument).get();
152+
NaturalInputPerson person = new NaturalInputPersonBuilder().name( NameBuilders.western().fullname("john f. kennedy").build() ).build();
153+
FormatterProperties properties = new FormatterProperties(true);
154+
PersonNameFormatterArgument argument = new PersonNameFormatterArgument(person, properties);
155+
FormatterResult formatterResult = executor.execute(command, mode, argument).get();
156156
```
157157

158158

@@ -162,7 +162,7 @@ The Email Name Parser extracts names out of email addresses.
162162

163163
```java
164164
EmailNameParserCommand command = new EmailNameParserCommand();
165-
EmailNameParserResult result = executor.execute(command, mode, "[email protected]").get();
165+
EmailNameParserResult result = executor.execute(command, mode, "[email protected]").get();
166166
```
167167

168168

@@ -172,6 +172,6 @@ The DEA-Detector checks email addresses against a list of known "trash domains"
172172

173173
```java
174174
DisposableEmailAddressDetectorCommand command = new DisposableEmailAddressDetectorCommand();
175-
DisposableEmailAddressDetectorResult result = executor.execute(command, mode, "[email protected]").get();
175+
DisposableEmailAddressDetectorResult result = executor.execute(command, mode, "[email protected]").get();
176176
```
177177

pom.xml

Lines changed: 73 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>org.nameapi.client</groupId>
66
<artifactId>nameapi-client</artifactId>
77
<name>nameapi-client</name>
8-
<version>5.3.0-SNAPSHOT</version>
8+
<version>5.3.0</version>
99

1010
<url>https://github.com/optimaize/nameapi-client-java</url>
1111
<description>
@@ -41,10 +41,25 @@
4141
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4242
<java.version>1.8</java.version>
4343
<anythingworks.version>0.5</anythingworks.version>
44-
<ontology.version>5.3.2</ontology.version>
44+
<ontology.version>5.3.4</ontology.version>
4545
<swagger-annotations-version>1.5.4</swagger-annotations-version>
46+
<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
47+
<repo-base-url>https://artif4ctory.optimaize.com</repo-base-url>
4648
</properties>
4749

50+
<repositories>
51+
<repository>
52+
<id>optimaize-release</id>
53+
<url>${repo-base-url}/artifactory/libs-release-local</url>
54+
<releases><enabled>true</enabled></releases>
55+
</repository>
56+
<repository>
57+
<id>optimaize-snapshot</id>
58+
<url>${repo-base-url}/artifactory/libs-snapshot-local</url>
59+
<snapshots><enabled>true</enabled></snapshots>
60+
</repository>
61+
</repositories>
62+
4863
<build>
4964
<resources>
5065
<resource><!-- this is default, but because we tamper with the resources, we need to explicitly mention it. -->
@@ -63,7 +78,7 @@
6378
<plugin>
6479
<groupId>org.apache.maven.plugins</groupId>
6580
<artifactId>maven-compiler-plugin</artifactId>
66-
<version>2.3.2</version>
81+
<version>3.5.1</version>
6782
<configuration>
6883
<source>${java.version}</source>
6984
<target>${java.version}</target>
@@ -73,7 +88,7 @@
7388
<plugin>
7489
<groupId>org.apache.maven.plugins</groupId>
7590
<artifactId>maven-source-plugin</artifactId>
76-
<version>2.2.1</version>
91+
<version>3.0.0</version>
7792
<executions>
7893
<execution>
7994
<id>attach-sources</id>
@@ -122,42 +137,58 @@
122137
<mavenExecutorId>forked-path</mavenExecutorId>
123138
</configuration>
124139
</plugin>
125-
126-
<plugin>
127-
<artifactId>maven-gpg-plugin</artifactId>
128-
<version>1.4</version>
129-
</plugin>
130140
</plugins>
131141
</build>
132142

133-
<distributionManagement>
134-
<snapshotRepository>
135-
<id>sonatype-nexus-snapshots</id>
136-
<name>Sonatype Nexus snapshot repository</name>
137-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
138-
</snapshotRepository>
139-
<repository>
140-
<id>sonatype-nexus-staging</id>
141-
<name>Sonatype Nexus release repository</name>
142-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
143-
</repository>
144-
</distributionManagement>
145143

146144
<profiles>
145+
<profile>
146+
<id>do-not-release-sign-artifacts</id>
147+
<activation>
148+
<activeByDefault>true</activeByDefault>
149+
</activation>
150+
<build>
151+
</build>
152+
</profile>
153+
154+
<profile>
155+
<!-- make the build work with Java7 and Java8 out of the box, see
156+
https://stackoverflow.com/questions/22528767/how-to-work-around-the-stricter-java-8-javadoc-when-using-maven -->
157+
<id>disable-java8-doclint</id>
158+
<activation>
159+
<jdk>[1.8,)</jdk>
160+
</activation>
161+
<properties>
162+
<additionalparam>-Xdoclint:none</additionalparam>
163+
</properties>
164+
</profile>
165+
147166
<profile>
148167
<id>release-sign-artifacts</id>
149168
<activation>
150169
<property>
151170
<name>performRelease</name>
152171
<value>true</value>
153172
</property>
173+
<activeByDefault>false</activeByDefault>
154174
</activation>
155175
<build>
156176
<plugins>
177+
<plugin>
178+
<groupId>org.sonatype.plugins</groupId>
179+
<artifactId>nexus-staging-maven-plugin</artifactId>
180+
<version>1.6.7</version>
181+
<extensions>true</extensions>
182+
<configuration>
183+
<serverId>ossrh</serverId>
184+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
185+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
186+
</configuration>
187+
</plugin>
157188
<plugin>
158189
<groupId>org.apache.maven.plugins</groupId>
159190
<artifactId>maven-gpg-plugin</artifactId>
160-
<version>1.4</version>
191+
<version>${maven-gpg-plugin.version}</version>
161192
<!--<configuration>-->
162193
<!--<passphrase>${gpg.passphrase}</passphrase>-->
163194
<!--</configuration>-->
@@ -168,6 +199,11 @@
168199
<goals>
169200
<goal>sign</goal>
170201
</goals>
202+
<configuration>
203+
<gpgArguments>
204+
<arg>--batch</arg>
205+
</gpgArguments>
206+
</configuration>
171207
</execution>
172208
</executions>
173209
</plugin>
@@ -176,6 +212,20 @@
176212
</profile>
177213
</profiles>
178214

215+
216+
<distributionManagement>
217+
<snapshotRepository>
218+
<id>sonatype-nexus-snapshots</id>
219+
<name>Sonatype Nexus snapshot repository</name>
220+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
221+
</snapshotRepository>
222+
<repository>
223+
<id>sonatype-nexus-staging</id>
224+
<name>Sonatype Nexus release repository</name>
225+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
226+
</repository>
227+
</distributionManagement>
228+
179229
<dependencies>
180230
<dependency>
181231
<groupId>com.optimaize.anythingworks.client.rest</groupId>
@@ -214,7 +264,7 @@
214264
<dependency>
215265
<groupId>ch.qos.logback</groupId>
216266
<artifactId>logback-classic</artifactId>
217-
<version>1.2.0</version>
267+
<version>1.1.3</version>
218268
<scope>test</scope>
219269
</dependency>
220270
</dependencies>

src/main/java/org/nameapi/client/lib/NameApiPortUrlFactory.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,6 @@ public static NameApiPortUrlFactory versionLatestStable() {
2121
return version5_3();
2222
}
2323

24-
/**
25-
* This is always set to the latest release candidate, that is the version right before it becomes the latest stable.
26-
* Such a version does not always exist. After successful testing, it becomes the live version.
27-
*
28-
* Currently there is no release candidate available, so it returns the stable version.
29-
*/
30-
public static NameApiPortUrlFactory versionLatestReleaseCandidate() {
31-
return version5_3();
32-
}
33-
34-
3524
public static NameApiPortUrlFactory version5_3() {
3625
return new NameApiPortUrlFactory("5.3");
3726
}

0 commit comments

Comments
 (0)