maven-3

Fitnesse Maven Classpath plugin cannot resolve remote dependencies

 ̄綄美尐妖づ 提交于 2019-12-11 13:03:11
问题 I am using the Fitnesse Maven classpath plugin that allows Fitnesse to resolve the classpath using the Maven repository. The plugin works, but it does not seem to be able to resolve dependencies that are stored in my remote repository. It can resolve a snapshot if it's in my local repository but not remotely. If I run a mvn install (from outside Fitnesse) then it has no problems finding the dependencies so that suggests my settings.xml is set up correctly. I've debugged the plugin but am

How to use JACOB in an OSGi application?

心不动则不痛 提交于 2019-12-11 12:58:53
问题 I have an OSGI (more precsiely a Wisdom framework-based) application in which i would like to use the JACOB library to interact with Office (the goal being to transform PPT into images). I can easily add the JACOB jar to my CLASSPATH, but JACOB requires the dll to be available in the java.library.path environment variable. Question : How can I add it in my maven build? EDIT I'm using maven 3 回答1: You probably have three possibilities for this use case MAVEN_OPTS You could use the MAVEN_OPTS

Including artifiacts from pom package module in maven-assembly-plugin

拥有回忆 提交于 2019-12-11 12:50:42
问题 This is my current maven build module structure. Maven-assembly-plugin with assembly descriptors are used for the build. It works but I am not sure if this is the right way to do it. Code here on GitHub.com p-build-root (packaging:pom) | |---p-build-data | (packaging:pom, builds data.tar) | |---p-build-scripts | (packaging:pom, builds a scripts.tar) | |---p-build-final | (packaging:pom, builds p.tar) | (In p.tar, need to include data.tar and scripts.tar) | (dependency: | p-build-data:type[tar

Not able to read environment variable in persistence.xml

醉酒当歌 提交于 2019-12-11 11:59:22
问题 I have a Maven3 project where I'm using the tomcat7-maven-plugin. I would like to set the path for the embedded database via an environment variable argument to the jvm. Reading the variable with System.getenv("myDataDir") within a Java-Method returns the correct path. But when I try to set the variable ${myDataDir} in my persistence.xml and then I start tomcat with "mvn tomcat:run" I get FileNotFoundExceptions because the variable is not replaced with the actual value (it says e.g. Cannot

Detect OS and Java on Windows and Linux

血红的双手。 提交于 2019-12-11 11:15:41
问题 I have a JavaFX project based on Maven. I want to build the Maven project on Windows and on Linux. In order to automate the process when I deploy the bundle I want to automatically detect the operating system. In windows I have this configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> <compilerArguments> <bootclasspath>${sun.boot.class.path}${path

maven dependency problem when jenkins builds the project

我与影子孤独终老i 提交于 2019-12-11 10:47:24
问题 I have two maven projects, let's say A and B, merely A requires B, reverse is not true. There is no problem when I package A from eclipse. In the "pom.xml" of the project A has a dependency node on B. In jenkins, I configured the project B by adding three goals, which are "clean package install". Therefore, whenever the build of B finishes, it must be exist the archive file of the B in my local maven repository that there is(I checked it). On the other hand, when I build the project A, I got

What versions of cobertura and surefire plugins work together under maven3?

。_饼干妹妹 提交于 2019-12-11 09:37:02
问题 What versions of cobertura and surefire plugins work together under maven3 ? After switching to maven3 I've found out, that mvn cobertura:cobertura is no longer generating report about test coverage (the coverage displayed is 0%). It was working under maven2... However, after finding, that in one of the other projects reports are still working, I've analysed the effective pom. After finding out I was using other versions of plugins, I've downgraded maven-surefire-plugin from version 2.8 to 2

How to exclude jars from ear

别来无恙 提交于 2019-12-11 08:47:39
问题 I am bundling EAR from a WAR file. The JARS are placed both in WARFile/WEB-INF/lib folder as well as EARFile/lib folder with duplication. Do we need the JARS again in EARFile/lib folder inspite of having in WARFile/WEB-INF/lib? If we do not need in EAR/lib filder, How can we remove them? The EAR file size became double due to duplication JARs presence in both WAR and EAR. Please help me. Thanks 回答1: Good read here on "skinny" wars. Basically, you put the jars in the ear, but not the war files

NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class

大城市里の小女人 提交于 2019-12-11 08:25:15
问题 I am using maven for building a GAE/J web application. Until now I haven't had any problems but now whenever I try to run the development server I get a NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class . Here is an extract of the console log: ... INFO c.g.a.d.DevAppServerRunner - WARNING: failed JettyContainerService$ApiProxyHandler@4e4ad8a3: java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory is a restricted class. Please see the Google App Engine developer's guide for

How do I instantiate MavenResolver for ModelBuilder usage?

≯℡__Kan透↙ 提交于 2019-12-11 07:53:09
问题 This is a continuation of this answer. I'm trying to access a pom.xml's full effective pom programmatically by using the maven-model-builder. I'm currently blocked by the fact that I need to create a MavenResolver object. I have found DefaultMavenResolver but it has restricted access. I'm also in a project that is not a maven plugin. It would be great if I can instantiate this without executing maven as well. 回答1: Actually that was pretty simple (I used Scala, but that doesn't really matter):