travis build for own 3rdparty cordapps is failing due to -sources.jar in classpath
See original GitHub issuewhile building a 3rdparty library and running testcases using cordapp Testnetworks the tests are crashing
version:
corda_release_group = 'net.corda'
corda_release_group_plugins = 'net.corda.plugins'
corda_release_version = '4.1'
corda_gradle_plugins_version = '4.0.42'
exception during tests
ch.cordalo.corda.common.flows.test.TestBaseFlowTests > testCreate FAILED
java.lang.IllegalArgumentException: There is more than one CorDapp containing the package ch.cordalo.corda.common.contracts on the classpath
[/home/travis/build/cordalo-ch/cordalo/corda-common/build/libs/corda-common-contracts-0.1-SNAPSHOT-javadoc.jar,
/home/travis/build/cordalo-ch/cordalo/corda-common/build/libs/corda-common-contracts-0.1-SNAPSHOT.jar].
Specify a package name which is unique to the CorDapp.
at net.corda.testing.node.internal.TestCordappImpl.getJarFile(TestCordappImpl.kt:34)
reproduce bug
- create a 3rd party library
- implement a test case and use MockNetwork with parameters
network = new MockNetwork(new MockNetworkParameters(testCordapps));
- use standard ‘maven’ plugin and ‘signing’ plugin to upload at the end the artifacts to OSS
apply plugin: 'maven'
apply plugin: 'signing'
- build sources and javadoc as seperate .jars for OSS maven repo
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
// dont add javadocjars and source to it because travis is not able to build
// archives javadocJar, sourcesJar
}
issue if
- archives are built for javadocJar and sourcesJar
archives javadocJar, sourcesJar
working if commented
// archives javadocJar, sourcesJar
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Common Build Problems
One possible cause for builds failing unexpectedly can be calling set -e (also known as set errexit ), either directly in your .travis.yml...
Read more >Getting an error when adding a 3rd-party jar file
:java-source:configureCordappFatJar FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':java-source: ...
Read more >高亚斌
Material-UI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system ...
Read more >The Blog Pros -- Simple Solutions to Succeed
Articles from Pros, Video Tips, Techniques, and Services. All at your fingertips.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Lost some time and was facing the same issue, till i found this fix. When will it will integrated in Corda 4.4+ ?
solution to be implemented in: TestCordappImpl.kt
Original
fixed