maven-2

how to generate download-site using maven

余生长醉 提交于 2020-01-13 18:28:26
问题 I am new to Maven and trying to accomplish a simple task: build jar package and web site [DONE] deploy them to remote server via scp [DONE] the site should contain download page with links to the deployed jar files [MISSING] I do not want to use archiva or similar tools. I just want to have a (static, generated) page on the web site with the links to all the built jars (or only to the latest build). I tried: put <item name="Downloads" href="download.html"/> into the site.xml mvn commons

Using Maven to build separate JAR files for unit testing a custom class loader

≡放荡痞女 提交于 2020-01-13 13:09:27
问题 As part of my current project I've created a custom class loader. Part of the unit tests for the custom loader involves using some JAR files to demonstrate the proper behavior of the loader. I'd like to build the test JAR files from Java sources ahead of running the actual unit tests. Further, the test JAR files cannot be on the class path when the unit tests are run, since I want to dynamically load them during the test execution. Is there a standard pattern for accomplishing this sort of

converting an eclipse formatter file to a checkstyle file

 ̄綄美尐妖づ 提交于 2020-01-13 08:31:12
问题 I have an eclipse formatting file (which contains some configurations) and i want to make the same thing (these configurations) for a checkstyle file to use after with maven build. 回答1: Unfortunately, there is no way to convert a formatter file to a checkstyle ruleset at the moment. You have to do it the other way around as explained here. Otherwise you have to adjust every setting in your formatter manually for checkstyle. 回答2: The Eclipse-Checkstyle plugin provides an export feature to

Passing the Maven Debug Flag from Hudson

♀尐吖头ヾ 提交于 2020-01-13 08:19:09
问题 I'm having an issue with a maven build in hudson. This issue would be fairly easy to resolve if I could see the output of maven with the -X flag passed in. However I can't find a way to do this. If I specify "-X" in the "Goals and options" field of the "Build" section in the job configuration my console output looks exactly the same as if I had not passed the "-X" flag at all. Is the debug logging going somewhere else? Or is there some other way I need to pass the "-X" flag? UPDATE: The

Using maven2 to build autotools-based C/C++ package

本秂侑毒 提交于 2020-01-13 05:14:05
问题 I am working on a collection MATLAB, Java, and C/C++ components that all inter-operate, but have distinctly different compilation/installation steps. We currently don't compile anything for MATLAB, use maven2 for our Java build and unit tests, and use autotools for our C/C++ build and unit tests. I would like to move everything to a single build and unit test system, using maven2, but have not been able to find a plugin that will allow the C/C++ codestream to remain autotools-based and simply

Maven replacement?

…衆ロ難τιáo~ 提交于 2020-01-13 02:56:11
问题 What would you suggest as a replacement to the Maven Java build toolset? Just plain Ant scripts? SCons? 回答1: While I like the idea of Maven, I always find myself fighting it for anything but the simplest configurations. Its architecture is plugin-based, and the quality of the plugins varies widely. Documentation is sketchy at best; half the time I can't figure out if the doc I'm reading is for Maven 1 or 2. And how often have you had to resort to using the maven-ant-plugin to do something

Maven : OSGI, bundles and multi-modules projects

强颜欢笑 提交于 2020-01-12 13:57:07
问题 I'm currently developing an OSGi based application (using Equinox) by trying to mavenize a web tutorial I've found on OSGi+Equinox. In this project, there are bundles depending on other bundles (quote-service depends on quote). The compile phase does succeed, but the package phase does not. Maven complains the following : [INFO] [bundle:bundle] [ERROR] Error building bundle de.vogella.osgi:quote-service:bundle:0.0.1 : Unresolved references to [de.vogella.osgi.quote] by class(es) on the Bundle

What Version of Maven is Compatible with Java 6?

笑着哭i 提交于 2020-01-12 06:46:23
问题 I have to work in an older project that requires java 6 to run, as there are references to depreciated sun classes that have been removed in future versions. As part of the process, I changed my jdk from 8 in my system path to point to java 6 jdk. After doing so I get: Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader

Maven: System dependency pointing to multiple jars

故事扮演 提交于 2020-01-12 03:22:26
问题 Is it possible to define a dependency in the pom such that it has the scope of system but points to multiple jars? I'm sure this is quite unorthodox, however, I was just wondering whether this was even possible. So something like: <dependency> <groupId>foo</groupId> <artifactId>foo</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${basedir}/lib/foo/*.jar</systemPath> </dependency> 回答1: First (and I'll never repeat it enough), using system scoped dependencies is

Maven property overloading

大兔子大兔子 提交于 2020-01-11 05:05:52
问题 I have very simple maven descriptor which defined some properties: <?xml version="1.0"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <properties> <it.port>8080</it.port> </properties> </project> I can override it.port property with command: $ mvn -Dit.port=8181 verify But following command doesn't work as expected: $ MAVEN_OPTS="-Dit