I am working through the Digital Asset quickstart guide. I am having trouble running:
mvn clean compile exec:java
I get the following error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.373 s
[INFO] Finished at: 2019-02-13T17:22:14-05:00
[INFO] Final Memory: 10M/50M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project daml-quickstart-java: Could not resolve dependencies for project quickstart:daml-quickstart-java:jar:1.0.0: Failed to collect dependencies at com.daml.ledger:bindings-java:jar:2.5.2: Failed to read artifact descriptor for com.daml.ledger:bindings-java:jar:2.5.2: Could not transfer artifact com.daml.ledger:bindings-java:pom:2.5.2 from/to bintray-digitalassetsdk-DigitalAssetSDK (https://digitalassetsdk.bintray.com/DigitalAssetSDK): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
How do I get authorization?
To use the Java bindings you need to set up Maven to work with the Digital Asset Maven repository in Bintray.
Log in to Bintray
Open the Bintray repository main page
Click on the SET ME UP! button and download the settings.xml file
If you already have a ~/.m2/settings.xml, integrate the downloaded file with
it. Otherwise, copy the downloaded settings.xml file to ~/.m2/settings.xml.
Go to your Bintray profile page. Here you can get your Bintray username (<name>#digitalassetsdk, displayed below Edit Your Profile) and your Bintray API key, which you’ll need in the next step.
In settings.xml, change the username and the apikey fields to your Bintray username and API key.
You can also find these instructions with direct Bintray links in the documentation.
Related
I'm new to Redhat OpenShift and trying to deploy node application (with angularjs + mysql) and running into build issues.
Using openshift console created node application and in advanced options pointed to the private repository and linked configured secret (ssh key to private repository).
My build is failing with "Assemble script failed". Pasting the logs as below (from console - obfuscated private keys and values).
Not sure if I'm missing some configurations. Appreciate help on this.
Cloning "ssh://username#bitbucket.org/username/my-app.git" ...
Commit: xxxxxxxxxxxxxxxxx (Fixed readme)
Author: Name <email>
Date: Wed Sep 6 19:50:59 2017 -0700
Pulling image "docker-
registry.default.svc:5000/openshift/nodejs#sha256:0000000000000" ...
---> Installing application source
---> Building your Node application from source
Current git config
url.https://github.com.insteadof=git#github.com:
url.https://.insteadof=ssh://
url.https://github.com.insteadof=ssh://git#github.com
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=ssh://username#bitbucket.org/username/my-app.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
---> Installing dependencies
---> Using 'npm install -s --only=production'
error: build error: non-zero (13) exit code from docker-
registry.default.svc:5000/openshift/nodejs#sha256:0000000000000
Pls note that my source code is hosted on private repository and per log above it appears openshift is able to access the repository and download the source code.
Thanks Graham for the pointer. I recreated the application and this time in advanced options on the web console selected 1 GB (from default of 500 mb) after which my build worked fine.
I cloned the drill git repository and when I run
mvn clean package -DskipTests
I get this error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (validate_java_and_maven_version) on project drill-root: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
You need to use JDK 1.7 to build Apache Drill.
The Drill team added maven-enforcer-plugin to the build process to make sure that build gives an error if someone tries to build using an unsupported version of Java or Maven. If you scroll up you will see an earlier error message like the following:
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (validate_java_and_maven_version) # drill-root ---
[WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.8.0-51 is not in the allowed range [1.7,1.8).
A lot of people want to run Drill using JDK 1.8. There's good news on that front. While you can't build using JDK 1.8, once you've built, you can run Drill with JDK 1.8 just fine.
I am making a development environnement based on Jenkins and Sonar.
Both are placed on isolated gears.
The Jenkins gear has been created with the Instant App option.
The Sonar gear has been created thanks to these github indications.
I created a Jenkins free-style job in order to analysis a Maven project.
The script used on that job is based on this wordpress article.
# Build script of the Job
settingsPath=$OPENSHIFT_DATA_DIR/settings.xml
settings="<settings>\n <localRepository>$OPENSHIFT_DATA_DIR</localRepository>\n</settings>\n"
echo $settings > $settingsPath
# Cleaning of the workspace
mvn --global-settings $settingsPath clean test
# Preparation of Sonar informations
export SONAR_JDBC="-Dsonar.jdbc.url=jdbc:mysql://xxx.xxx.xxx.xxx:3306/sonar?useUnicode=true&characterEncoding=utf8"
export SONAR_DRIVER=-Dsonar.jdbc.driver=com.mysql.jdbc.Driver
export SONAR_DBUSER=-Dsonar.jdbc.username=xxx
export SONAR_DBPASS=-Dsonar.jdbc.password=xxx
export SONAR_URL=-Dsonar.host.url=http://sonar-alc.rhcloud.com
export SONAR_OPTS="$SONAR_JDBC $SONAR_DRIVER $SONAR_DBUSER $SONAR_DBPASS $SONAR_URL"
# Sonar analysis
mvn --global-settings $settingsPath sonar:sonar $SONAR_OPTS
On the execution of the mvn sonar:sonar command, I have the following error:
Can not execute SonarQube analysis: Fail to connect to database: Cannot create PoolableConnectionFactory (Communications link failure
Here is the stacktrace corresponding to this error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ClientEvalcolor 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:2.1:sonar (default-cli) # ClientEvalcolor ---
[INFO] SonarQube version: 3.3.1
[INFO] [03:28:09.324] Create JDBC datasource for jdbc:mysql://xxx.xxx.xxx.xxx:3306/sonar?useUnicode=true&characterEncoding=utf8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.634s
[INFO] Finished at: Mon Nov 25 03:28:10 EST 2013
[INFO] Final Memory: 12M/182M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.1:sonar (default-cli) on project ClientEvalcolor: Can not execute SonarQube analysis: Fail to connect to database: Cannot create PoolableConnectionFactory (Communications link failure
[ERROR]
[ERROR] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.): No route to host
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Execute shell' marked build as failure
Finished: FAILURE
I know that an Openshift mysql database isn't accessible from a remote server, but Sonar seems to be runnable on Openshift, and the article that I previously linked successfully did it.
Do you have any idea about how to fix that ?
Thank you,
Alvaro C.
I finally succeeded on making my Jenkins gear send data to my Sonar gear !
I'll explain the solution I found here, maybe it will help some people.
There a three ways to access an Openshift database:
The gear that contains that database can access it easily on localhost:3306. That's the usual case.
From your own computer, you can bind ports (with the rhc tool) in order to access the database. This can't be applied from another gear, and requires the rhc tool to keep running.
Any gear from your account can access the database of a scalable application.
Usage:
When creating the Sonar gear, it's necessary to set the gear as scalable (this can't be done with jenkins/diy gears). Adding a database cartridge to this gear will consume 1 gear, but this database can be accessed from any Openshift application.
Notice that this new database will have a port different than 3306 (in my case, 39536). If you don't have this, that's probably that the embedded app isn't set scalable.
The Jenkins job script that I put in my question is correct. Changing all these "xxxxx" and the port with your database info will permit Jenkins to do his job !
I am building a phonegap app for blackberry. It runs fine in the emulator but when i try to sign the project using command line so that i can run it on an actual device it gives me the following exception occurs.
I googled it , it seems i have to use preverify tool and verify my jar file. But i dont have a jar file of my project, its just folders. Please help me out with this.
[INFO] Parsing command line options
[INFO] Parsing bbwp.properties
[INFO] Validating application archive
[INFO] Parsing config.xml
[WARNING] Failed to find a <feature> element
[WARNING] Failed to find the <author> element
[INFO] Populating application source
[INFO] Compiling BlackBerry WebWorks application
Exported static routine: .main(String[]) is multiply defined.
Exported static routine: .main(String[]) is multiply defined.
Exported static routine: .main(String[]) is multiply defined.
net.sf.antcontrib.AntContribVersion: Error!: Missing stack map in: <init> at lab
el: 30
[ERROR] RAPC exception occurred
Thanx
Looks like i only found the solution. The problem was that the zip file was in C:\ drive, and windows was not allowing the SDK to access it because of UAC.
Nevertheless found this silly solution after 2 days of trial and error. Silly me
After 2+ hours I was able to get the maven-scm-provider-hg extension (for pushing to mercurial repos from Maven) semi working, meaning that it was executing commands instead of just giving errors.
However I think I've run into a wall with this error
[INFO] [deploy:deploy {execution: default-deploy}]
[INFO] Retrieving previous build number from pircbotx.googlecode.com
[INFO] Removing C:\DOCUME~1\Owner\LOCALS~1\Temp\wagon-scm1210107000.checkout\pir cbotx\pircbotx\1.3-SNAPSHOT
[INFO] EXECUTING: cmd.exe /X /C "hg clone -r tip https://*SNIP*#site.pircbotx.googlecode.com/hg/maven2/snapshots/pircbotx/pircbotx/1.3-SNAPSHOT C:\DOCUME~1\Owner\LOCALS~1\Temp\wagon-scm1210107000.checkout\pircbotx\pircbotx\1.3-SNAPSHOT"
[INFO] EXECUTING: cmd.exe /X /C "hg locate"
[INFO] repository metadata for: 'snapshot pircbotx:pircbotx:1.3-SNAPSHOT' could not be found on repository: pircbotx.googlecode.com, so will be created Uploading: scm:hg:https://site.pircbotx.googlecode.com/hg/maven2/snapshots/pircbotx/pircbotx/1.3-SNAPSHOT/pircbotx-1.3-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Error listing repository: No such command 'list'.
What on earth would cause that error? I'm on a Windows box, so any commands that aren't commands give "'list' is not recognized as an internal or external command...", not "No such command 'list'."
POM
<build>
<extensions>
<extension>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-hg</artifactId>
<version>1.4</version>
</extension>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-scm</artifactId>
<version>1.0-beta-7</version>
</extension>
</extensions>
...
<distributionManagement>
<snapshotRepository>
<id>pircbotx.googlecode.com</id>
<name>PircBotX Site</name>
<url>scm:hg:https://site.pircbotx.googlecode.com/hg/maven2/snapshots</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
Mercurial version
W:\programming\pircbot-hg>hg version
Mercurial Distributed SCM (version 1.7.2)
Any suggestions?
Firstly, not sure if deploying the project artifacts to an SCM is a normal practice. maven scm plugin is usually used for source code related operations like checkout/update/tag, etc.
Secondly, the cause of the error seems to be related to the fact that maven scm provider for hg does not support the list command as specified in this scm providers matrix. Not sure why and how mvn deploy uses this command though.