Skip to content

Commit

Permalink
[FAB-16849] Various updates for Java version of FabCar
Browse files Browse the repository at this point in the history
- Update .gitignore
- Use builds on Sonatype, not Nexus
- Enable new discovery as localhost flag

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: Ia0904cedf953b5ecbf6aaf859245a9bb431d3f76
  • Loading branch information
Simon Stone committed Oct 16, 2019
1 parent a42b858 commit 81aabf4
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
4 changes: 3 additions & 1 deletion fabcar/java/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
/target/
.settings/
.classpath
.project
.project
wallet
!wallet/.gitkeep
10 changes: 5 additions & 5 deletions fabcar/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
</build>
<repositories>
<repository>
<id>hyperledger</id>
<name>Hyperledger Nexus</name>
<url>https://nexus.hyperledger.org/content/repositories/snapshots</url>
<id>oss-sonatype</id>
<name>OSS Sonatype</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.hyperledger.fabric-gateway-java</groupId>
<groupId>org.hyperledger.fabric</groupId>
<artifactId>fabric-gateway-java</artifactId>
<version>1.4.0-SNAPSHOT</version>
<version>1.4.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
Expand Down
4 changes: 4 additions & 0 deletions fabcar/java/src/main/java/org/example/ClientApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

public class ClientApp {

static {
System.setProperty("org.hyperledger.fabric.sdk.service_discovery.as_localhost", "true");
}

public static void main(String[] args) throws Exception {
// Load a file system based wallet for managing identities.
Path walletPath = Paths.get("wallet");
Expand Down
4 changes: 4 additions & 0 deletions fabcar/java/src/main/java/org/example/EnrollAdmin.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

public class EnrollAdmin {

static {
System.setProperty("org.hyperledger.fabric.sdk.service_discovery.as_localhost", "true");
}

public static void main(String[] args) throws Exception {

// Create a CA client for interacting with the CA.
Expand Down
4 changes: 4 additions & 0 deletions fabcar/java/src/main/java/org/example/RegisterUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

public class RegisterUser {

static {
System.setProperty("org.hyperledger.fabric.sdk.service_discovery.as_localhost", "true");
}

public static void main(String[] args) throws Exception {

// Create a CA client for interacting with the CA.
Expand Down

0 comments on commit 81aabf4

Please sign in to comment.