Create new module using maven - maven-3

I have tried to generate a module through Maven using:
C:\Dev>mvn archetype:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/
but gives me following exception:
[INFO] Generating project in Interactive mode
[WARNING] Error reading archetype catalog https://nexus.magnolia-cms.com/content/groups/public
org.apache.maven.wagon.TransferFailedException: nexus.magnolia-cms.com

Looks like you are running into https://issues.apache.org/jira/browse/ARCHETYPE-358
Try to reconfigure your repo or use attached patch for maven plugin to work around the problem.

Related

showing error like this Plug-in "org.eclipse.m2e.editor" was unable to instantiate class "org.eclipse.m2e.editor.pom.MavenPomEditor"

It showing error like this (Plug-in "org.eclipse.m2e.editor" was unable to instantiate class "org.eclipse.m2e.editor.pom.MavenPomEditor"). when selected POM.XML on maven project
I have try to run the maven project but not able to run it and that was happen only on maven java project not an java project. I want to run the maven project without any error so can you help me out on it.

having a problem running a build with jenkins and gatling

I'm getting the following error
[ERROR] No plugin found for prefix 'gatling' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\w7116744\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
If you already have the maven gatling plugin included in the POM, make sure that you run the maven gatling:test command in the directory where your POM is in.
The plugin doesn't check if a pom exist or not. If you are NOT running the mvn gatling:test command in the directory where your pom located, you will always get "No plugin found for prefix 'gatling' in the current project ....."
Looks like gatling-maven-plugin is not configured in your pom.xml.

Jenkins deploying artifact to WebLogic

Trying to deploy an artifact using Jenkins WebLogic Deployer Plugin.
Getting following error:
Error: Could not find or load main class weblogic.Deployer
According to the documentation I should be using wlthint3client.jar (WebLogic version 12.1.3) but this client jar doesn't contain above class (Deployer), tried using the wlfullclient.jar which is said to be deprecated but if that throws another exception:
Hi, I want to install a war file generated from Jenkins to WebLogic, both on different machines, but when the installation runs an error is generated:
java.lang.NoClassDefFoundError: weblogic/deploy/api/spi/DeploymentOptions
at weblogic.deploy.api.tools.deployer.Jsr88Operation.init(Jsr88Operation.java:70)
Any ideas what could be the issue?
Regards!
I am having the same problem. I solved it actually adding all of these three libraries to the Additional Classpath:
wlthint3client.jar:weblogic.jar:wlfullclient.jar

Failure in maven site plugin version 3?

I am trying to get a project to run the maven site:site goal using Maven 3.0.4. Unbeknownst to me, it had been running under Maven 2.2.1 (when I thought it should have been 3).
I keep getting the following failure:
Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-cli) on project myproj-parent: Execution default-cli of goal org.apache.maven.plugins:maven-site-plugin:3.0:site failed: For artifact {null:null:null:jar}: The groupId cannot be empty.
How do I even find what artifact is missing groupId?
It turns out the POM file for one of my dependencies was corrupt. The POM for joda-jsptags-1.0.2 in our Nexus repository wasn't a POM, but a fragment of HTML.
Getting a clean version of joda-jsptags fixed this issue.
It was just frustrating not to get any sort of idea what was bad. And apparently the Maven 3 plugins are more strict on POM parsing.
If you are migrating from Maven 2.2.1 to Maven 3.0.4 you have to be aware of some difference in particular in relation with site generation. You should have taken a look the the migration docs and take a look if your pom needed to be fixed.
Missed a link.

Can the Cloud Foundry Maven Plugin Work With Multi-Module Aggregator Projects?

I have a standard multi-module maven project and I'm able to build it locally using mvn clean packagebut when I try to deploy it using $ mvn cf:update I get the following error:
[ERROR] Failed to execute goal org.cloudfoundry:cf-maven-plugin:1.0.0.M2:update (default-cli) on project <myprojectname>: An exception was caught while executing Mojo. The file or directory does not exist at '<my project directory>/target/<myprojectname>-SNAPSHOT.war'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.cloudfoundry:cf-maven-plugin:1.0.0.M2:update
The problem is that I can't build a .war file for my parent .pom because it needs to be packaged as a pom file, or else maven will reject it. Therefore, I cannot supply the .war file cloudfoundry is looking for. Is there a setting I'm missing?
I'm currently looking into the Maven assembly plugin, but it seems like there should be a more straightforward way to push a multi-module maven project using the maven cloud foundry plugin.
Seems like your parent root either has a single parent pom file or if its a module, it only has a pom inside the target. You are not creating war file inside the target root of your project (if target even exist there). Your application is most likely having each module create their own war files inside their target folders.
At this time I don't think the cf maven plugin would support what you are looking for. could be a enhancement to add a parameter with the module that contains the war file but that is something that needs to be done!
https://github.com/cloudfoundry/vcap-java-client/blob/master/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Update.java
I would recommend you to look into the assembly plugin (which you are already).
Let us know how it goes!

Resources