maven-2

Use maven repository as local ivy cache

喜欢而已 提交于 2019-12-03 03:37:58
问题 Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts. Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy. I would like to use same dir thus saving disk space and network. Thanks. 回答1: You can specify the cache and the layout of the cache by using the <cache/> Tag . I think you will have to alter the patterns for the artifacts/ivy.xml files. The Tag is

Maven - Skip building test classes

非 Y 不嫁゛ 提交于 2019-12-03 03:25:32
问题 Is there a simple way to not build the test classes? mvn clean install -Dmaven.test.skip=true Walter 回答1: According to the documentation on the Maven Surefire Plugin, -Dmaven.test.skip should skip both compilation and execution of the tests. By contrast, -DskipTests just skips the test execution : the tests are still compiled. 回答2: Just to be explicitly clear: skipTests will compile anything in the <testSourceDirectory> , but will not execute them. maven.test.skip will NOT compile any tests,

maven webapp to place jsps in /WEB-INF/jsp

女生的网名这么多〃 提交于 2019-12-03 03:23:47
I have inherited a webapp built using NetBean's internal ant. All jsps reside in: WEB-INF/jsp And the web.xml has hardcoded links to /WEB-INF/jsp/somefile.jsp How can I use the maven war plugin to place the JSP there, maintaining consistency with the current structure ? My pom currently reads: <warSourceDirectory>${basedir}/web/WEB-INF</warSourceDirectory> What the problem? Let's look at a standard war project structure: $ mvn archetype:create -DgroupId=com.mycompany.app \ > -DartifactId=my-webapp -DarchetypeArtifactId=maven-archetype-webapp ... $ tree my-webapp/ my-webapp/ |-- pom.xml `-- src

Divide Spring configuration across multiple projects

…衆ロ難τιáo~ 提交于 2019-12-03 03:21:59
we have quite a few projects that use the same codebase (backend code). Just the frontend tends to be different. We decided that the best approach would be to seperate backend and frontend into different projects: Engine and Project_name Now these are Spring-projects. So it would only seem logical if we divide the Spring configurations aswell: Database.xml , Services.xml would belong to the project Engine . And a specific Frontend.xml would belong to Project_Name . To link these up, I would need a generic SpringBeans.xml that imports all of these XML's. I tried following directory structure:

Repository layout for large Maven projects

坚强是说给别人听的谎言 提交于 2019-12-03 03:17:42
I have a large application (~50 modules) using a structure similar to the following: Application Communication modules Color communication module SSN communication module etc. communication module Router module Service modules Voting service module Web interface submodule for voting Vote collector submodule for voting etc. for voting Quiz service module etc. module I would like to import the application to Maven and Subversion. After some research I found that two practical approaches exists for this. One is using a tree structure just as the previous one. The drawback of this structure is

How to Deploy my Open Source Projects using Maven's Central Repository? [closed]

折月煮酒 提交于 2019-12-03 03:12:00
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . Is there anything I could do to get my own open source stuff into Maven's Central repository? I've wondered many times how I could get my own projects into Maven's Central repository. I was asking this myself, especially as I've seen some well known projects hosting their own repository, requiring users to add

How to extend/customize a WAR with another project

给你一囗甜甜゛ 提交于 2019-12-03 03:04:13
We have the following scenario with our project: A core web application packaged as a war file (call it Core project). The need to "customize" or "extend" the core app per customer (call it Customer project). This mostly includes new bean definitions (we're using Spring), ie. replacing service implementations in the core.war with customer-specific implementations. We want to develop the Core and Customer projects independently When the Customer project is developed, we need to be able to run/debug it in Eclipse (on Tomcat) with the Core project as a dependency When the Customer project is

maven deploy changed artifacts only

眉间皱痕 提交于 2019-12-03 03:03:28
I'm using maven 2.2 with nexus 1.4.0 Let's say I have a pom-structure like this (with corresponding versions) parentproj, v1.0.1 - childproj1, v1.0.2 - childproj2, v1.0.7 childproj1 and childproj2 represent different parts of the application (e g gui and backend) and I want to be able to keep their versions separate so that I can release a new version of the backend without having to release a new version of the gui. Now, to deploy this structure to Nexus it would be convenient to go to parentproj and say mvn deploy -DperformRelease=true which would deploy all artifacts to the Nexus realease

Maven won't run my Project : Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

南楼画角 提交于 2019-12-03 03:00:57
I can't run the Maven Netbeans JavaFX example : Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project mavenproject3: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1] To see the full stack trace of the errors, re-run Maven with the -e switch. Re-run Maven using the -X switch to enable full debug logging. My POM looks like this : <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/xsd/maven

Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor

妖精的绣舞 提交于 2019-12-03 02:59:34
问题 [INFO] [war:war {execution: default-war}] [INFO] Packaging webapp [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor ---- Debugging information ---- message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no