I would like to be able to, as part of a maven build, set the build number (doesn't matter exactly what) in a properties file/class (so I can show it in ... |
I'm setting up a maven build, and the destination server needs to be specified on the command line as a property (which is then used to select the appropriate profile), eg
mvn ...
|
Does anyone know how to read a x.properties file in Maven. I know there are ways to use resource filtering to read a properties file and set values from that, but ... |
I have a Maven pom.xml with a plugin that I want to be able to control on the command line. Everything works otherwise fine, except even after searching the net a ... |
When we release projects it is usually the same every time. Are there any arguments or properties that I can add to release:prepare that will allow for pattern releasing in batch ... |
What I want to do is this: I have a pom.xml that depends on some property that the user will have to type as he calls mvn by an -D property. ... |
I have several projects built by maven, and I want to share some common properties among them - spring version, mysql driver version, svn base url, etc. - so I can ... |
|
As stated in the title, how can I modify - in the simplest manner possible - a pom.xml in order to make it fails if a property is not set in ... |
I've got the following line in my pom.xml:
<updateRepositoryURL>file:/${user.home}/.m2/repository/repository.xml</updateRepositoryURL>
and when I am attempting to use it within my program the resultant string is:
file:/c:Documents and Settings<myusername>/.m2/repository/repository.xml
where <myusername> is my user name funnily enough.
however ... |
My Maven project has two properties which are used when filtering a persistence configuration file:
<database-url>jdbc:mysql://localhost/${database-name}?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;rewriteBatchedStatements=true&amp;useServerPrepStmts=false&amp;useCursorFetch=true</database-url>
<test-database-url>jdbc:mysql://localhost/${test-database-name}?autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;rewriteBatchedStatements=true&amp;useServerPrepStmts=false&amp;useCursorFetch=true</test-database-url>
The properties need to be doubly-XML-encoded since the configuration file itself is an XML document and Maven ... |
How can I create maven property with the classpath as part of it ?
|
I'm using a maven plugin for install4j in my project, located here. That plugin lets you pass variables to install4j using the <compilerVariables> section. Here's the relevant section of ... |
The original title was
"How to generate enum from properties file using ant?"
I want to iterate over all properties and generate enum class that have every property.
Im thinking about writing custom task, ... |
Is there a way ( I mean how do I ) set a system property in a maven project?
I want to access a property from my test and my webapp ( ... |
Assuming I have a .properties file and hibernate.cfg.xml in a standard maven web application layout where should they be placed so that they are included in my .war file when I ... |
[reduced for simplicity]
I have a project with several Maven modules
A module has a properties files whose contents are filtered during build
There are sets of properties that can be grouped
Only one group ... |
We are attempting to re-factor our modularized maven building. We've introduced a property DEPLOYMENT_ENV which might be "prod", "dev", "staging", or what not. The mentality we had going in ... |
I have occurence building a maven archetype where I want to do something like this
#set( $controllerPackage = ${package}\.${artifactId})
i.e. set the controllerPackage variable to equal the result of string concatentaion of ... |
I want to create a maven project with the following structure:
A
|--pom.xml
|--B
|--pom.xml
|--C
|--pom.xml
where A, B and C are folders, and B's pom.xml and C's pom.xml are children ... |
I know there is a list of all predefined Maven properties (you know like project.build.sourceEncodin). I once saw the list but I just can't find it again.
|
Is there a way in Maven to convert the value of a property, such as through a simple String.replace() call, before the value is substituted into a file?
I have a situtation ... |
I'm using maven 3.0.1 in ubuntu 10.10, I'm trying to do:
export JAVA_OPTS="-Dfoo=bar"
mvn clean install
And my build does not work. However, when I do
mvn clean install -Dfoo=bar
It works.
Does anyone have any idea ... |
I defined a profile at my base-pom which uses a property that is defined by a sub-pom (deploy-location of the appserver-module). The profile shall be used after the initial full-build and ... |
How can I use maven properties in site APT files? For example I want to use ${project.version} in the index.apt so I can always refer to the latest version without manually ... |
I want to use some plugin executions of my maven project only when a certain file does not exist. The path to this file can change - that's why it must ... |
Following http://maksim.sorokin.dk/it/2010/06/10/izpack-with-maven/ I wrote a Maven POM which creates an IzPack installer, using the izpack-maven-plugin.
However I found now way to pass plugin configuration parameters such ... |
We develop multiple branches of a project concurrently. Each developer has multiple working copies, each working copy uses its own DB schema. (There will typically be a working copy ... |
Is there a way to read the content of a file (maven.properties) inside a jar/war file with Java? I need to read the file from disk, when it's not used (in ... |
Nothing I've found has been able to help me solve this one specific case. I recently switched from a plain old java web app project (which was working) to a maven ... |
I have a Maven build which uses jruby-rake-plugin for certain executions. Sometimes, when I run this build, I set a Java system property; other times I do not. I need to ... |
In my Maven build I would like to be able to define default values (e.g. for database connection) in pom.xml, but I would like the user to be able to override ... |
I have some properties in my maven pom.xml.
<properties>
<number>3</number>
<age>38</age>
</properties>
(They are random properties)
In a properties file, lets call it resource.properties, I have the following:
value1 = ...
|
I want to write a maven plugin (extension) which implements lifecycles for javascript projects so projects with a pom.xml like this can be compiled:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org
<modelVersion>4.0.0</modelVersion>
...
|
How can set the object type of a property in a pom file?
I'm working with DBUnit to do DB exports and I'm trying to pass in the table parameter
...
|
In Maven POM I want to implement Resource filter
Consider following property file
- env=local
- local_user=scott
- remote_user=tiger
- database_user=${${env}_user}
Is it possible to have nested maven macros as indicated line no 6
Regards
Rajul Konkar
|
Sorry for a newbie question.
I've a jar file that contains maven archetype. It goes with a bunch of java/resource files all of which having the following lines at the top
#set( ...
|
Is there any maven property to get the user name of the user that runs maven (windows and linux)?
|
I'm trying to activate a profile in my settings.xml by the value of the pom's groupId. To achieve that I have:
<settings>
<profiles>
...
|
I want to use properties that are defined in a property file in a Maven script, in a plugin configuration section. How can I do that?
Extract from my Maven script:
...
<configuration>
...
|
I have a question regarding properties in a multi-module project.
Consider the following 3-level project struture:
project
+- pom.xml (packaging: pom) //referred to as super-pom
+- module_group
...
|
I have defined the property like so:
<profile>
<id>dand</id>
<properties>
<workSpace>s:/_java/</workSpace>
</properties>
...repos
</profile>
<activeProfiles>
<activeProfile>dand</activeProfile>
</activeProfiles>
I am attempting to access the property with
<outputDir>${workSpace}/src/main/java</outputDir>
|
I am using ~/.m2/settings.xml to store a number of property names used throughout the pom.xml files in my project. If I make the XML invalid (by adding another < for example), ... |
I have my build set-up so that I pass in my variable via the command line:
mvn clean install -DsomeVariable=data
In my pom I have:
<someTag>${someVariable}</someTag>
This works fine, but I would like to identify ... |