Resource filtering using environment variables

2006-11-09 Thread Gareth Tilley

Hi All,

Gunther Popp-2 wrote:
- All (platform-specific) Environment variables (Just add the prefix
env. For example ${env.M2_HOME} returns the Maven2 installation path).

Has anyone actually been able to get this working? All of the filtering
works fine for me, but the environment variable stuff does not.  As a test I
have a properties file that contains:
${env.JAVA_HOME}
${user.home}
${pom.version}

After the process-resources phase (with filtering turn on in the pom), the
file looks like this:
${env.JAVA_HOME}
/home/build
1.2-SNAPSHOT

JAVA_HOME is definitely set, is there something I am doing wrong, or does
this just not work?

Regards
Gareth 
-- 
View this message in context: 
http://www.nabble.com/Resource-filtering-using-environment-variables-tf2600791s177.html#a7255537
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Properties/Variables in pom?

2006-11-08 Thread Gareth Tilley

Hi All,


Gunther Popp-2 wrote:
 
 - All (platform-specific) Environment variables (Just add the prefix 
 env. For example ${env.M2_HOME} returns the Maven2 installation path).
 

Has anyone actually been able to get this working? All of the filtering
works fine for me, but the environment variable stuff does not.  As a test I
have a properties file that contains:
${env.JAVA_HOME}
${user.home}
${pom.version}

After the process-resources phase (with filtering turn on in the pom), the
file looks like this:
${env.JAVA_HOME}
/home/build
1.2-SNAPSHOT

JAVA_HOME is definitely set, is there something I am doing wrong, or does
this just not work?

Regards
Gareth




Hi Andreas!

Take a look at the Getting Started Guide 
(http://maven.apache.org/guides/getting-started/index.html), section 
How do I filter resource files?. It explains how to reference the 
elements of the pom.xml/settings.xml using property-names.

I´m currently working on a book that covers Maven 2 as part of a 
pragmatic configuration management process and have done some research 
concerning the usage of properties. AFAIK, properties are resolved in 
the following order:

- The (hard-coded) property ${basedir} (contains the path of the POM-file)
- All Java System Properties defined by the JVM.
- All properties defined in the properties-element of the POM.
- All elements in pom.xml and settings.xml as stated above
- All (platform-specific) Environment variables (Just add the prefix 
env. For example ${env.M2_HOME} returns the Maven2 installation path).

I´m not 100% sure about the list and appreciate any additions/corrections.

CU,

Gunther

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
View this message in context: 
http://www.nabble.com/Variables-in-pom--tf1290889s177.html#a7235831
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs.apache.org connection problems

2006-10-24 Thread Gareth Tilley

Hi All,

I'm trying to compile a plugin I've written, and am having some trouble with
Maven attempting to download the required dependencies. The build just hangs
when it tries to get things like:

Downloading:
http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/maven-error-diagnostics/2.0.4/maven-error-diagnostics-2.0.4.jar
Downloading:
http://cvs.apache.org/maven-snapshot-repository/org/apache/maven/maven-monitor/2.0.4/maven-monitor-2.0.4.jar

I've been working with Maven for a little while, and have made many changes
to this plugin, all of which have been totally successful. I've never had
any issues like this before. Does anyone have any ideas? Is there something
wrong with that server?

Regards
Gareth Tilley
-- 
View this message in context: 
http://www.nabble.com/cvs.apache.org-connection-problems-tf2499791.html#a6968451
Sent from the Maven - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [m2] Shortening the Command Line when executing plugins

2006-08-28 Thread Gareth Tilley


quot;Amshoff Christoph, Kölnquot; wrote:
 
 Hi,
 
 I followed the Guide to Developing Java Plugins and performed the
 mentioned steps to compile and install the sample plugin. When executing,
 the command line mvn sample.plugin:maven-hello-plugin:sayhi 
 is executed successfully. 
 
 But when I try to shorten the command line like suggested in the guide,
 both of the following ways are failing:
 
 -- Maven will try expanding the artifactId: mvn
 sample.plugin:hello:sayhi
 is giving me the error The plugin 'sample.plugin:hello' does not exist or
 no valid version could be found
 
 -- Add your plugin's groupId to the list of groupIds searched by default
 in
 ${user.home}/.m2/settings.xml file: mvn maven-hello-plugin:sayhi is
 producing the error The plugin
 'org.apache.maven.plugins:maven-maven-hello-plugin-plugin' does not exist
 or
 no valid version could be found
 
 What am I missing here? Is the Plugin Guide wrong? Are these ways of
 reducing command line only working with deployed plugins (I did only
 install
 it)? Any help is appreciated.
 
 Thanks,
 Christoph.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- Add your plugin's groupId to the list of groupIds searched by default in
${user.home}/.m2/settings.xml file: mvn maven-hello-plugin:sayhi is
producing the error The plugin
'org.apache.maven.plugins:maven-maven-hello-plugin-plugin' does not exist
or
no valid version could be found

Is this what you have in your settings.xml?

  pluginGroups
pluginGroupsample.plugin/pluginGroup
  /pluginGroups

-- 
View this message in context: 
http://www.nabble.com/-m2--%22Shortening-the-Command-Line%22-when-executing-plugins-tf2176547.html#a6020063
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Environment variable plugin parameter default

2006-08-18 Thread Gareth Tilley

I'm still having trouble getting this to work, and I'm loathe to have to
write some separate code to set the variable default using the environment
variable manually with in the plugin. It just doesn't seem like the wy it
should be done. Has anyone else tried something similar? Or does anyone have
a suggestion as to how it would be best to do what I'm trying to do? Perhaps
a call to some validation code within the maven codebase?


Gareth Tilley wrote:
 
 Hi All,
 
 I'm trying to inject an environment variable as the default value for a
 plugin parameter:
 
   /**
* @parameter expression=${directory} default-value=${env.DIRECTORY}
* @required
*/
   private String directory;
 
 I keep getting a null, even though DIRECTORY is set. Is it possible to do
 what I'm trying to do?
 
 Regards
 Gareth
 

-- 
View this message in context: 
http://www.nabble.com/Environment-variable-plugin-parameter-default-tf2070895.html#a5866077
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Environment variable plugin parameter default

2006-08-18 Thread Gareth Tilley



franz see wrote:
 
 
 
 Gareth Tilley wrote:
 
 I'm still having trouble getting this to work, and I'm loathe to have to
 write some separate code to set the variable default using the
 environment variable manually with in the plugin. It just doesn't seem
 like the wy it should be done. Has anyone else tried something similar?
 Or does anyone have a suggestion as to how it would be best to do what
 I'm trying to do? Perhaps a call to some validation code within the maven
 codebase?
 
 
 Gareth Tilley wrote:
 
 Hi All,
 
 I'm trying to inject an environment variable as the default value for a
 plugin parameter:
 
 /**
  * @parameter expression=${directory}
 default-value=${env.DIRECTORY}
  * @required
  */
 private String directory;
 
 I keep getting a null, even though DIRECTORY is set. Is it possible to
 do what I'm trying to do?
 
 Regards
 Gareth
 
 
 
 
 Good day to you, Gareth,
 
 How do you set the directory? 
 
 Cheers, 
 Franz
 
Hi Franz,

I'm using Linux, and I execute:
export DIRECTORY=/xxx/yyy

But when I run the plugin the string directory contains a null.

Regards
Gareth
-- 
View this message in context: 
http://www.nabble.com/Environment-variable-plugin-parameter-default-tf2070895.html#a5866481
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: component requirements

2006-08-17 Thread Gareth Tilley

Thanks Franz, that's exactly what I was looking for.

franz see wrote:
 
 
 
 Gareth Tilley wrote:
 
 I've also had issues with this, how does one find out what components are
 available to a plugin?
 
 
 Frederik Bayart-2 wrote:
 
 Hallo,
 
 Does anybody know where I can find documentation of component
 requirements (the @component annotation in a mojo) and the
 components.xml file. (in Better builds with maven, p. 149 they just
 mention that it's beyond the scope of the chapter).
 
 Frederik
 
 
 
 
 
 
 The @components tag is used by the IoC container of Maven (Plexus) to
 inject a value to those variables. To see what available components are
 there, try searching for the META-INF/plexus/components.xml (for examples,
 there's one inside maven-core).
 

-- 
View this message in context: 
http://www.nabble.com/component-requirements-tf2047292.html#a5845998
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: component requirements

2006-08-16 Thread Gareth Tilley

I've also had issues with this, how does one find out what components are
available to a plugin?


Frederik Bayart-2 wrote:
 
 Hallo,
 
 Does anybody know where I can find documentation of component requirements
 (the @component annotation in a mojo) and the components.xml file. (in
 Better builds with maven, p. 149 they just mention that it's beyond the
 scope of the chapter).
 
 Frederik
 
 
 

-- 
View this message in context: 
http://www.nabble.com/component-requirements-tf2047292.html#a5832776
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Environment variable plugin parameter default

2006-08-08 Thread Gareth Tilley

Hi All,

I'm trying to inject an environment variable as the default value for a
plugin parameter:

/**
 * @parameter expression=${directory} default-value=${env.DIRECTORY}
 * @required
 */
private String directory;

I keep getting a null, even though DIRECTORY is set. Is it possible to do
what I'm trying to do?

Regards
Gareth
-- 
View this message in context: 
http://www.nabble.com/Environment-variable-plugin-parameter-default-tf2070895.html#a5701352
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automating install:install-file

2006-08-08 Thread Gareth Tilley

If you're just trying to install your own project to the repository you can
just run 'mvn install'.
-- 
View this message in context: 
http://www.nabble.com/Automating-install%3Ainstall-file-tf2071058.html#a5701936
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automating install:install-file

2006-08-08 Thread Gareth Tilley

Apologies, I misread your post.
-- 
View this message in context: 
http://www.nabble.com/Automating-install%3Ainstall-file-tf2071058.html#a5702236
Sent from the Maven - Users forum at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]