How to Resolve Maven CDK Plugin Dependency Error when Following Cloudera Demo - maven

I'm trying to following along with the Cloudera CDK-examples Demo (https://github.com/cloudera/cdk-examples/tree/master/demo); this is part of a conference (Big Data Techon 2013) session by Cloudera on Hadoop App development
However, I am unable to get mvn install to build successfully. I keep getting warnings like this
[WARNING] The POM for com.cloudera.cdk:cdk-maven-plugin:jar:0.8.1-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for com.cloudera.cdk:cdk-maven-plugin:0.8.1-SNAPSHOT: Plugin com.cloudera.cdk:cdk-maven-plugin:0.8.1-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.cloudera.cdk:cdk-maven-plugin:jar:0.8.1-SNAPSHOT
and then it fails with these errors... I tried to troubleshoot on my own using Google and the link mentioned in the error, but it was to no avail
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.263s
[INFO] Finished at: Tue Oct 15 15:21:23 PDT 2013
[INFO] Final Memory: 6M/57M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'cdk' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/cloudera/.m2/repository), cdh.repo (https://repository.cloudera.com/artifactory/cloudera-repos), central (http://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException

Looking at the pom.xml here, I see that the snapshots is disabled for both repository and pluginRepository.
You could try to enable it and try building.

Related

maven dependency versionioning issue

I am trying to add the dependency as below to use the version mentioned or the latest.I am expecting maven to take the dependencies with version >= 0.0.1 but maven is failing to resolve the dependencies.If i mention the exact version the dependencies are getting downloaded.
Iam using maven 3.5
<dependency>
<groupId>com.company.esb.fuse</groupId>
<artifactId>common</artifactId>
<version>[0.0.1,)</version>
<scope>provided</scope>
</dependency>
maven logs:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building source out Write 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.401 s
[INFO] Finished at: 2018-01-22T17:26:21+01:00
[INFO] Final Memory: 14M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project source: Could not resolve dependencies for project com.company.esb.source.out:source:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.company.esb.fuse:common:jar:[0.0.1,): No versions available for com.company.esb.fuse:common:jar:[0.0.1,) within specified range -> [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/DependencyResolutionException
Above details are not sufficient to determine the exact problem. But according to your maven logs,
No versions available for com.company.esb.fuse:common:jar:[0.0.1,)
Note that it says com.company, not com.compant as you typed in this question.
check your pom.xml first and put correct groupId.
If you are still getting the same error, check your local .m2 folder and confirm that you have at least one artifact with a version which is in the declared range.
UPDATE : the error may be in the maven-metadata file. check maven-metadata-local.xml file placed inside .m2/repository/com/company/esb/fuse/common. All versions should be there under <versions> tag.

Apache Spark 1.4.1 Build Failed

I have download Apache Spark 1.4.1 from the official site. As follows:
I don't have hadoop installed in my machine.
Apache provides build command. So, I tried to start building the project using following command
build/mvn -Pyarn -Phadoop-2.4 -Dhadoop.version=2.4.0 -DskipTests clean package
But build was failed with the following error:
[INFO] Spark Project External Kafka Assembly ............. SKIPPED
[INFO] Spark Project YARN Shuffle Service ................ SKIPPED
[INFO] --------------------------------------------------------------------- ---
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.840s
[INFO] Finished at: Wed Jul 29 10:43:04 IST 2015
[INFO] Final Memory: 15M/43M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-enforcer-plugin:1.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-enforcer-plugin:jar:1.4: Could not transfer artifact org.apache.maven.plugins:maven-enforcer-plugin:pom:1.4 from/to central (https://repo1.maven.org/maven2): peer not authenticated -> [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/PluginResolutionException
I am new with Apache Spark please give suggestions.
since it is precompiled Binary distribution you have downloaded. you do not need to compile it again using maven2. just put it on path and use it directly.

Cannot install grails plugin to local or remote maven repo

I'm trying to install my grails plugin to local or remote repo, but when I run
mvn install -DskipTests I'd always get this message:
|Loading Grails 2.3.9
|Configuring classpath
|Running pre-compiled script
.
|Environment set to development
................................
|Packaging Grails application
................................
|Plugin packaged grails-mcplugin-license-0.4.3.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.532s
[INFO] Finished at: Thu Jun 05 14:12:03 MSK 2014
[INFO] Final Memory: 13M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.4.0:package-plugin (default->package-plugin) on project McpluginLicense: Unable to copy the plugin ZIP to the target >directory -> [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
I'm using grails-maven plugin right from github because it solves this problem -https://jira.grails.org/browse/MAVEN-237, can it be related to my issue? How do I track it down? I tried to look at maven debug output but I didn't notice anything that can help
I suggest installing the release plugin and then running
grails maven-install
The documentation is here.

build failure in dyn.js

Today I tried to build dyn.js from source with the instructions on https://github.com/dynjs/dynjs.
I tried it on Windows 7 and Linux (Fedora), but on both systems the build fails.
This is what i get:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building dynjs 0.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.projectodd.rephract:rephract:jar:1.x.incremental.39 is missing, no dependency information available
[WARNING] The POM for org.jboss.jreadline:jreadline:jar:0.20.incremental.2 is missing, no dependency information available
[WARNING] The POM for org.jruby.joni:joni:jar:1.1.10.incremental.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.382s
[INFO] Finished at: Wed Mar 20 12:01:04 CET 2013
[INFO] Final Memory: 7M/109M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dynjs: Could not resolve dependencies for project org.dynjs:dynjs:jar:0.1.0-SNAPSHOT: The following artifacts could not be resolved: org.projectodd.rephract:rephract:jar:1.x.incremental.39, org.jboss.jreadline:jreadline:jar:0.20.incremental.2, org.jruby.joni:joni:jar:1.1.10.incremental.1: Failure to find org.projectodd.rephract:rephract:jar:1.x.incremental.39 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [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/DependencyResolutionException
Does anyone know how to fix this or how to get a working version of dyn.js?
Thanks!
The version # for that dependency has just been updated, see here:
https://github.com/dynjs/dynjs/blob/master/pom.xml#L144
so if you pull the repo, it should fix that and here is a link to the 0.1.1 tag
https://github.com/dynjs/dynjs/tree/v0.1.1
Once the sonatype ends its maintenance, 0.1.1 should be released in central
-Luke

Getting errors while trying to build a skeleton Mule Cloud Connector..

So I'm following the tutorials online to build a cloud connector but I can't even get the skeleton to be generated!
tutorial 1
tutorial 2
I get the following error, using the create-cloud-connector.bat script given by the Mule Cloud Connect Development Kit
> [INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.170s
[INFO] Finished at: Mon Jul 30 13:00:57 EDT 2012
[INFO] Final Memory: 7M/122M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.mule.tools:mule-cloud-connector-archetype:2.0.16) -> [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/MojoFailureException
what are some things I could be doing wrong?
I updated the Maven settings.xml file
the first question is " Name of the cloud service the new connector uses
[default: ] " can I enter anything there? (or does it have to be like an existing service? what if I'm building one that doesn't exist?)
It looks like the tutorial is pointing at rather old version of the archetype (2.0.16) that maven can't even find.
I recommend to replace the generation step with the following command
mvn archetype:generate -DarchetypeGroupId=org.mule.tools.devkit -DarchetypeArtifactId=mule-devkit-archetype-cloud-connector -DarchetypeVersion=3.3.0
You can find additional informations here

Resources