Use maven to generate ODL code Framework in windows - opendaylight

When I use this command :
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/public/ -DarchetypeCatalog=remote -DarchetypeVersion=1.3.1-Carbon
Then result is
Error: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (org.opendaylight.controller:opendaylight-startup-archetype:1.3.1-Carbon)

The OpenDaylight project doesn't use Maven Central (yet) to publish artifacts, so you need to tell Maven where the ODL repositories are. For that you need your $HOME/.m2/settings.xml file set up as described in the developer documentation here. I recommend you use the latest archetype version (1.6.0), since if you run into issues that's the most likely you will be able to get support with.

Please follow the official documentation on docs.opendaylight.org.
The community on the archetypes-dev mailing list may also be able to help.

Related

opendaylight : maven archetype for Nitrogen release

I want to upgrade my opendaylight Java project to use the Nitrogen release. How can I generate the maven archetype for this? I was previously using the following to generate the archetype
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeVersion=1.2.4-Boron-SR4 -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.release
What archetypeVersion should be used for Nitrogen? Note: The mvn command above works fine for Carbon etc. However, I don't know what version to use for Nitrogen. The catalog does not seem to list a version for Nitrogen. i.e. I don't find a Nitrogen version here:
https://nexus.opendaylight.org/content/repositories/opendaylight.release/archetype-catalog.xml
Thanks,
You can use the following command for generating a framework for a nitrogen release. Use archetypeVersion=1.4.0.
mvn archetype:generate -DarchetypeGroupId=org.opendaylight.controller -DarchetypeArtifactId=opendaylight-startup-archetype -DarchetypeRepository=http://nexus.opendaylight.org/content/repositories/opendaylight.release/ -DarchetypeCatalog=remote -DarchetypeVersion=1.4.0
check this link for the list of the version numbers you can use for the opendaylight-startup-archetype.

Add Archtypes to Eclipse

I am new to MAVEN and restful services. I have MAVEN installed it correctly and set the variables. I was creating a webservice using the jersey-quickstart-webapp but found it did not appeared in the list of Archetypes.
I tried to add it using using ADD Archetypes option. After the entering the details
GroupId: org.glassfish.jersey.archetypes
ArtifactId: jersey-quickstart-webapp
Version : 2.16 // version is correct??
I get following error please help.
<b>
org.eclipse.core.runtime.CoreException: Could not resolve artifact
org.glassfish.jersey.archetypes:jersey-quickstart-webapp:pom:2.16</b>
I don't have a ready explanation as to why the Eclipse archetype plugin was giving you this error, since 2.16 is a valid version of jersey-quickstart-webapp. However, I would recommend that you try manually executing the following command from a command prompt:
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-webapp
-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false
-DgroupId=com.example -DartifactId=simple-service-webapp -Dpackage=com.example
-DarchetypeVersion=2.19
Make sure that you first delete the jersey-quickstart-webapp folder, if it exists, from your Maven .m2 directory. This may be necessary to avoid from something getting corrupted during the archetype install.
Here is a link to the official documentation for creating a Jersey EE application from a Maven archetype.

Maven gives this project has disliked artifacts error when using Jung dependency

I have a Java project where I want to make some calls to a Jung library. I added the following lines to the pom.xml
net.sf.jung
jung-algorithms
2.0.1
However when I run "mvn package", I get the following error
[ERROR] Failed to execute goal licensing-maven-plugin:1.
7.5:check (enforce-licensing-oss) on project server-examples: This project
has 3 disliked artifacts. -> [Help 1]
Any insights as to what may be going wrong ?
You have configured the licensing-maven-plugin to complain when you introduce a dependency with certain licenses. You, or whoever wrote your pom. If you read the configuration for that plugin it will tell you what licenses it is configured to like and dislike.

Maven: No Plugin Found For Prefix "Archetype"

currently I am trying to create maven project for activiti workflow engine. However, when I use command "mvn archetype: generate", it always show following error:
What is wrong with my maven?
NB: I have read this solution, but I can still access following link: http://repo.maven.apache.org/maven2/org/apache/maven/plugins and also I have checked that archetype plugin is there.
Thanks in advance.

Coherence Weblogic 12 Maven

I am trying to creating a project from a maven archetype using Coherence
However, when I execute
mvn archetype:generate
-DarchetypeGroupId=com.oracle.coherence
-DarchetypeArtifactId=maven-gar-archetype
-DarchetypeVersion=12.1.2-0-0
-DgroupId=org.mycompany
-DartifactId=my-gar-project
-Dversion=1.0-SNAPSHOT
I recive the following 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 (com.oracle.coherence:maven-gar-archetype:12.1.2-0-0)
Is there some other configuration to use it?
I can't guarantee that this will solve your problem, but there is a coherence-mock.jar that is shipped in the lib folder, and that was one of the reasons for creating that JAR.
For the sake of full disclosure, I work at Oracle. The opinions and views expressed in this post are my own, and do not necessarily reflect the opinions or views of my employer.

Resources