How to create the corda.jar? - corda

When I build the corda project locally, I find a corda-4.1-corda.jar. Is that basically the same as the corda.jar file produced when node directories are generated by the cordformation plugin? Can I replace the latter by the former, after renaming it, in a deployment?

Once your dependencies are set correctly, you can build your CorDapp JAR(s) using the Gradle jar task
Unix/Mac OSX: ./gradlew jar
Windows: gradlew.bat jar

Run ./gradlew clean build -x test from the root directory. Once the process finishes, the jar is produced in the corda/node/capsule/build/libs/ directory as corda-<version>.jar.

Related

How to debug wso2 api manager code in idea

I am trying to run API Manager 4.0.0 from source code, I download product-am and carbon-apimgt from github. How can i debug source code in idea or eclipse ?
First of all, you have to build the product. Follow these steps in order to build the product locally.
Make sure you have installed Java and Maven in your machine.
Download or clone carbon-apimgt repository from
https://github.com/wso2/carbon-apimgt.
Go to carbon-apimgt directory and run mvn clean install command in the terminal. (You can ignore unit tests by running mvn clean install -Dmaven.test.skip=true)
Copy the build version to the clipboard (ex:- 9.12.3-SNAPSHOT)
Download or clone product-apim from https://github.com/wso2/product-apim
Replace the value of carbon.apimgt.version in pom.xml file with the value you copied. (ex:- <carbon.apimgt.version>9.12.3-SNAPSHOT</carbon.apimgt.version>)
Go to product-apim directory and run mvn clean install command in the terminal. (You can ignore integration tests by running mvn clean install -Dmaven.test.skip=true which will save your time)
The built pack can be found in product-apim/modules/distribution/product/target directory.
After building the pack, extract the content in the zip file and run sh bin/api-manager.sh --debug 5005 command.
I recommend JetBrains Intellij IDEA to debug the code easily. So, open the carbon-apimgt project in IDEA. Then Add Configuration > Add new... > Remote JVM Debug > OK. After adding the configuration, you can click on the debug button and start debugging.

install jar file in dbfs and mvn packages using init script

I have few Jar files/packages in the DBFS and I want an init script (so that I can place that in the automated cluster) to install the Jar package everytime the cluster starts.
I also want to install maven packages from maven using an init script.
I can do all of these using databricks UI. But the requirement is to install libraries using an init script.
To install jar files, just put files onto DBFS, in some location, and in the init script do:
cp /dbfs/<some-location>/*.jar /databricks/jars/
Installation of the maven dependencies is more tricky, because you also will need to fetch dependencies. But it's doable - from the init script:
Download and unpack Maven
Execute:
mvn dependency:get -Dartifact=<maven_coordinates>
move downloaded jars:
find ~/.m2/repository/ -name \*.jar -print0|xargs -0 mv -t /databricks/jars/
(optional) remove not necessary directory:
rm -rf ~/.m2/
P.S. But really, I recommend to automate such stuff via Databricks Terraform Provider.

How to create CorDapp jar file without redeploying nodes?

We are using Corda Version 4 for our application.
We understand that the command gradlew.bat deployNodes creates following jars -
CorDapp (contracts, states, flows)
Corda platform
Dependencies
When any change is made in the contract/states/flows code, we had to run the command gradlew.bat deployNodes each time. Due to this the "Corda platform" and "Dependencies" jars always get recreated and consequently increases development time.
Does Corda platform provides alternative way to Only create "CorDapp" jar file and not the remaining ones?
You can use following cmd to generate only jar files
./gradlew build
this will generate jar files in you build/lib folder

My robot framework jar file with dependencies after maven install command is shown as corrupt file, Kindly assist

A snapshot.jar file of robot framework and its dependencies was created in eclipse after running maven install command. But the jar file is not able to execute my robot test cases as an error throws up: corrupt jar file.
I have searched about configuring pom.xml for robot framework as suggested in How to run test cases using robot framework jar file?, but could not build a proper jar file.
The primary purpose is that the jar file should be able to execute QA test cases in any remote or other system
Can someone please assist, its very important
Most likely, you are trying to add a tar.gz robot-selenium dependency instead of a jar robot-selenium dependency.
Follow the instructions here:
https://github.com/Hi-Fi/robotframework-seleniumlibrary-java
And here: http://robotframework.org/MavenPlugin/index.html

Check that a Clojurescript jar file is working

I have some Clojurescript source files that output messages to the browser console on a timer. Eventually I would like to make a Clojars library from these files. So far I have created an uberjar using lein. All the user of this library would need to do is :require a namespace from the library, and messages should be emitted to the browser console. Seeing these messages is the "all working fine" test I want to perform.
In other words how do I check that the jar file I have created works? Can I start off with a fresh lein project and just put the jar file in some special 'un-managed' directory and :require the namespace? Actually I don't think you can do such a thing with lein, hence the question.
Assuming you have a project.clj file already with the line
(defproject bigco/biglib "0.1.0-SNAPSHOT”
...
run
lein install
This will build the JAR and install it in your local Maven repo.
Then in your new project, add that dependency and run it.
If your jar (definition of jar includes uberjar of course) does not come neatly from a lein project then an alternative is to use Maven 2 directly:
mvn install:install-file -Dfile=./my-deps.jar -DgroupId=my-deps -DartifactId=my-deps -Dversion=1.0.0 -Dpackaging=jar
Here mvn will store the jar in your local .m2 maven repository. Once stored you can use this jar in any lein project on your machine by referring to it in the dependencies section:
[my-deps "1.0.0"]
Maven documentation for this.

Resources