maven-3

In Maven, my dependencies are set up but I get a ClassNotFoundException when I run generated jar

非 Y 不嫁゛ 提交于 2019-12-18 09:38:27
问题 I was following along with the maven tutorial at http://www.youtube.com/watch?v=IRKu8_l5YiQ. I created a maven project with the default archetype. Then I added the following dependencies to my pom.xml: <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.7</version> </dependency> Then I tried to put a Logger into my App.java file. This file comes built in with the default maven archetype that I used. The code for that is below: package GroupID; import org

java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher when running bash file to build the project

∥☆過路亽.° 提交于 2019-12-18 05:43:33
问题 hi guys i have maven 2 installed, when i use mvn clean or mvn install in the app root it works fine but when trying to use maven install inside a bash script i got the above exception: this is my script: #!/bin/sh #dirname='/home/myuser/workspace/myapp' DIRECTORY=$(cd `dirname $0` && pwd) cd $DIRECTORY mvn install -s resources/settings.xml $1 it was working fine with maven 3, but after i installed maven 2 and configured it, it stopped working and gave me above exception, i don't know what is

how to use class file from another war

纵饮孤独 提交于 2019-12-18 04:01:05
问题 We have two different web application and we want to extend few controllers of one war into another war. We are using maven to build the project. to include war we have given its dependency as <dependency> <groupId>com.abc.exchange</groupId> <artifactId>employer</artifactId> <version>2.3.M2-SNAPSHOT</version> <type>war</type> <scope>compile</scope> </dependency> It is unable to build giving class not found exception. Can any body help me out how to achieve this? I am getting error maven build

component lookup exception with org.apache.maven.repository.RepositorySystem in Maven plugin testing

那年仲夏 提交于 2019-12-18 03:49:14
问题 I'm trying to use maven-plugin-testing-harness version 2.1 with the following test case: public class FooTest extends AbstractMojoTestCase { @Override protected void setUp() throws Exception { super.setUp(); } public void testSomething() throws Exception { // todo } } The test fails at the setUp() call: org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException role: org.apache.maven.repository.RepositorySystem roleHint: at org.codehaus

Specify common resources in a multi-module maven project

一笑奈何 提交于 2019-12-18 03:01:53
问题 Is there any way to share resources between modules of a parent project in Maven? For example, I would like to specify one log4j.properties file for all the modules in a multi-module Maven project. Generally, I use Eclipse IDE to create the parent project by choosing a general project and then convert it to a Maven project by specifying a packaging of pom . This creates a "clean" project structure without src and etc. folders. I wonder where such a shared resource should be put in this case.

Shared Maven Repository across developers

爱⌒轻易说出口 提交于 2019-12-18 01:15:05
问题 Is there any way to avoid developers download all dependencies and have those dependencies located to shared locattion to all the developer and each developer working on project point to that location? Can anyone explain with sample files and example? 回答1: Best is to go with one of the repository managers for maven. The main steps for the setup will be: - Install a central repository on an internal machine - Configure the central repository to proxy the repositories you need for your

Shared Maven Repository across developers

我只是一个虾纸丫 提交于 2019-12-18 01:13:45
问题 Is there any way to avoid developers download all dependencies and have those dependencies located to shared locattion to all the developer and each developer working on project point to that location? Can anyone explain with sample files and example? 回答1: Best is to go with one of the repository managers for maven. The main steps for the setup will be: - Install a central repository on an internal machine - Configure the central repository to proxy the repositories you need for your

Creating a new phase

老子叫甜甜 提交于 2019-12-17 23:29:59
问题 I am working on a project using Maven for which I need two new phases: 'analyze' and 'eval' (for different phases of data analysis). I've read all the docs I can find, and created versions of components.xml and lifecycle.xml that are as close as I can get to correct, but Maven refuses to run the new phases. (I should emphasize that I have no problem getting my plugins to work, and no problem binding them to the existing phases provided by the default lifecycle. My problem is that the new

Problems setting up Maven [duplicate]

允我心安 提交于 2019-12-17 22:34:14
问题 This question already has answers here : Adding directory to PATH Environment Variable in Windows (18 answers) Closed 5 years ago . I am having difficulties installing Maven. I have set all the enviromental variables according to this: http://maven.apache.org/download.html Although I am using windows 7, when I try and run the command mvn --version , I get, mvn is not recognized as an internal or external command etc. When I run it from within src\bin , I get the error: Exception in thread

IntelliJ new project - maven archetype list empty

大憨熊 提交于 2019-12-17 21:58:50
问题 When creating IntelliJ → New Project → Maven , the archetype list is blank and does not populate no matter how long the amount of time elapsed. The "Loading archetype list..." continues but does not appear to do much. Any suggestions? Info from mvn -v : Apache Maven 3.2.5 (NON-CANONICAL_2014-12-25T17:13:28_root; 2014-12-25T05:13:28-08:00) Maven home: /opt/maven Java version: 1.8.0_25, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-openjdk/jre Default locale: en_US, platform