m2e

Permanently mark goal … in pom.xml as ignored

和自甴很熟 提交于 2019-12-25 05:06:16
问题 I have a web project in eclipse using m2e. I had an error about a missing artifact in pom.xml and I clicked Permanently mark goal ... in pom.xml as ignored. What happened was it no longer copies the jar files from my repository. How do I undo this action. Don't know what configuration file or settings file was changed when I did that 回答1: I am assuming you are using m2e v1.1. In this version, you can choose which pom in the hierarchy gets marked as having its lifecycle mapping ignored. If it

How can my project access its “resources” directory both when run in Eclipse and from a Maven-packaged jar file?

為{幸葍}努か 提交于 2019-12-25 03:54:23
问题 I'm working with Maven project in Eclipse (with help of m2e plugin). When I pack my project into jar-file (mvn install), all files from "resources" are located in the root of jar. Therefore, in my program I should use only bare file names: File file = new File("foo.txt"); But when I build and run my project by Eclipse, I would have to use the relative path to the file: File file = new File("src/main/resources/foo.txt"); What should I do to solve this problem? 回答1: To access your program's

xmlbeans-maven-plugin not finding javac

[亡魂溺海] 提交于 2019-12-24 08:48:42
问题 I am trying to setup xmlbeans-maven-plugin 2.3.3 in my Eclipse and while everything seems to go OK, It fails with an java.io.IOException due to inability to find the file C:\Users\Daniel\Workspace\MyProject\javac . This is strange because javac is on the system's %PATH% so why would it try to find it in %PROJECT_LOC%? I found this problem description which sounds very similar to mine, but I placed the JDK path in front of all other paths and that didn't help. Any idea how to tell the xmlbeans

Parser Error cxf-beans.xml no declaration can be found for element 'jaxws:endpoint'

懵懂的女人 提交于 2019-12-23 09:59:02
问题 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf

How to cleanly stop m2e cargo:run from Eclipse?

我是研究僧i 提交于 2019-12-23 09:03:36
问题 Using the run mojo from the cargo-maven2-plugin I would like to know of a better way to shut down the container. The console output says Ctrl+C to stop, but that seems to do nothing. If I terminate, it leaves an orphan java.exe process that I have to kill myself. Am I doing something wrong? This is a little cumbersome. Edit: I am usign Tomcat in a standalone config. If I use embedded Jetty, naturally terminate works, however we need Tomcat. 回答1: The CTRL + C thing seems to be a known Eclipse

maven integration in eclipse new project checked out but can't navigate

烂漫一生 提交于 2019-12-23 07:47:33
问题 I am struggling with maven in Eclipse even though I have m2e. I checked out a maven project from CVS and cannot navigate anywhere. If I try References > Project , I get a pop up saying: "Problems opening an editor Reason: services does not exist". services is the name of the main project, which has sub projects within it. It all builds successfully so I am not sure why Eclipse does not work. I suspect something related to classpath but have no idea how to edit it since it is not available

Added Maven dependency, Eclipse doesn't see it

做~自己de王妃 提交于 2019-12-23 07:37:09
问题 I add guava 17.0 to my pom.xml, Eclipse automatically rebuilds project. Ran mvn dependency:resolve , maven shows com.google.guava:guava:jar:17.0:compile in the list of resolved files. However when in Eclipse I try to auto-complete com.google.g , it says "No default proposals". I've added dependencies in my pom.xml before, run mvn dependency:resolve and Eclipse picked them up immediately. What's different this time? I've tried the following so far: Tried cleaning the project and letting it

Eclipse fails to update Maven index while behind company proxy

旧巷老猫 提交于 2019-12-23 02:28:22
问题 Eclipse Mars m2e plugin fails to download repository index updates on startup. I run Eclipse behind a company firewall but the proxy settings work fine for "check for updates", "eclipse marketplace", and eclipse's built-in browser. I have tried the following: Deleting the cache directory \eclipse\p2\org.eclipse.equinox.p2.repository\cache and then refreshing the repositories. Preferences -> Install Update -> Available Software Sites => select the entry and click "Reload" Adding -Djava.net

Unable to start Jetty Server - Error scanning entry META-INF/versions/9/

折月煮酒 提交于 2019-12-22 09:49:31
问题 When running XACML-PAP-ADMIN and XACML-PAP-REST on Windows 10. Java jdk1.8.0_144. I get next error: Error scanning entry META-INF/versions/9/module-info.class from jar file:///D:/Projects/XACML/XACML-PAP-ADMIN/target/xacml-pap-admin-2.0.0-SNAPSHOT/WEB-INF/lib/log4j-api-2.11.0.jar 回答1: That could be linked to your version of Jetty, considering it fails on log4j 2.11 jar. See this question: log4j 2.9 and later are multi-release jars for Java 9. Make sure to use a Jetty compatible with that, or

How to set default Maven's Java in Eclipse?

纵饮孤独 提交于 2019-12-22 04:08:02
问题 If I create new Maven project in Eclipse and base it on quickstart archetype, it appears with J2SE-1.5 in Java Build Path window and 1.5 in Java Compiler / JDK Compliance window. So, I usually have to change this to other Java manually. Where are these default setting come from? How to change to 1.6 or 1.7? 回答1: The m2eclipse plugin uses the settings from the POM. So you need to add this to your POM: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin<