ejb-javaee6 with error when generated by eclipse - eclipse

When I create an ejb project through ejb-javaee6 archetype in Eclipse I get the following errors:
Description Resource Path Location Type
Endorsed directory '/home/hfluz/workspace/maven-test/web2/target/endorsed' is missing. You may need to a perform a Maven command line build in order to create it. pom.xml /web2 line 28 Maven Configuration Problem
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:2.1:copy (execution: default, phase: validate) pom.xml /web2 line 53 Maven Project Build Lifecycle Mapping Problem
There is already an /target/endorsed/javaee-endorsed-api-6.0.jar file.
IDE: JBoss Developer Studio 7 Beta 1 (tried with embedded 3.0.4 maven version and also with 3.0.5).
When I generate this same archetype through command line (maven 3.0.4) and import the project to eclipse, these errors are not displayed.
I just tried and the same happens with webapp-javaee6 archetype (also from org.codehaus.mojo.archetypes).
Anyone have any idea about what is causing this issue?

Try refreshing the target folder in eclipse (workspace seems out of sync).
Read http://docs.jboss.org/tools/whatsnew/maven/maven-news-3.3.0.CR1.html about endorsed library support in JBDS/JBT

Related

Installing DeepLearning4j fails with eclipse plugin

I downloaded the entire project and import into Eclipse, but fails on this plugin:
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: com.lewisd:lint-maven-plugin:0.0.11:check (execution: pom-lint, phase: validate) pom.xml /dl4j-examples line 8 Maven Project Build Lifecycle Mapping Problem
What's the problem and how to get it compiled?
You should only be using m2eclipse. You don't need to "import the whole project" It's actually 6 projects total. You are better off downloading our examples where it will be managed for you. We cover this in our quick start (granted it's with intellij but the ideas are similar):
http://deeplearning4j.org/quickstart

Eclipse Maven errors when I'm only using Gradle

I began to get errors after downloading Nodeclipse and creating a Gradle project with New Gradle Project -- sample project "Java Quickstart". Whenever I re-open Eclipse, I get this error:
"Updating Maven Dependencies" has encountered a problem. An internal
error occurred during: "Updating Maven Dependencies".
org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob$1
I have never used Maven, but I tried to investigate the error. When I try to open Preferences > Maven, or most (but not all) of its subfolders, I get:
Unable to create the selected preference page. An error occurred while
automatically activating bundle org.eclipse.m2e.core.ui (545).
I looked on Maven Central and there is no m2e folder in org/eclipse. I also looked in Eclipse/features for pom.xml files and I have folders starting with org.eclipse.m2e, but no org.eclipse.m2e.core.ui.
Edit:
I created a new workspace and got the same error message as soon as I created a New Gradle Project based on Java Quickstart sample project. I did this twice and the second time Eclipse logged an error. Some relevant lines from the stack trace:
Exception:org.osgi.framework.BundleException: Exception in org.eclipse.m2e.core.internal.MavenPluginActivator.start() of bundle org.eclipse.m2e.core
Exception:java.lang.NoClassDefFoundError: org/eclipse/m2e/core/internal/project/registry/ProjectRegistryRefreshJob$1
at org.springsource.ide.eclipse.gradle.core.wizards.NewGradleProjectOperation.createProjectContents(NewGradleProjectOperation.java:106)
First try to build your project from command line.
Enide 2015 by Nodeclipse has built-in Terminal Ctrl+Alt+T
run gradle build
or right-click build.gradle Run as -> gradle build
Then see and think
You are building with Gradle, so don't look at Maven preferences, but Gradle one.
Possibly you confused Gradle and Maven and made wrong preferences, you can try again in new workspace.

maven in command line succeed, but failed when using the same maven in eclipse

I'm trying to build the project of hadoop. I followed the official document as follows on how to do that.
http://wiki.apache.org/hadoop/HowToContribute
https://wiki.apache.org/hadoop/EclipseEnvironment
I've git clone the project, maven install it successfully, but when I import the project, or even a sub-project like 'hadoop-yarn-api', I got the following errors on maven:
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (execution: compile-protoc, phase: generate-sources) pom.xml /hadoop-yarn-api line 73 Maven Project Build Lifecycle Mapping Problem
Then I'm trying to mvn clean install the project via External Tools Configuration in eclipse, it also failed on:
[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:3.0.0-SNAPSHOT:protoc (compile-protoc) on project hadoop-yarn-api: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version -> [Help 1]
But the curious part is that when I cd into the root directory of 'hadoop-yarn-api' and invoke mvn clean install, it can be built successfully.
I'm using m2ecipse in eclipse, and I'm sure that I've changed to the maven which is exactly the one that I'm used in command line, not the embedded one.
And I've installed protocol buffers 2.5.0:
$ protoc --version
libprotoc 2.5.0
Could anyone give me some idea? Many thanks!
P.S.
Eclipse Java EE IDE - Juno Service Release 2
m2e - 1.4.1.20140328-1905
Mac 1- 0.9.4
maven - 3.0.5
Hadoop - 2.2.0

Spring Roo and Maven Project Build Lifecycle Mapping

I downloaded Eclipse IDE for Java EE Developers 4.3.2 and than I installed the following plugins:
Spring Tool Suite - http://dist.springsource.com/release/TOOLS/update/e4.3/
GWT - http://dl.google.com/eclipse/plugin/4.3
After that I downloaded Spring Roo 1.2.5. Next, I created a new Spring Roo project with help of the wizard and in the Roo shell appears:
project --topLevelPackage sample.roo.flightapp --projectName flightapp-gwt --java 7 --packaging JAR
However, Eclipse showed the following problems in pom.xml.
Description Resource Path Location Type
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.4:compile (execution: default, phase: process-sources) pom.xml /flightapp-gwt line 182 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.4:test-compile (execution: default, phase: process-sources) pom.xml /flightapp-gwt line 182 Maven Project Build Lifecycle Mapping Problem
How is it possible to fix the problem with "Maven Project Build Lifecycle Mapping Problem"
This is not a Spring Roo bug: this just tell you that m2e eclipse plugin doesn't know how handle this maven plugins (when execute it on maven lifecycle).
The proof that is not Roo bug is simple: compile it using maven command-line version.
Check this post to try to solve your problem.
Good luck!

Eclipse Indigo + me2 project import: Unknown packaging / could not find artifact

Note: I'm just getting started with Jenkins plugin development and have never used maven before.
I have successfully set up a sample plugin with maven and the command
line. (HelloWorldBuilder is building and running correctly via mvn
hpi:run.)
I have then installed eclipse (indigo) and the m2e plugin and tried to
import the maven project into eclipse. (Via Import > Existing Maven
Projects)
The project is imported, but it displays two errors:
#pom.xml, line 1 :
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
Project build error: Unresolveable build extension: Plugin
org.jenkins- ci.tools:maven-hpi-plugin:1.72 or one of its dependencies
could not be resolved: Could not find artifact com.sun:tools:jar:1.5
at specified path C:\Programme\Java\jre6/../lib/tools.jar
#pom.xml, line 12 :
<packaging>hpi</packaging>
Project build error: Unknown packaging: hpi
Any ideas?
I have already changed the m2e setting (Window > Preferences > Maven > Installations) for the maven installation to use my maven 2.1.1 that I use on the command line.
I have also tried Right-Click-Project > Maven > Update-Dependencies... / Update-Project-Configuration / and Enable-Workspace-Resolution (whatever these settings mean)
This question seems to describe a similar problem, but I have no clue whether it's a duplicate.
I think your Eclipse installation runs under a Java JRE instead of a Java JDK, this is why the tools jar could not be found.
M2Eclipse normally warns the user about that fact at first startup.
The solution is to specify the jdk executable in the eclipse.ini file like shown below.
add:
-vm
C:/Program Files (x86)/Java/jdk1.6.0_26/bin/javaw.exe
before the line starting with -vmargs
1) As Torsten said you need to use JDK, not JRE.
In Eclipse Window->Preferences
Java / Installed JREs
2) See also Jenkins plug-in developing - Maven issue: Unknown packaging: hpi