Skip to content

Commit 80a36ee

Browse files
committed
Swap to using the published fabric-protos libraries
Signed-off-by: fraVlaca <[email protected]>
1 parent 4f665e3 commit 80a36ee

File tree

91 files changed

+452
-60033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+452
-60033
lines changed

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
This is a Java based implementation of Hyperledger Fabric chaincode shim APIs, which enables development of smart contracts using the Java language.
88

9-
This project creates `fabric-chaincode-protos` and `fabric-chaincode-shim` jar
9+
This project creates `fabric-chaincode-shim` jar
1010
files for developers' consumption and the `hyperledger/fabric-javaenv` docker image
1111
to run Java chaincode.
1212

@@ -16,10 +16,6 @@ Application developers interested in developing Java smart contracts for Hyperle
1616

1717
## Project structure
1818

19-
### fabric-chaincode-protos
20-
21-
Contains the protobuf definition files used by Java shim to communicate with Fabric peers.
22-
2319
### fabric-chaincode-shim
2420

2521
Contains the java shim classes that define Java chaincode API and way to communicate with Fabric peers.

RELEASING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ The following artifacts are created as a result of releasing Fabric Chaincode Ja
66
- [fabric-javaenv](https://hub.docker.com/r/hyperledger/fabric-javaenv)
77
- Java libraries
88
- [fabric-chaincode-shim](https://search.maven.org/search?q=a:fabric-chaincode-shim)
9-
- [fabric-chaincode-protos](https://search.maven.org/search?q=a:fabric-chaincode-protos)
109

1110
**Note:** A docker image with a matching V.R version is required before releasing a new version of Fabric.
1211

build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ subprojects {
5656
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
5757
}
5858

59-
if (!it.name.equals('fabric-chaincode-protos')) {
60-
tasks.withType(JavaCompile) {
61-
options.compilerArgs << "-Xlint:all,-try"
62-
}
63-
}
64-
6559
test {
6660
useJUnitPlatform()
6761
}

ci/azure-pipelines.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ stages:
107107
# Copy the built artifacts to the staging directory, tgz, and the docker image
108108
- script: |
109109
set -ev
110-
./gradlew -Psigning.keyId=${SIGNING_ID} -Psigning.password=${SIGNING_PASSWORD} -Psigning.secretKeyRingFile=${KEYRING_FILE} publishProtosJarPublicationToMavenLocal
111110
./gradlew -Psigning.keyId=${SIGNING_ID} -Psigning.password=${SIGNING_PASSWORD} -Psigning.secretKeyRingFile=${KEYRING_FILE} publishShimJarPublicationToMavenLocal
112111
tar -zcvf localmaven.tgz ${HOME}/.m2/repository/org/hyperledger
113112
docker image save hyperledger/fabric-javaenv | gzip > $(Build.ArtifactStagingDirectory)/fabric-javaenv.tar.gz

ci/publish_jar_nexus.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function abort {
1414
exit -1
1515
}
1616

17-
for binary in shim protos; do
17+
for binary in shim; do
1818
echo "Pushing fabric-chaincode-$binary.$PUSH_VERSION.jar to maven releases.."
1919
cp $WORKSPACE/fabric-chaincode-$binary/build/libs/fabric-chaincode-$binary-$PUSH_VERSION.jar $WORKSPACE/fabric-chaincode-$binary/build/libs/fabric-chaincode-$binary.$PUSH_VERSION.jar
2020
mvn org.apache.maven.plugins:maven-deploy-plugin:deploy-file \

examples/fabric-contract-example-maven/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
</dependency>
4747

4848
<dependency>
49-
<groupId>org.hyperledger.fabric-chaincode-java</groupId>
50-
<artifactId>fabric-chaincode-protos</artifactId>
51-
<version>${fabric-chaincode-java.version}</version>
49+
<groupId>org.hyperledger.fabric</groupId>
50+
<artifactId>fabric-protos</artifactId>
51+
<version>0.1.3</version>
5252
<scope>compile</scope>
5353
</dependency>
5454

fabric-chaincode-docker/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ RUN chmod +x /root/chaincode-java/build.sh
3232
WORKDIR /root/chaincode-java/shim-src
3333
RUN gradle \
3434
clean \
35-
fabric-chaincode-protos:build \
36-
fabric-chaincode-protos:publishToMavenLocal \
3735
fabric-chaincode-shim:build \
3836
fabric-chaincode-shim:publishToMavenLocal \
3937
-x javadoc \
@@ -42,10 +40,6 @@ RUN gradle \
4240
-x checkstyleTest \
4341
-x dependencyCheckAnalyze
4442

45-
# Installing all protos jar dependencies to maven local
46-
WORKDIR /root/chaincode-java/shim-src/fabric-chaincode-protos/build/publications/protosJar/
47-
RUN mvn -f pom-default.xml compile
48-
4943
# Installing all shim jar dependencies to maven local
5044
WORKDIR /root/chaincode-java/shim-src/fabric-chaincode-shim/build/publications/shimJar/
5145
RUN mvn -f pom-default.xml compile

fabric-chaincode-docker/build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,6 @@ task copyAllDeps(type: Copy) {
5252
into('build/distributions/chaincode-java/shim-src/fabric-chaincode-shim/')
5353
}
5454

55-
copy {
56-
from project(':fabric-chaincode-protos').getProjectDir()
57-
into('build/distributions/chaincode-java/shim-src/fabric-chaincode-protos/')
58-
}
59-
6055
copy {
6156
from project.getParent().file("build.gradle")
6257
into('build/distributions/chaincode-java/shim-src/')

fabric-chaincode-integration-test/src/contracts/bare-gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repositories {
1616

1717
dependencies {
1818
implementation group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '2.4.1'
19-
implementation group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-protos', version: '2.4.1'
19+
implementation group: 'org.hyperledger.fabric', name:'fabric-protos', version:'0.1.3'
2020
testImplementation group: 'junit', name: 'junit', version: '4.12'
2121
implementation group: 'commons-logging', name: 'commons-logging', version: '1.2'
2222
implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'

fabric-chaincode-integration-test/src/contracts/bare-maven/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
</dependency>
4747

4848
<dependency>
49-
<groupId>org.hyperledger.fabric-chaincode-java</groupId>
50-
<artifactId>fabric-chaincode-protos</artifactId>
51-
<version>${fabric-chaincode-java.version}</version>
49+
<groupId>org.hyperledger.fabric</groupId>
50+
<artifactId>fabric-protos</artifactId>
51+
<version>0.1.3</version>
5252
<scope>compile</scope>
5353
</dependency>
5454

0 commit comments

Comments
 (0)