We are planning to release our corporate nexus repository to the developers. The problem in hand is that, we would like to enforce standards on the versions of jars that could be downloaded from the repository. For example, If we already have Spring framework version 3 available in nexus as an organization standard, then the developers c...
I am using NetBeans with the JaxWS maven plugin. My app has about 5 different wsdls I need to load. My problem is I want to stop maven or wsimport from recompiling my wsdl every time. I would like to be able to work/compile offline. If no connection is available do not attempt to pull down. This seems like staleFile or Keep would fi...
Hi,
I have to replace a java source file during maven compile if a special profile is active.
I thought about just excluding the file from the standard src/main/java/ and including it from another source directory like src/main/java2/.
But since the files have to have the same name and package the exclude always wins and the file from t...
Hi,
I have a maven project which builds OK locally (windows).
When i try to build it on our svn server (linux) it hangs when running tests.
I see a tmp file which is created:
nfs0000000001e9c8a900000017
in the following dir from my test module:
/project_name-test/target/surefire-reports
The config in the pom is:
<plugin>
...
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?
...
I'm using maven and storing a properties file in src/main/resources which I can read fine like:
properties.loadFromXML(this.getClass().getClassLoader().
getResourceAsStream("META-INF/properties.xml");
Is it possible to then write to this file when it is packaged up as a jar? I've tried the following:
propertie...
I'm working on a Java site (jQuery, Wicket, Maven, Spring, Hibernate) and we have just started using a CDN to serve static files on our production server. We use a placeholder for the CDN domain, and have added it to every static file that references a static file. The placeholder gets replaced by Maven through properties filters with Ma...
When I generate a Cobertura report by running "mvn cobertura:cobertura" (or "mvn site") then a report is generated which shows the test coverage for my classes but when I click on a class then the message "Unable to locate de/ailis/foo/Bar.java. Have you specified the source directory?" is displayed. How can I fix this? I configured the ...
Hi,
I have a parent POM with the following config
<groupId>com.example</groupId>
<artifactId>parent</artifactId>
<version>1.2-SNAPSHOT</version>
Each child project which inherits from this parent POM, has a config such as the following:
<parent>
<groupId>com.amadeus.jcp.ui.skinning.skinning-system</groupId>
<artifactId>paren...
Is there an easy way to download all the official Maven plugins (http://maven.apache.org/plugins/index.html) with one command?
I'm setting up an offline repository for use within a corporate environment and I wanted to make sure that I had all the official maven plugins available.
...
What's the best way to package Java software for running on Windows? Is there a standard for writing .BAT files which can discover the latest installed JRE on the machine? Are there any Maven plugins for this? What's the deal with executable Jar files?
...
We have a aggregation .pom set up to include several, individual modules, similar to the Maven documentation:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<packaging>pom</packaging>
<modules>
<module>my-module</module>
<module>...
Im a new user in maven. I have few doubts.
I have some BAT files that has to executed via maven
While executing my default commands, I need to echo the status like "Started first task"
When the task gets failed user should get error message popup etc.,
Automatic repository update through maven
Maven calling ant to build *.war
Copying...
I'm developing a maven project with following structure:
main // project which packaging is pom
|-- datalevel-project
|-- service-project
`-- web-ui-project
I'm trying to run project on tomcat but when I command mvn tomcat:run on the folder of main project I get an error while it is building the service-project:
Failed to resolve ...
In the lower levels of the application I am working on, the application uses SunJCE to encryt something (I'm pretty sure exactly what it is doing is not relevant to this question). Please let me know if you need more info on that and I'll dig it up.
We always use a Sun JDK,so the having the dependency of the SunJCE is not a big issue f...
Trying to create a multi module maven project in eclipse.
Parent Pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>parent</gro...
I'm using metro 2.0.1 for a client application who connects to WCF Service With security. Everything works fine in my unit tests but when I call the method in my Java application I get the following exception:
Exception in thread "main" java.lang.AssertionError: StreamMessage has been already consumed. See the nested exception for where...
With maven1 I was using the extend tag to tell my children project to use their parent configuration.
All dependencies declared in the parent were available in extending (children) projects.
Now with maven2 I'm using the inheritance/composition feature and I have to redeclare my dependencies (minus the version number) in every child pr...
I want to specify the expression to evaluate on the command line, so the plugin does not go into interactive mode.
According to the docs, the expression parameter should do the trick.
I tried:
mvn help:evaluate -Dexpression=project.groupId
and
mvn help:evaluate -Dexpression=xxx
but the expression is ignored, and the plugin enters...
I googled around a bit and couldn't find any way to do it, but was wondering if I could have a project with multiple poms for various situations, then tell maven to use 'this' one or 'that' one.
The underlying issue is we have a project that needs to be built "for production" in one manner, and "for development" in another due to vagari...