Coherence Weblogic 12 Maven - 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.

Related

Use maven to generate ODL code Framework in windows

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.

We have a case where there are multiple projects configured in sonar. All the project have different modules with same names?

We have a case where there are multiple projects configured in sonar. All the project have different modules with same names.
With this, as and when we execute sonar for one of the project, the execution is getting terminated with below error.
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project XXX: Module "XXXX" is already part of project "YYYY" -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project XXXX: Module "YYYY" is already part of project "YYYY"
It seems that because the module name is same , Sonar is terminating the execution. Note that we are using sonar version 4.5.5 and facing this issue. While earlier we were using sonar version 4.1.1 and with that version the execution was successful (probably sonar was overriding earlier report with the newer one in case of conflicting module name).
Please suggest possible solution for this? Thanks,
Complete error log is available here
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/sonarqube/-L7cby77-28/6L6zPlb6AAAJ
I think you need to rename you modules like if your project is abc.
Please change your modules like abc_xxx etc...it may work for you
Have you tried using the project name property?
In a pom.xml file:
<sonar.projectName>Some project name here</sonar.projectName>

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. Creating a project offline fails so how do I begin?

First off I'm not on a separate system in order to post this question and have no way of connecting the other system to the internet. This machine I'm on is locked down so I am not able to install or do anything other than email and view the web for research.
Used Reference: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
Environment: Maven 2.2.1
Yes the Maven build functions fine for the existing project.
Situation:
I'm new to Maven and this project I'm on, the other developers are GONE. There is a .bat file that was used to run the project builds and that's all I know of Maven.
I am attempting to learn Maven on the other machine that has it installed I am using the Apache site mentioned above. The instructions tells me to create a project using the command
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false but, I get the
'BUILD FAILURE'
Error reading archetype catalog http://repo1.maven.org/maven2... (and other errors)
The desired archetype does not exist (org.apache.maven.archetypes:maven-archetype=quickstart:1.0
So, question is what am I to do in order to create a dummy project so I can see WTF is going on with Maven when I'm in an environment that is not able to reach the 'maven.org' site?
If there are threads on learning Maven offline that someone can point me to that too would be of use. I'm not seeing anything though that helps me get started on this.
Thank you for looking and your time.
The problem seems that maven is looking for the architype on the central repository.
You can create your own pom.xml with an editor:
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html

Maven build : How to resolve the workspace artifacts without installing them to repo and without using m2eclipse

I've worked a little with m2eclipse in Eclipse Indigo and now I'm trying to use Maven from command line without Eclipse and without m2eclipse plugin. The m2eclipse has abililty to resolve the artifacts from the workspace without installing them to repository and this feature allows me to run my build without problems in Eclipse , but in CMD I'm getting the errors of missing jars.
[WARNING] The POM for AAA_7.1.1:ConfigurationView:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for AAA_7.1.1:Beans:jar:0.0.1-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[ERROR] Failed to execute goal on project Client: Could not resolve dependencies for project AAA_7.1.1:Client:pom:0.0.1-SNAPSHOT:.......
Our goal is to keep the repo clean as much as possible , that's the reason why I'd like to keep it working in a such way.
So my question is how to resolve the dependencies without installing them to repo and if it's possible at all?
IMO, the standard way to go with Maven is mvn clean install.
But if I understand well your problem, you want to keep your local repository as clean as possible ?
One way to do that would be to use multiple local repositories, but I don't think it's possible at the moment (Maven 3.0).
However you can use alternate local repo with -Dmaven.repo.local or alternate settings with mvn --settings (see answer).
See also :
Previous question : maven workspace local repository
JIRA : Allow multiple local repositories (Unresolved)
Local repository separation -> workspaces don't seem to be implemented at the moment...
Basically you want a maven build, where the reactor contains all your 97 modules. To do this:
Create a parent, which contains all those 97 modules as children (if you are already multi module, you just need to configure the already existing parents to be the children of this new parent). Than start your build at that new parent. The convention is normally to have the parent in the upper directory. But you may also use relative paths that contain .. for the module location specification. There is also no need to inherit from the new parent in the existing parents. So you do not need to change any of the existing poms.

Resources