Maven Properties

You can use Maven properties in a pom.xml file or in any resource that is being processed by the Maven Resource plugin’s filtering features.
A property is always surrounded by ${ and }. For example, to reference the ${project.version} property

project.* Maven Project Object Model (POM). You can use the project.* prefix to reference values in a Maven POM.
settings.* Maven Settings. You use the settings.* prefix to reference values from your Maven Settings in ~/.m2/settings.xml.
env.* Environment variables like PATH and M2_HOME can be referenced using the env.* prefix.
System Properties: Any property which can be retrieved from the System.getProperty() method can be referenced as a Maven property.

The ${project.*} actually resolved to a MavenProject object. From there, you can just use bean properties to get the value you need
${project.basedir}
${project.groupId}
${project.version}

project.name and project.description
The name and project description can often be useful properties to reference from documentation. Instead of having to worry that all of your site documents maintain the same short descriptions, you can just reference these properties.
project.build.*
If you are ever trying to reference output directories in Maven, you should never use a literal value like target/classes. Instead you should use property references to refer to these directories.
project.build.sourceDirectory
project.build.scriptSourceDirectory
project.build.testSourceDirectory
project.build.outputDirectory
project.build.testOutputDirectory
project.build.directory

project.baseUri
If you need a valid URI for your project’s base directory, you can use the ${project.baseUri} property. If your project is stored in the directory /tmp/simple, ${project.baseUri} will resolve to file:/private/tmp/simple/.

Built-in properties

${basedir} represents the directory containing pom.xml
${version} equivalent to ${project.version} (deprecated: ${pom.version})

Pom/Project properties

${project.build.directory} results in the path to your “target” directory, this is the same as ${pom.project.build.directory}
${project.build.outputDirectory} results in the path to your “target/classes” directory
${project.name}refers to the name of the project (deprecated: ${pom.name} ).
${project.version} refers to the version of the project (deprecated: or ${pom.version}).
${project.build.finalName} refers to the final name of the file created when the built project is packaged

<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	...
	<build>
		<finalName>finalNameOfFile</finalName>
		...
	</build>		
</project>

Local user settings

${settings.localRepository} refers to the path of the user’s local repository

Environment variables

${env.M2_HOME} returns the Maven2 installation path.
${java.home} specifies the path to the current JRE_HOME environment use with relative paths to get for example:
${java.home}../bin/java.exe

Java system properties

All Java System Properties defined by the JVM.

Custom properties in the POM

It’s not a good idea to use properties for artifact IDs. The ${project.file.parentFile.name} property cannot be resolved when using it as part of artifactId, however some properties do work (project.groupId for the artifactId seems to work).
However, this is not recommended. In fact, if you use any property for the artifact ID instead of a constant, you’ll get a warning when you build your project:

        <properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

${project.build.sourceEncoding}

Referencias:
books sonatype mvnref-book
MavenPropertiesGuide

Anuncios
Maven Properties

Error al iniciar eclipse

Hoy he obtenido un error, al iniciar eclipse:

—————————
Java Virtual Machine Launcher
—————————
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
—————————
Aceptar
—————————

Lo he solucionado bajando el -Xmx de 1024 a 768m. En stackoverflow, comentan mas formas. Pero solo me ha funcionado bajar el Xmx.

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
384M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
384M
--launcher.defaultAction
openFile
-vm
C:/Program Files/Java/jdk1.7.0_21/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx768m
-XX:MaxPermSize=384m
Error al iniciar eclipse

tunnel ssh en consola

ssh -f user@personal-server.com -L 5865:personal-server.com:22 -N

-f indica a ssh que se ejecute en segundo plano despues de que ssh se ejecute

-L
5865 ese el puerto por el que va salir el tunnel.
22 puerto por el que nos conectamos al host remoto.

-N inidica que no ejecute ningun comando en el host remoto.

ssh -D 8080 -f -C -q -N myuser@myserver.com

-D [bind_address:]port
-f Requests ssh to go to background just before command execution.
-C Requests compression of all data
-q Quiet mode. Causes all warning and diagnostic messages to be suppressed.
-N Do not execute a remote command. This is useful for just for-warding ports (protocol version 2 only).

ssh -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -f -C -N -D *:8080 user@my.proxy.server &> tunnel.log
tunnel ssh en consola