maven-2

Maven Producing Empty JAR

南楼画角 提交于 2019-12-12 18:25:16
问题 I have the following pom file: <build> <defaultGoal>package</defaultGoal> <sourceDirectory>src/web</sourceDirectory> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <includes> <include>src/web/**/*.java</include> </includes> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <configuration> <outputDirectory>lib</outputDirectory> </configuration> </plugin> </plugins

Checkstyle not working

一世执手 提交于 2019-12-12 18:15:40
问题 I am new to maven and chekstyle, so need to ask some question... I want to use checkstyle in my maven based project, so in my pom.xml I have add the dependency <dependency> <groupId>checkstyle</groupId> <artifactId>checkstyle</artifactId> <version>2.4</version> </dependency> and also I have added the entry in plugin tag: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.4</version> <configuration> <enableRulesSummary>true<

@RunWith causes Maven to ignore my Test running with my own runner

扶醉桌前 提交于 2019-12-12 17:14:49
问题 I am moving from using only Intellij to manage my build system to Intellij/Maven. When I run my integration test "MapSimulationTest" with my own runner via @RunWith(KmlParameterizedRunner.class) Intellij correctly handles the situation, the directory specified by the system property "user.dir" is scanned for .kml files and each is tested. The problem seems to be that Surefire ignores @RunWith, any suggestions? Here is what the maven log shows... -----------------------------------------------

How do I configure Maven Cargo to use an embedded Tomcat server?

…衆ロ難τιáo~ 提交于 2019-12-12 17:06:08
问题 I'm using Maven 3.0.3. Is there a way I can use the Maven Cargo plugin to spin up an embedded Tomcat server? Right now, it seems I have to install it myself first. I get this error when I try and change the container type to "embedded" ... [ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.1.2:run (default-cli) on project jx: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.1.2:run failed: Cannot create configuration. There's no registered

Convert web application project to maven project and convert corresponding .classpath file to pom.xml

对着背影说爱祢 提交于 2019-12-12 16:30:16
问题 Is it possible to convert project .classpath file to pom.xml after converting a simple web application project to maven project? Because if my project uses many jars and I want to convert it to maven then I will do configure->convert to maven but then it is not possible to add all the jars dependencies in pom.xml manually. So is there any tool to convert this. 回答1: First there is no tool to do such things. The problem is usually that you have a larger number of dependencies which you don't

problem with maven webapp-cache.xml

♀尐吖头ヾ 提交于 2019-12-12 15:56:27
问题 We have a web application configured with maven. I have done a re-factoring (moved a file from one package to another) outside of eclipse, since this is not setup on eclipse and it is small fix. But, however I did forget to update reference to this file in a file. Then I did mvn clean install surprisingly it is built successfully. Later it got failed on CI machine. When I searched for text occurrences of the file I have re-factored, I have found an occurrence of this file name in target\war

How to deploy a specific child project with cargo:start using maven

妖精的绣舞 提交于 2019-12-12 15:42:00
问题 I have a developed application and I am just trying to make the build process easy. The POM file for parent looks like this: <parent> <groupId>com.shc.obu.ca</groupId> <artifactId>shcobuca-pom</artifactId> <version>1.1.0</version> </parent> <groupId>com.shc.obu.ca.osol</groupId> <artifactId>apps-pom</artifactId> <version>${currVersion}</version> <packaging>pom</packaging> <name>Outlet Apps</name> <scm> <connection>scm:svn:https://ushofsvpsvn2.intra.searshc.com/svn/outlet/outlet/trunk/apps<

Run Ant task from Maven

十年热恋 提交于 2019-12-12 14:39:06
问题 I'm using Ant to build a custom jar library, which then I'm using in Maven as dependency. <dependency> <groupId>test-lib</groupId> <artifactId>test-lib</artifactId> <version>1.0.0system</scope> <systemPath>${basedir}/src/main/webapp/WEB-INF/lib/test-lib-1.0.0.jar</systemPath> </dependency> So, basically what I do now is: 1) run ant to build custom library (test-lib-1.0.0.jar) 2) run: mvn compile, to compile my project using custom library among others. Is there an option for me to do all this

Separating tests from src with Maven Project?

孤者浪人 提交于 2019-12-12 14:31:43
问题 I've just started working on a Java project (as I usually use .net), and one of the first things that strikes me as odd is that in the Maven project there is a /src and a /test directory where obviously the source code and the tests should go. In .net I preferred to have the tests in a separate assembly/project, so for example I would have: MyProject MyProject.Tests That way I dont have to bloat my deployed code with any tests and it makes it easier to test my code in true isolation and in a

Maven: unable to install 3rd party jar

风格不统一 提交于 2019-12-12 13:17:25
问题 trying to install a 3rd party jar into my repository (alfresco-repository.jar). I'm using the following command: mvn install:install-file -DgroupId=alfresco -DartifactId=alfresco -Dversion=3.1 -Dpackaging=jar "-Dfile=C:/Users/xxx/Development/WIP/Alfresco/common/jars/alfresco/3.1/lib/alfresco-repository-3.1.jar" -DgeneratePom=true -e and I'm getting the following exception (-e used for more information): [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: