Skip to content

Commit

Permalink
Merge pull request #5 from DirectProjectJavaRI/develop
Browse files Browse the repository at this point in the history
Releasing 8.0.0
  • Loading branch information
Greg Meyer authored Aug 3, 2021
2 parents 7689557 + 371632e commit 4333987
Show file tree
Hide file tree
Showing 11 changed files with 258 additions and 35 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
hs_err_pid*
/.classpath
/.project
/target/
43 changes: 20 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.nhind</groupId>
<artifactId>config-manager</artifactId>
<version>6.0.1</version>
<version>8.0.0</version>
<packaging>jar</packaging>
<name>NHIN Direct Java configuration manager</name>
<description>NHIN Direct Java configuration manager</description>
<url>https://github.com/DirectProjectJavaRI/config-manager</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<version>2.5.2</version>
<relativePath />
</parent>
<scm>
Expand All @@ -28,7 +28,7 @@
</developer>
</developers>
<prerequisites>
<maven>3.0.0</maven>
<maven>3.5.0</maven>
</prerequisites>
<licenses>
<license>
Expand All @@ -38,7 +38,7 @@
</licenses>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring-cloud-dependencies.version>Greenwich.SR1</spring-cloud-dependencies.version>
<spring-cloud-dependencies.version>2020.0.3</spring-cloud-dependencies.version>
</properties>
<dependencyManagement>
<dependencies>
Expand All @@ -52,20 +52,24 @@
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>config-service-client</artifactId>
<version>6.0</version>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>direct-common</artifactId>
<version>6.0.1</version>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>org.nhind</groupId>
<artifactId>agent</artifactId>
<version>6.0.2</version>
<version>8.0.0</version>
</dependency>
</dependencies>
<build>
Expand All @@ -88,9 +92,8 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOption>-Xdoclint:none</additionalJOption>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
Expand All @@ -108,7 +111,8 @@
</goals>
</execution>
</executions>
</plugin>
</plugin>
<!-- for releases only
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -121,22 +125,22 @@
</goals>
</execution>
</executions>
</plugin>
<version>3.0.1</version>
</plugin>
-->
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
<additionalJOption>-Xdoclint:none</additionalJOption>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
Expand All @@ -160,6 +164,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand All @@ -181,15 +186,7 @@
</configuration>
</plugin>
</plugins>
</reporting>
<repositories>
<!-- Temp repository for Spring Boot Milestone -->
<repository>
<id>spring-milestone</id>
<name>Spring Milestone Releases</name>
<url>https://repo.spring.io/milestone/</url>
</repository>
</repositories>
</reporting>
<distributionManagement>
<site>
<id>nhind-site</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public AddressCommands(AddressService addressService)
}

@Command(name = "ListAddressesByDomain", usage = LIST_ADDRESSES_BY_DOMAIN)
public void listCerts(String[] args)
public void listAddresesByDomain(String[] args)
{

String domain = StringArrayUtil.getRequiredValue(args, 0);
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/nhindirect/config/manager/CertCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,11 @@ public void removeCertByTP(String[] args)

try
{

final Certificate cert = certService.getCertificatesByOwnerAndThumbprint("", tp);
final Certificate cert = certService.getCertificatesByOwnerAndThumbprint(" ", tp);

if (cert == null)
{
System.out.println("Certificate with thumbprint." + tp + " cannot be found in the system");
System.out.println("Certificate with thumbprint " + tp + " cannot be found in the system");
return;
}

Expand Down
11 changes: 8 additions & 3 deletions src/main/java/org/nhindirect/config/manager/ConfigManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
import org.nhindirect.common.tooling.Commands;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;

@SpringBootApplication
@SpringBootApplication(exclude= {R2dbcAutoConfiguration.class})
public class ConfigManager implements CommandLineRunner
{
@Autowired
Expand Down Expand Up @@ -55,7 +57,7 @@ public class ConfigManager implements CommandLineRunner
*/
public static void main(String[] args)
{
SpringApplication.run(ConfigManager.class, args);
new SpringApplicationBuilder(ConfigManager.class).web(WebApplicationType.NONE).run(args);
}

public void run(String... args)
Expand Down Expand Up @@ -121,6 +123,9 @@ public boolean runApp(String[] args)

commands.register(new AddressCommands(addressService));

commands.register(new PerformanceCommands(anchorService, domainService, certService,
certPolicyService, settingService, dnsService, addressService, bundleService));

if (args != null && args.length > 0)
{
return commands.run(args);
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/org/nhindirect/config/manager/DomainCommands.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.nhindirect.config.manager;

import java.util.Arrays;
import java.util.Collection;

import org.nhind.config.rest.DomainService;
Expand All @@ -14,6 +15,8 @@ public class DomainCommands
{
private static final String LIST_DOMAINS_USAGE = "Lists domains in the system";

private static final String GET_DOMAINS_USAGE = "Gets domain's infomation on the system. The domain name must be an exact match";

private static final String ADD_DOMAIN_USAGE = "Adds a domain to the system." +
"\r\n domainName postmasterEmail " +
"\r\n\t domainName: The name of the new domain." +
Expand Down Expand Up @@ -57,6 +60,33 @@ public void listDomains(String[] args)

}


@Command(name = "GetDomain", usage = GET_DOMAINS_USAGE)
public void getDomain(String[] args)
{
final String domainName = StringArrayUtil.getRequiredValue(args, 0);

// get them all
try
{
final Domain domain = domainService.getDomain(domainName);
if (domain == null)
{
System.out.println("Domain " + domainName + " is not in the system.");
return;
}

domainPrinter.printRecords(Arrays.asList(domain));
}
catch (Exception e)
{
e.printStackTrace();
System.err.println("Failed to retrieve domains: " + e.getMessage());
}

}


@Command(name = "AddDomain", usage = ADD_DOMAIN_USAGE)
public void addDomain(String[] args)
{
Expand Down
Loading

0 comments on commit 4333987

Please sign in to comment.