Skip to content

Commit bf4f30a

Browse files
committed
Fix javadoc build
Signed-off-by: James Taylor <[email protected]>
1 parent aa74412 commit bf4f30a

File tree

18 files changed

+58
-49
lines changed

18 files changed

+58
-49
lines changed

ci/azure-pipelines.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ stages:
6565
javaHomeOption: "JDKVersion"
6666
jdkVersionOption: "1.8"
6767
jdkArchitectureOption: "x64"
68+
options: "-x javadoc"
6869
publishJUnitResults: true
6970
testResultsFiles: "$(System.DefaultWorkingDirectory)/**/TEST-*.xml"
7071
tasks: "build"
@@ -122,7 +123,6 @@ stages:
122123

123124
- job: javadoc
124125
dependsOn: displayenv
125-
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
126126
variables:
127127
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
128128
javadoc_release: master
@@ -159,6 +159,7 @@ stages:
159159
git commit -m "Publishing GitHub Pages"
160160
git push https://$(GITHUB-PAT)@github.com/hyperledger/fabric-chaincode-java.git gh-pages
161161
displayName: 'Commit gh-pages changes'
162+
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
162163
163164
# As the next script is more complex and uses loops, run this discretely in a sh file
164165
# Publishing step for git tags

fabric-chaincode-shim/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,20 +213,24 @@ task licenseCheck {
213213

214214

215215
javadoc {
216-
failOnError = false
216+
failOnError = true
217217
excludes = ['org/hyperledger/fabric/contract/ContextFactory.java',
218218
'org/hyperledger/fabric/contract/ContractRouter.java',
219219
'org/hyperledger/fabric/contract/ContractRuntimeException.java',
220220
'org/hyperledger/fabric/contract/execution/**',
221221
'org/hyperledger/fabric/contract/metadata/**',
222222
'org/hyperledger/fabric/contract/routing/**',
223223
'org/hyperledger/fabric/contract/systemcontract/**',
224-
'org/hyperledger/fabric/**/impl/**',
224+
'org/hyperledger/fabric/ledger/**',
225225
'org/hyperledger/fabric/shim/helper/**',
226-
'org/hyperledger/fabric/shim/ChaincodeBase.java']
226+
'org/hyperledger/fabric/**/impl/**']
227+
227228
source = sourceSets.main.allJava
228229

229-
classpath = sourceSets.main.compileClasspath
230+
classpath = sourceSets.main.runtimeClasspath
231+
232+
javadoc.options.addStringOption('Xdoclint:none', '-quiet')
233+
options.overview = "src/main/java/org/hyperledger/fabric/overview.html"
230234
}
231235

232236
if (JavaVersion.current().isJava8Compatible()) {

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ContractInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* All methods on this interface have default implementations; for
1717
* many contracts it may not be needed to sub-class these.
1818
* <p>
19-
* Each method on the Contract that is marked with the {@link Transaction}
19+
* Each method on the Contract that is marked with the {@link org.hyperledger.fabric.contract.annotation.Transaction}
2020
* annotation is considered a Transaction Function. This is eligible for
2121
* calling. Each transaction function is supplied with its first parameter
2222
* being a {@link org.hyperledger.fabric.contract.Context}. The other parameters

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/ContractRouter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
/**
3131
* Router class routes Init/Invoke requests to contracts. Implements
3232
* {@link org.hyperledger.fabric.shim.Chaincode} interface.
33+
*
34+
* @see ContractInterface
3335
*/
3436
public final class ContractRouter extends ChaincodeBase {
3537
private static Logger logger = Logger.getLogger(ContractRouter.class.getName());

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/annotation/package-info.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66

77
/**
8-
8+
* Provides annotations required for Contract implementations.
9+
*
10+
* @see org.hyperledger.fabric.contract.ContractInterface
911
*/
1012
package org.hyperledger.fabric.contract.annotation;

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/JSONTransactionSerializer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,6 @@ private JSONArray normalizeArray(final JSONArray jsonArray, final TypeSchema ts)
155155
* @param ts TypeSchema representing the type
156156
*
157157
* @return Object created; relies on Java auto-boxing for primitives
158-
*
159-
* @throws InstantiationException
160-
* @throws IllegalAccessException
161158
*/
162159
@Override
163160
public Object fromBuffer(final byte[] buffer, final TypeSchema ts) {

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/execution/SerializerInterface.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public interface SerializerInterface {
3737
* @param ts TypeSchema representing the type
3838
*
3939
* @return Object created; relies on Java auto-boxing for primitives
40-
*
41-
* @throws InstantiationException
42-
* @throws IllegalAccessException
4340
*/
4441
Object fromBuffer(byte[] buffer, TypeSchema ts);
4542

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/package-info.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,17 @@
55
*/
66

77
/**
8-
* <p>
9-
* This is the project to support the writing of Contracts with the JVM runtime
10-
* - enabling development of using Java language or other JVM based languages
8+
* Provides interfaces and classes to support the contract programming model.
9+
*
1110
* <p>
1211
* The {@link org.hyperledger.fabric.contract} package implements the Fabric
1312
* programming model as described in the <a href=
14-
* "https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/developing_applications.html">Developing
13+
* "https://hyperledger-fabric.readthedocs.io/en/latest/developapps/developing_applications.html">Developing
1514
* Applications</a> chapter of the Fabric documentation.
16-
* </p>
15+
*
1716
* <p>
1817
* The main interface to implement is
19-
* {@link org.hyperledger.fabric.contract#ContractInterface}
20-
*
21-
* @see <a href=
22-
* "https://hyperledger-fabric.readthedocs.io/en/release-1.4/developapps/developing_applications.html">Developing
23-
* Fabric Applications</a>
18+
* {@link org.hyperledger.fabric.contract.ContractInterface}
2419
*
2520
*/
2621
package org.hyperledger.fabric.contract;

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/contract/routing/impl/SerializerRegistryImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private SerializerInterface add(final String name, final Serializer.TARGET targe
6666
/**
6767
* Find all the serializers that have been defined.
6868
*
69-
* @see org.hyperledger.fabric.contract.routing.RoutingRegistry#findAndSetContracts()
69+
* @see org.hyperledger.fabric.contract.routing.RoutingRegistry#findAndSetContracts(TypeRegistry)
7070
* @throws IllegalAccessException
7171
* @throws InstantiationException
7272
*/

fabric-chaincode-shim/src/main/java/org/hyperledger/fabric/ledger/package-info.java

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

77
/**
88
* <p>
9-
* This package provides the API for contracts to access the shared ledger.
9+
* Provides the API for contracts to access the shared ledger.
1010
*
1111
*/
1212
package org.hyperledger.fabric.ledger;

0 commit comments

Comments
 (0)