maven-2

Having Maven2 copy resources to the build directory, but NOT bundle them in the JAR

守給你的承諾、 提交于 2020-01-01 03:01:07
问题 I've started a new Maven project in NetBeans, accepting all the defaults. The POM, with all the JAR dependencies stripped out, is cut-n-pasted at the bottom of this question. The application reads in various properties files (e.g. logging and config). It also reads in external resources such as fonts, images, and sounds. I do NOT want all these resources to be bundled up into the JAR file. Instead, I plan to deploy them in subdirectories beneath the directory where the JAR is deployed. A

How to create new Eclipse RCP project using Maven?

蹲街弑〆低调 提交于 2020-01-01 00:45:17
问题 How to create new Eclipse RCP project using Maven (preferably m2eclipse)? I read that there's plug-in for Maven that have idea about Eclipse. (Maven Eclipse Plugin) And then it looks like I need to find some Maven Archetype to create Eclipse RCP project, but I could not. At this point I am in doubt if I go right way. I just want to use maven dependencies resolution and other features in my RCP application development. P.S. I found that it is possible to "Enable Dependency Management" via

merging changes from a maven release branch yields conflicts due to changed versions in poms

丶灬走出姿态 提交于 2020-01-01 00:29:33
问题 following standard practice, I have an svn trunk for feature development, and a forked-off branch for building releases. The branch has been created using the maven release plugin, which is also used for creating releases. As it happens, the occasional bug will be fixed on the branch, and those changes need to be merged back into the trunk. To not miss any changes, I'd like to be able to simply merge the complete branch back into the trunk. Now my problem is that I get numerous conflicts in

Best way to create a maven artifact from existing jar

会有一股神秘感。 提交于 2019-12-31 10:25:10
问题 I'm mavenizing some projects. These projects all depend on a number of libraries, most of them are available in the maven repo. For the other libraries, I'd like to create a maven artifact, so I can use it as an dependency. The problem is, I only have jar files of these libraries. What is the best way to create artifacts from existing jar files? 回答1: If you're not using a remote repository (which is a common situation for personal development), simply install these artifacts in your local

eclipse debugger: attaching source-code of maven dependencies?

会有一股神秘感。 提交于 2019-12-31 10:22:11
问题 I'd like to use the source code of maven-managed dependencies when debugging our webapp in myEclipse 8. I have managed to attach the sources to the libraries in the "Maven Managed Dependencies" classpath container, i.e. when I open a class file from a dependency (e.g. using Ctrl-Shift-T), I see the source code. However, when I define a server connector for my tomcat, deploy the wepapp to it, and launch it in debug mode and execution halts on a breakpoint in that same class, the editor pane

Maven release via Hudson

青春壹個敷衍的年華 提交于 2019-12-31 09:58:49
问题 I'm setting up Hudson to use the batch-task plugin to do maven releases to our internal repository. I'm doing it via: mvn --batch-mode release:prepare mvn --batch-mode release:perform I'm interested in other methods people have used and the pros and cons of those methods. Also, any gotchas people have come across. 回答1: I have tended to do the releases always by hand for a few reasons. First if you have to roll back it's easier when you can go back to the original release location and do it.

Is there a way to hide Maven 2 “target/” folder in Eclipse 3?

我的未来我决定 提交于 2019-12-31 08:02:41
问题 I'm using maven 2.0.9 with Eclipse 3.3.2. I'm used to launching a fresh build once per day by a mvn clean install . Then, if I refresh my Eclipse project, it will be "polluted" by files from Maven's target directory. That's very annoying while performing searches, getting resources by "open resource" and so on. Is there a way to avoid Eclipse looking in this folder? 回答1: Right click on the folder you want to ignore, open the "Properties" dialog, chose the "Resource" tab and check the box that

Is there a way to hide Maven 2 “target/” folder in Eclipse 3?

时间秒杀一切 提交于 2019-12-31 08:02:10
问题 I'm using maven 2.0.9 with Eclipse 3.3.2. I'm used to launching a fresh build once per day by a mvn clean install . Then, if I refresh my Eclipse project, it will be "polluted" by files from Maven's target directory. That's very annoying while performing searches, getting resources by "open resource" and so on. Is there a way to avoid Eclipse looking in this folder? 回答1: Right click on the folder you want to ignore, open the "Properties" dialog, chose the "Resource" tab and check the box that

Is it possible to get maven to accept maxerrs for its compiler plugin?

梦想与她 提交于 2019-12-31 00:55:11
问题 I have a project where I am responsible for fixing some errors and another developer is responsible for other errors. The number of errors is well over a hundred, and as I'm fixing my errors, her errors are piling up. I'm at the point where I see 99 of her errors and one of mine, and I assume I will soon get to a point where it is 100 of hers. I looked into using this configuration for maven: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId>

Why datasource is not found in JNDI after injection from jndi.properties?

梦想与她 提交于 2019-12-30 18:01:33
问题 This is my persistence.xml : <persistence> <persistence-unit name="MyUnit"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>jdbc/abcDS</jta-data-source> </persistence-unit> </persistence> This is jndi.properties file from src/test/resources which is supposed to create a datasource during testing, since a real application server with a real datasource is absent: java.naming.factory.initial=org.apache.openejb.client.LocalInitialContextFactory jdbc/abcDS=new:/