Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Correct gradle build
Browse files Browse the repository at this point in the history
Signed-off-by: Mandy Chessell <[email protected]>
  • Loading branch information
mandy-chessell committed Jan 8, 2023
1 parent b652cf7 commit 95eab99
Show file tree
Hide file tree
Showing 15 changed files with 237 additions and 140 deletions.
4 changes: 4 additions & 0 deletions asset-set-up/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.odpi.egeria</groupId>
<artifactId>platform-services-client</artifactId>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException;
import org.odpi.openmetadata.frameworks.connectors.properties.AssetUniverse;
import org.odpi.openmetadata.http.HttpHelper;
import org.odpi.openmetadata.platformservices.client.PlatformServicesClient;

import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -106,6 +107,38 @@ private AssetSetUp(String serverName,
}


/**
* Retrieve the version of the platform. This fails if the platform is not running or the endpoint is populated by a service that is not an
* OMAG Server Platform.
*
* @return platform version or null
*/
private String getPlatformOrigin()
{
try
{
/*
* This client is from the platform services module and queries the runtime state of the platform and the servers that are running on it.
*/
PlatformServicesClient platformServicesClient = new PlatformServicesClient("MyPlatform", platformURLRoot);

/*
* This is the first call to the platform and determines the version of the software.
* If the platform is not running, or the remote service is not an OMAG Server Platform,
* the utility fails at this point.
*/
return platformServicesClient.getPlatformOrigin(clientUserId);
}
catch (Exception error)
{
System.out.println("\n\nThere was an " + error.getClass().getName() + " exception when calling the platform. Error message is: " + error.getMessage());
System.out.println("Ensure the platform URl is correct and the platform is running");
}

return null;
}


/**
* Maintain a list of assets that this utility knows about.
*
Expand Down Expand Up @@ -181,7 +214,7 @@ private void addCSVAsset(String fileName,
{
/*
* This creates the asset for the file - and also assets for the directories above if they do not already exist. The call to
* addAssetsToMaps saves all of the guids for later processing.
* addAssetsToMaps saves all the guids for later processing.
*/
String assetGUID = this.addAssetsToMaps(csvOnboardingClient.addCSVFileToCatalog(clientUserId,
fileName,
Expand Down Expand Up @@ -386,6 +419,18 @@ public static void main(String[] args)
{
AssetSetUp assetSetUp = new AssetSetUp(serverName, platformURLRoot, clientUserId);

String platformOrigin = assetSetUp.getPlatformOrigin();

if (platformOrigin != null)
{
System.out.print(" - " + platformOrigin);
}
else
{
System.out.println();
System.exit(-1);
}

assetSetUp.run();
}
catch (Exception error)
Expand Down
12 changes: 6 additions & 6 deletions component-id-report/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ dependencies {
implementation "org.odpi.egeria:repository-services-apis"
implementation "org.odpi.egeria:admin-services-api"
implementation "org.odpi.egeria:integration-daemon-services-registration"
implementation "org.odpi.egeria:cohort-registry-file-store-connector"
implementation "org.odpi.egeria:open-metadata-archive-file-connector"
implementation "org.odpi.egeria:open-metadata-archive-directory-connector"
implementation "org.odpi.egeria:inmemory-repository-connector"
implementation "org.odpi.egeria:omrs-rest-repository-connector"
implementation "org.odpi.egeria:open-metadata-security-samples"
runtimeOnly "org.odpi.egeria:cohort-registry-file-store-connector"
runtimeOnly "org.odpi.egeria:open-metadata-archive-file-connector"
runtimeOnly "org.odpi.egeria:open-metadata-archive-directory-connector"
runtimeOnly "org.odpi.egeria:inmemory-repository-connector"
runtimeOnly "org.odpi.egeria:omrs-rest-repository-connector"
runtimeOnly "org.odpi.egeria:open-metadata-security-samples"
runtimeOnly 'ch.qos.logback:logback-classic'
}

Expand Down
2 changes: 1 addition & 1 deletion database-report/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

dependencies {
implementation "org.odpi.egeria:egeria-report-utilities"
implementation project(":egeria-report-utilities")
implementation "org.odpi.egeria:open-connector-framework"
implementation "org.odpi.egeria:data-manager-api"
implementation "org.odpi.egeria:data-manager-client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ private void locateDatabase()

String command = null;
int pageSize = 10;
int startFrom = 0 - pageSize;
int startFrom = - pageSize;

try
{
Expand Down Expand Up @@ -226,7 +226,7 @@ private void displayDatabaseSummary(DatabaseElement databaseElement,
{
System.out.print("| " + databaseElement.getElementHeader().getGUID());
System.out.print(" | " + databaseElement.getDatabaseProperties().getQualifiedName());
System.out.print(" | " + databaseElement.getDatabaseProperties().getDisplayName());
System.out.print(" | " + databaseElement.getDatabaseProperties().getName());
System.out.print(" | " + databaseElement.getDatabaseProperties().getDescription());
System.out.println(" |");
}
Expand All @@ -244,16 +244,16 @@ private void displayDatabase(String databaseGUID)
{
DatabaseElement databaseElement = databaseManagerClient.getDatabaseByGUID(clientUserId, databaseGUID);

EgeriaReport report = new EgeriaReport("Database " + databaseElement.getDatabaseProperties().getDisplayName());
EgeriaReport report = new EgeriaReport("Database " + databaseElement.getDatabaseProperties().getName());

final String reportTitle = "Database report for: ";
report.printReportTitle(0, reportTitle + databaseElement.getDatabaseProperties().getDisplayName() + " on server: " + serverName);
report.printReportTitle(0, reportTitle + databaseElement.getDatabaseProperties().getName() + " on server: " + serverName);

report.printElementInTable(0,
true,
databaseElement.getElementHeader().getGUID(),
databaseElement.getDatabaseProperties().getQualifiedName(),
databaseElement.getDatabaseProperties().getDisplayName(),
databaseElement.getDatabaseProperties().getName(),
databaseElement.getDatabaseProperties().getDescription());

/*
Expand Down Expand Up @@ -490,7 +490,7 @@ private void createSampleDatabase(String databaseManagerGUID,
DatabaseSchemaProperties databaseSchemaProperties = new DatabaseSchemaProperties();

databaseSchemaProperties.setQualifiedName(databaseName + "." + schemaName);
databaseSchemaProperties.setDisplayName(schemaName);
databaseSchemaProperties.setName(schemaName);
databaseSchemaProperties.setDescription("Database schema definition called " + schemaName + " with " + numberOfTables + " tables.");

String databaseSchemaGUID = databaseManagerClient.createDatabaseSchema(clientUserId,
Expand Down
1 change: 1 addition & 0 deletions egeria-config-utility/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies {
implementation "org.odpi.egeria:admin-services-client"
implementation "org.odpi.egeria:platform-services-client"
implementation "org.odpi.egeria:http-helper"
implementation 'org.odpi.egeria:ffdc-services:3.15-SNAPSHOT'
runtimeOnly 'ch.qos.logback:logback-classic'
}

Expand Down
4 changes: 0 additions & 4 deletions egeria-infrastructure-catalog-connector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* Copyright Contributors to the ODPi Egeria project.
*/

plugins {
id 'application'
id "com.github.johnrengelman.shadow"
}

dependencies {
implementation "org.odpi.egeria:audit-log-framework"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.odpi.openmetadata.http.HttpHelper;
import org.odpi.openmetadata.platformservices.client.PlatformServicesClient;
import org.odpi.openmetadata.platformservices.properties.OMAGServerInstanceHistory;
import org.odpi.openmetadata.platformservices.properties.ServerStatus;
import org.odpi.openmetadata.repositoryservices.clients.MetadataHighwayServicesClient;
import org.odpi.openmetadata.repositoryservices.connectors.stores.cohortregistrystore.properties.MemberRegistration;
import org.odpi.openmetadata.repositoryservices.properties.CohortConnectionStatus;
Expand Down Expand Up @@ -180,7 +181,7 @@ private void run()
{
if (serverName != null)
{
org.odpi.openmetadata.platformservices.properties.ServerStatus platformServerStatus = platformServicesClient.getServerStatus(clientUserId, serverName);
ServerStatus platformServerStatus = platformServicesClient.getServerStatus(clientUserId, serverName);

if (platformServerStatus != null)
{
Expand Down
5 changes: 0 additions & 5 deletions egeria-report-utilities/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
* Copyright Contributors to the ODPi Egeria project.
*/

plugins {
id 'application'
id "com.github.johnrengelman.shadow"
}

dependencies {
implementation "org.odpi.egeria:open-connector-framework"
implementation "org.odpi.egeria:ffdc-services"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
public class EgeriaReport
{
private FileOutputStream fileOutStream;
private final FileOutputStream fileOutStream;


/**
Expand Down Expand Up @@ -289,6 +289,8 @@ public EgeriaReport(String reportFileName) throws IOException

/**
* This adds the last line to the report.
*
* @throws IOException unable to write the report
*/
public void closeReport() throws IOException
{
Expand Down
4 changes: 0 additions & 4 deletions event-display-audit-log-connector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
* Copyright Contributors to the ODPi Egeria project.
*/

plugins {
id 'application'
id "com.github.johnrengelman.shadow"
}

dependencies {
implementation "org.odpi.egeria:open-connector-framework"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 95eab99

Please sign in to comment.