Skip to content

Commit b2095bb

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

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
@@ -63,6 +63,7 @@ stages:
6363
javaHomeOption: "JDKVersion"
6464
jdkVersionOption: "1.8"
6565
jdkArchitectureOption: "x64"
66+
options: "-x javadoc"
6667
publishJUnitResults: true
6768
testResultsFiles: "$(System.DefaultWorkingDirectory)/**/TEST-*.xml"
6869
tasks: "build"
@@ -120,7 +121,6 @@ stages:
120121

121122
- job: javadoc
122123
dependsOn: displayenv
123-
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
124124
variables:
125125
${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
126126
javadoc_release: master
@@ -157,6 +157,7 @@ stages:
157157
git commit -m "Publishing GitHub Pages"
158158
git push https://$(GITHUB-PAT)@github.com/hyperledger/fabric-chaincode-java.git gh-pages
159159
displayName: 'Commit gh-pages changes'
160+
condition: and(succeeded(),eq(variables['Build.Reason'], 'IndividualCI'))
160161
161162
# As the next script is more complex and uses loops, run this discretely in a sh file
162163
# Publishing step for git tags

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ in various programming languages. There are two other smart contract SDKs availa
1010

1111
## Documentation
1212

13-
Detailed explanation on the concepts and programming model for smart contracts can be found in the [Chaincode Tutorials section of the Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-2.1/developapps/smartcontract.html).
13+
Detailed explanation on the concepts and programming model for smart contracts can be found in the [Chaincode Tutorials section of the Hyperledger Fabric documentation](https://hyperledger-fabric.readthedocs.io/en/release-2.2/developapps/smartcontract.html).
1414

1515
Javadoc is available for each release:
1616

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/release-2.2/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
*/

0 commit comments

Comments
 (0)