maven-2

Where should I put Velocity template files for a command line utility built with Maven?

爷,独闯天下 提交于 2019-12-14 02:34:06
问题 I have a small command line utility project that I'm using Maven to manage. The utility is a very simple app to populate a Velocity template and dump the results to a new file. My problem is where to put my Velocity templates. When I put them in src/test/resources/foo/bar/baz , mvn test fails because it can't find the referenced template, even though it is clearly there in target/classes/foo/bar/baz , which is where the .class file for the test and the class under test are located. If I put

JSTL version 1.2 declared but 1.1 delivered from Maven Repository

谁说我不能喝 提交于 2019-12-14 02:03:32
问题 I'm looking for an easy way to fetch a JSTL 1.2 implementation JAR from a Maven repository, which sounds quite easy but in fact proves to be quite difficult. I've tried the following packages: javax.servlet : jstl : 1.2 via http://repo1.maven.org/maven2/javax/servlet/jstl/1.2/jstl-1.2.jar javax.servlet.jsp.jstl : jstl : 1.2 via http://download.java.net/maven/1/javax.servlet.jsp.jstl/jars/jstl-1.2.jar Both these artifacts should contain the JSTL 1.2 implementation. However, when I download the

Should I use Eclipse plug-ins (or OSGi Bundles) as a plain dependency management tool?

时光怂恿深爱的人放手 提交于 2019-12-14 02:02:45
问题 once again it has happened... I joined a new project, composed of several plain Eclipse Java Projects, with interdependencies, all managed through the Project build path. I find this all a bit of a chaos. And when it comes to run configurations - you just enter hell. In the past I've sticked to create plug-in projects, instead of plain Java projects - even if I never intend to run these projects as osgi-bundles. I just find that dependencies are way easier to manage in plug-in projects. Are

How to include a parent Spring project (using Git submodule)?

本秂侑毒 提交于 2019-12-14 01:52:54
问题 I'm currently developing multiple web applications using Spring. I'm using Maven for building and Git for version control. At the moment I'm trying to find a way to split development of some things used by all webapps, e.g. I have some helper classes that are the same for all projects. The problem is, I don't want to use only classes, but also resource files and some sort of parent POM while still being independent from a repository and able to benefit from Git. Although I'm not enthusiastic

Maven Cobertura OutOfMemoryError

送分小仙女□ 提交于 2019-12-14 00:44:49
问题 I am using Maven site:run to generate a cobertura code coverage... The following is my pom.xml configuration for cobertura: <reporting> ... <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>cobertura-maven-plugin</artifactId> <version>2.3</version> </plugin> </plugins> </reporting> However I am getting OutOfMemoryError at the end of the site:run. Please suggest how to get rid of this error. (I have tried all those -Xmx, -XX options...) Exception in thread "Thread-0" java

maven dependencies groovy

与世无争的帅哥 提交于 2019-12-14 00:25:21
问题 I'm running a project that has a dependency on groovy 1.7-beta-1. The gmaven plugin uses groovy version 1.6 as a dependency. In my pom, I specify in the dependency management section the grooyv-all version as : <dependencyManagement> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>1.7-beta-1</version> </dependency> </dependencies> </dependencyManagement> Yet when I run maven in debug mode I see that groovy 1.6 is being used for a

How do I able to store images inside 'src/main/resources/imgs'?

白昼怎懂夜的黑 提交于 2019-12-13 22:30:09
问题 Iam using Maven and Iam trying to download images into a folder inside src/main/resources/imgs Iam unable to download images inside 'imgs' folder , I tried below ways like: a) System.getProperty("user.dir") b) getClass().getClassLoader().getResourceAsStream("imgs"); c) getClass().getResourceAsStream("imgs") BUT none of above working for me. Please suggest me how do I able to store images inside 'src/main/resources/imgs' 回答1: You should be trying to store images into a location that won't be

Maven Plugin Execution Order and excluding js files

女生的网名这么多〃 提交于 2019-12-13 20:48:45
问题 I have developed the pom.xml to first combine all the js files in the project and then compress the JS file. These 2 steps are two plugin and are in compile phase. But some how few times puglin execution order is reversed and build fails. In case some one has seen this issue please redirect me to solution. Secondly, I don't to include the JS in .war which are combined and compressed. 回答1: To strictly answer the first part of the question, plugins bound to the same phase are supposed to be

java.lang.NoClassDefFoundError: org/w3c/tidy/Tidy , Maven project

送分小仙女□ 提交于 2019-12-13 18:27:07
问题 I am trying to run java application built in Maven 2 from command prompt On command prompt I did "mvn package" and got the jar in target folder of the application Then I did:- java -cp target/TempestApp.jar foo.App And I get exception:- Exception in thread "main" java.lang.NoclassDefFoundError: org/w3c/tidy/Tidy at foo.htmltoxml.HtmlToXMLConvertor(htmltoxml.java:29) at foo.app.main(App.java:35) The application comprises of a JTidy. Who's dependency is mention in the POM.xml Application runs

How to use jaxb_commons plugins from maven

*爱你&永不变心* 提交于 2019-12-13 14:59:11
问题 I'm trying to use a jaxb plugin to insert a interface into a choice element generating the classes from maven. The problem is that I can't seem to figure out how to do so from maven, the repository isn't clear from the documentation and the only example (bellow) doesn't work, it seems to ignore the plugin (maven reports no error about not finding it) or the plugin doesn't have all the adds-ons currently listed in the project documentation: <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId>