maven-2

custom pom.xml filename in maven multimodule

笑着哭i 提交于 2019-12-21 07:27:14
问题 I have a maven3 multimodule project, and for a strange reason i need to customize POM filename for one of my child module (ie: module-pom.xml) Is it possible to configure this in the parent pom ? The strange reason is a bit long to explain sorry, but you will have the plain context. Context I'm working on a closed source project that also use LGPLed projects. this project is called main I want main to declare modules of every projects, closed and opened. The full build should be made with a

Should Maven dependency version ranges be considered deprecated?

筅森魡賤 提交于 2019-12-21 07:23:27
问题 Given that it's very hard to find anything about dependency version ranges in the official documentation (the best I could come up with is http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution), I wonder if they're still considered a 1st class citizen of Maven POMs. I think most people would agree that they're a bad practice anyway, but I wonder why it's so hard to find anything official about it. 回答1: They are not deprecated in the formal sense that they will be

Common test data for multiple independent maven projects

社会主义新天地 提交于 2019-12-21 05:33:16
问题 I have a maven project that converts text files of a specific format to another format. For testing I have put in src/test/resources a large amount of test files. I also have another project that uses the first one to do the conversion and then do some extra stuff on the output format. I also want to test this project against the same test dataset, but I dont want to have duplicate data sets and I want to be able to test the first project alone since it is also a standalone converter project.

Can Eclipse ignore .cvsignore files when synchronizing with a CVS repository?

China☆狼群 提交于 2019-12-21 05:24:32
问题 I am working with a team environment with a heterogeneous blend of IDE's among different developers. Some use Eclipse, others NetBeans, others IntelliJ, etc. The code projects are all structured around Maven... so nobody cares which IDE you use as long as it can play with Maven. To that end, we're not supposed to commit any IDE-specific files (e.g. ".project", ".classpath") to the CVS repository. I believe that this second part may be overkill... but we're also not supposed to commit our "

Spring Batch, JdbcExecutionContextDao java.util.Map$Entry deserializer issue, xstream 1.4.1

别说谁变了你拦得住时间么 提交于 2019-12-21 05:09:21
问题 I have a problem using Spring Batch 2.1.9: when i use jobExplorer.getJobExecution(jobExecutionId) , i find a problem when DAO has to deserialize a string like: {"map":[{"entry":{"string":"parsedComparingDate","date":"2014-03-08 23:00:00.0 UTC"}}]} from the BATCH_JOB_EXECUTION_CONTEXT table, using method JdbcJobExecutionDao.getJobExecution() . I know that spring batch uses xstream 1.3, but in my Pom, i have: spring-batch 2.1.9 ; xstream 1.4.1 (inherited from smooks); jettison 1.3.3 (inherited

Maven repository for EJB 3.1 API

亡梦爱人 提交于 2019-12-21 04:17:06
问题 What Maven repository can I use for EJB 3.1 API dependency? 回答1: This dependency from central worked. <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> 来源: https://stackoverflow.com/questions/2429245/maven-repository-for-ejb-3-1-api

Change maven dependency for artifact using classifier

五迷三道 提交于 2019-12-21 04:15:53
问题 With the maven jar plugin I build two jar: bar-1.0.0.jar and bar-1.0.0-client.jar. Actually in my POM I have the following dependency: <dependency> <groupId>de.app.test</groupId> <artifactId>foo</artifactId> <version>1.0.0</version> </dependency> This artifact exist also in two version bar-1.0.0.jar and bar-1.0.0-client.jar I want to make bar-1.0.0-client.jar dependent of foo-1.0.0-client.jar and bar-1.0.0.jar dependent of foo-1.0.0.jar . ================ ->First (wrong) solution: define the

How to display buildnumber in spring-based web application

て烟熏妆下的殇ゞ 提交于 2019-12-21 04:15:38
问题 I need to display build number in my index.jsp page <!DOCTYPE HTML> <html> <head> <meta charset="UTF-8" /> <title>Title (build: BUILDNUMBER ) </head> The build number can be supplied by maven into a *.properties file. What is the best way to read *.properties file and display a property with Spring? 回答1: You may load the .properties file as a localization message source (using ResourceBundlerMessageSource) and access it in JSP using <spring:message> or <fmt:message> : src/main/resources

Code generation in Maven

試著忘記壹切 提交于 2019-12-21 04:07:56
问题 I want to autogenerate some java classes from interfaces. My first thought was to write a code generator, and integrate it as a maven plugin. I was thinking of creating a maven plugin with a codegen goal that is called during the build process. So if I choose this route, how do I provide the plugin with the interfaces to be processed? And where should the generated files go? Are there any existing plugins that can be configured to generate default class implementations? 回答1: Sources should go

I have build errors with m2eclipse but not with maven2 on the command line - is my m2eclipse misconfigured?

大兔子大兔子 提交于 2019-12-21 04:03:27
问题 I installed m2eclipse to build a java project in Eclipse. I imported the project as follows: Import-> Maven-> Existing Maven Projects-> Import Maven Projects-> - Select root directory - Select pom file - Click Finish To be sure m2eclipse was actually building the project, I deleted the target directory and made sure it was re-created by m2eclipse and it was. But unlike with the command-line version of maven which built everything perfectly, m2eclipse leaves a large number of build errors in