Re: Plugins not properly loading properties
tomcat:deploy could possibly fork a new process performing a maven build with the lifecycle (the docs should tell). I haven't used that plugin as I'm a Cargo addict...:-) /Anders On Mon, Sep 19, 2011 at 22:35, Maven User maven.2.u...@gmail.com wrote: BTW - this is totally not the behavior we're seeing with a tomcat:deploy. That seems to go through all the standard build lifecycle goals, then NOT pull in any dynamically loaded configuration... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
Heh - yeah a quick look at the docs and it says: - Requires a Maven 2.0 project to be executed. - Since version: 1.0-alpha-2. - Invokes the execution of the lifecycle phase package prior to executing itself. There's no mention of forking and all the documentation around this plugin kinda stinks. Cargo is also a great option but one of the things we try to do is load property files from a jar and put the results into the reactor. I think this functionality is gone in maven 3 though On Tue, Sep 20, 2011 at 3:32 AM, Anders Hammar and...@hammar.net wrote: tomcat:deploy could possibly fork a new process performing a maven build with the lifecycle (the docs should tell). I haven't used that plugin as I'm a Cargo addict...:-) /Anders On Mon, Sep 19, 2011 at 22:35, Maven User maven.2.u...@gmail.com wrote: BTW - this is totally not the behavior we're seeing with a tomcat:deploy. That seems to go through all the standard build lifecycle goals, then NOT pull in any dynamically loaded configuration... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
There has never been such native Maven support (i.e. in Maven core). /Anders On Tue, Sep 20, 2011 at 14:57, Maven User maven.2.u...@gmail.com wrote: Heh - yeah a quick look at the docs and it says: - Requires a Maven 2.0 project to be executed. - Since version: 1.0-alpha-2. - Invokes the execution of the lifecycle phase package prior to executing itself. There's no mention of forking and all the documentation around this plugin kinda stinks. Cargo is also a great option but one of the things we try to do is load property files from a jar and put the results into the reactor. I think this functionality is gone in maven 3 though On Tue, Sep 20, 2011 at 3:32 AM, Anders Hammar and...@hammar.net wrote: tomcat:deploy could possibly fork a new process performing a maven build with the lifecycle (the docs should tell). I haven't used that plugin as I'm a Cargo addict...:-) /Anders On Mon, Sep 19, 2011 at 22:35, Maven User maven.2.u...@gmail.com wrote: BTW - this is totally not the behavior we're seeing with a tomcat:deploy. That seems to go through all the standard build lifecycle goals, then NOT pull in any dynamically loaded configuration... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
In 2.2.1, this worked flawlessly. In 3.X this (known) feature no longer works. http://www.mailinglistarchive.com/html/users@maven.apache.org/2011-01/msg00729.html Ok, I'm clear now :-) On Tue, Sep 20, 2011 at 9:13 AM, Anders Hammar and...@hammar.net wrote: There has never been such native Maven support (i.e. in Maven core). /Anders On Tue, Sep 20, 2011 at 14:57, Maven User maven.2.u...@gmail.com wrote: Heh - yeah a quick look at the docs and it says: - Requires a Maven 2.0 project to be executed. - Since version: 1.0-alpha-2. - Invokes the execution of the lifecycle phase package prior to executing itself. There's no mention of forking and all the documentation around this plugin kinda stinks. Cargo is also a great option but one of the things we try to do is load property files from a jar and put the results into the reactor. I think this functionality is gone in maven 3 though On Tue, Sep 20, 2011 at 3:32 AM, Anders Hammar and...@hammar.net wrote: tomcat:deploy could possibly fork a new process performing a maven build with the lifecycle (the docs should tell). I haven't used that plugin as I'm a Cargo addict...:-) /Anders On Mon, Sep 19, 2011 at 22:35, Maven User maven.2.u...@gmail.com wrote: BTW - this is totally not the behavior we're seeing with a tomcat:deploy. That seems to go through all the standard build lifecycle goals, then NOT pull in any dynamically loaded configuration... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
That's something different. I said Maven 2 core doesn't have support for reading properties from a file. There might be plugins, but no such support in core. /Anders On Tue, Sep 20, 2011 at 15:20, Maven User maven.2.u...@gmail.com wrote: In 2.2.1, this worked flawlessly. In 3.X this (known) feature no longer works. http://www.mailinglistarchive.com/html/users@maven.apache.org/2011-01/msg00729.html Ok, I'm clear now :-) On Tue, Sep 20, 2011 at 9:13 AM, Anders Hammar and...@hammar.net wrote: There has never been such native Maven support (i.e. in Maven core). /Anders On Tue, Sep 20, 2011 at 14:57, Maven User maven.2.u...@gmail.com wrote: Heh - yeah a quick look at the docs and it says: - Requires a Maven 2.0 project to be executed. - Since version: 1.0-alpha-2. - Invokes the execution of the lifecycle phase package prior to executing itself. There's no mention of forking and all the documentation around this plugin kinda stinks. Cargo is also a great option but one of the things we try to do is load property files from a jar and put the results into the reactor. I think this functionality is gone in maven 3 though On Tue, Sep 20, 2011 at 3:32 AM, Anders Hammar and...@hammar.net wrote: tomcat:deploy could possibly fork a new process performing a maven build with the lifecycle (the docs should tell). I haven't used that plugin as I'm a Cargo addict...:-) /Anders On Mon, Sep 19, 2011 at 22:35, Maven User maven.2.u...@gmail.com wrote: BTW - this is totally not the behavior we're seeing with a tomcat:deploy. That seems to go through all the standard build lifecycle goals, then NOT pull in any dynamically loaded configuration... - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
When you execute mvn tomcat:deploy you're NOT executing the build lifecycle but only the specify plugin goal. Thus, your plugin that loads the props is not executed. /Anders On Mon, Sep 19, 2011 at 17:35, Maven User maven.2.u...@gmail.com wrote: Hi all - Quick question, I think there's some confusion on my end. We have a plugin that loads properties into the reactor so they're available for things like resource processing, various other plugins, etc. However, when using the tomcat plugin directly on the command line (such as mvn tomcat:deploy), the properties are not expanded when they've come from a property file. If we use the standard plugin configuration and bind the deployment to a particular lifecycle goal with an execution, the property is expanded successfully. What are we doing wrong/what are we missing? When the tomcat goals are called on the command line, it's as if they skip several steps but grab things from activated profiles and properties blocks. Suggestions? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
Yet it gets properties from profiles/plugin configuration/etc? On Mon, Sep 19, 2011 at 2:35 PM, Anders Hammar and...@hammar.net wrote: When you execute mvn tomcat:deploy you're NOT executing the build lifecycle but only the specify plugin goal. Thus, your plugin that loads the props is not executed. /Anders On Mon, Sep 19, 2011 at 17:35, Maven User maven.2.u...@gmail.com wrote: Hi all - Quick question, I think there's some confusion on my end. We have a plugin that loads properties into the reactor so they're available for things like resource processing, various other plugins, etc. However, when using the tomcat plugin directly on the command line (such as mvn tomcat:deploy), the properties are not expanded when they've come from a property file. If we use the standard plugin configuration and bind the deployment to a particular lifecycle goal with an execution, the property is expanded successfully. What are we doing wrong/what are we missing? When the tomcat goals are called on the command line, it's as if they skip several steps but grab things from activated profiles and properties blocks. Suggestions? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
It will get properties defined in the effective POM. /Anders On Mon, Sep 19, 2011 at 21:48, Maven User maven.2.u...@gmail.com wrote: Yet it gets properties from profiles/plugin configuration/etc? On Mon, Sep 19, 2011 at 2:35 PM, Anders Hammar and...@hammar.net wrote: When you execute mvn tomcat:deploy you're NOT executing the build lifecycle but only the specify plugin goal. Thus, your plugin that loads the props is not executed. /Anders On Mon, Sep 19, 2011 at 17:35, Maven User maven.2.u...@gmail.com wrote: Hi all - Quick question, I think there's some confusion on my end. We have a plugin that loads properties into the reactor so they're available for things like resource processing, various other plugins, etc. However, when using the tomcat plugin directly on the command line (such as mvn tomcat:deploy), the properties are not expanded when they've come from a property file. If we use the standard plugin configuration and bind the deployment to a particular lifecycle goal with an execution, the property is expanded successfully. What are we doing wrong/what are we missing? When the tomcat goals are called on the command line, it's as if they skip several steps but grab things from activated profiles and properties blocks. Suggestions? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
And there's no way to inject the property files we've loaded at that level? On Mon, Sep 19, 2011 at 3:59 PM, Anders Hammar and...@hammar.net wrote: It will get properties defined in the effective POM. /Anders On Mon, Sep 19, 2011 at 21:48, Maven User maven.2.u...@gmail.com wrote: Yet it gets properties from profiles/plugin configuration/etc? On Mon, Sep 19, 2011 at 2:35 PM, Anders Hammar and...@hammar.net wrote: When you execute mvn tomcat:deploy you're NOT executing the build lifecycle but only the specify plugin goal. Thus, your plugin that loads the props is not executed. /Anders On Mon, Sep 19, 2011 at 17:35, Maven User maven.2.u...@gmail.com wrote: Hi all - Quick question, I think there's some confusion on my end. We have a plugin that loads properties into the reactor so they're available for things like resource processing, various other plugins, etc. However, when using the tomcat plugin directly on the command line (such as mvn tomcat:deploy), the properties are not expanded when they've come from a property file. If we use the standard plugin configuration and bind the deployment to a particular lifecycle goal with an execution, the property is expanded successfully. What are we doing wrong/what are we missing? When the tomcat goals are called on the command line, it's as if they skip several steps but grab things from activated profiles and properties blocks. Suggestions? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
I don't think so unless the tomcat plugin can be configured to use it. Using a separate properties file is IMHO not a good idea, for reasons you now see. And there are even worse examples where you could effectively be distributing a non-working pom making people using your artifact lives' miserable. Keep everything in the POM, /Anders On Mon, Sep 19, 2011 at 22:15, Maven User maven.2.u...@gmail.com wrote: And there's no way to inject the property files we've loaded at that level? On Mon, Sep 19, 2011 at 3:59 PM, Anders Hammar and...@hammar.net wrote: It will get properties defined in the effective POM. /Anders On Mon, Sep 19, 2011 at 21:48, Maven User maven.2.u...@gmail.com wrote: Yet it gets properties from profiles/plugin configuration/etc? On Mon, Sep 19, 2011 at 2:35 PM, Anders Hammar and...@hammar.net wrote: When you execute mvn tomcat:deploy you're NOT executing the build lifecycle but only the specify plugin goal. Thus, your plugin that loads the props is not executed. /Anders On Mon, Sep 19, 2011 at 17:35, Maven User maven.2.u...@gmail.com wrote: Hi all - Quick question, I think there's some confusion on my end. We have a plugin that loads properties into the reactor so they're available for things like resource processing, various other plugins, etc. However, when using the tomcat plugin directly on the command line (such as mvn tomcat:deploy), the properties are not expanded when they've come from a property file. If we use the standard plugin configuration and bind the deployment to a particular lifecycle goal with an execution, the property is expanded successfully. What are we doing wrong/what are we missing? When the tomcat goals are called on the command line, it's as if they skip several steps but grab things from activated profiles and properties blocks. Suggestions? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
BTW - this is totally not the behavior we're seeing with a tomcat:deploy. That seems to go through all the standard build lifecycle goals, then NOT pull in any dynamically loaded configuration...
Re: Plugins not properly loading properties
How does this work when you have to deploy the same artifact to 10 different environments? 10 profiles and build the artifact 10 times? On Mon, Sep 19, 2011 at 4:25 PM, Anders Hammar and...@hammar.net wrote: I don't think so unless the tomcat plugin can be configured to use it. Using a separate properties file is IMHO not a good idea, for reasons you now see. And there are even worse examples where you could effectively be distributing a non-working pom making people using your artifact lives' miserable. Keep everything in the POM, /Anders On Mon, Sep 19, 2011 at 22:15, Maven User maven.2.u...@gmail.com wrote: And there's no way to inject the property files we've loaded at that level? On Mon, Sep 19, 2011 at 3:59 PM, Anders Hammar and...@hammar.net wrote: It will get properties defined in the effective POM. /Anders On Mon, Sep 19, 2011 at 21:48, Maven User maven.2.u...@gmail.com wrote: Yet it gets properties from profiles/plugin configuration/etc? On Mon, Sep 19, 2011 at 2:35 PM, Anders Hammar and...@hammar.net wrote: When you execute mvn tomcat:deploy you're NOT executing the build lifecycle but only the specify plugin goal. Thus, your plugin that loads the props is not executed. /Anders On Mon, Sep 19, 2011 at 17:35, Maven User maven.2.u...@gmail.com wrote: Hi all - Quick question, I think there's some confusion on my end. We have a plugin that loads properties into the reactor so they're available for things like resource processing, various other plugins, etc. However, when using the tomcat plugin directly on the command line (such as mvn tomcat:deploy), the properties are not expanded when they've come from a property file. If we use the standard plugin configuration and bind the deployment to a particular lifecycle goal with an execution, the property is expanded successfully. What are we doing wrong/what are we missing? When the tomcat goals are called on the command line, it's as if they skip several steps but grab things from activated profiles and properties blocks. Suggestions? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
How does this work when you have to deploy the same artifact to 10 different environments? 10 profiles and build the artifact 10 times? We get this question so often on this list, and similar questions. You should check the archives for various comments. The standard answer is use JNDI or some other DI technique/framework. Bundle all environment settings into the artifact and use some method to tell your app or app server which settings to use for this specific server. Or extract all settings into a single configurations artifact if you'd prefer. This also guarantees that the artifact you perform QA on is identical (same code etc) to the artifact you deploy to PROD which is a requirement for most sensibly-defined environments. If you build 10 artifacts (one per environment) as you suggested then there is no such guarantee. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Plugins not properly loading properties
I'll admit knowing this was a loaded question. I've previously solved this via a separate configuration artifact. I was just shocked to see how m3 doesn't allow the import of property files anymore the way 2.2.1 did. Thanks again all - I appreciate it! On Mon, Sep 19, 2011 at 5:19 PM, Wayne Fay wayne...@gmail.com wrote: How does this work when you have to deploy the same artifact to 10 different environments? 10 profiles and build the artifact 10 times? We get this question so often on this list, and similar questions. You should check the archives for various comments. The standard answer is use JNDI or some other DI technique/framework. Bundle all environment settings into the artifact and use some method to tell your app or app server which settings to use for this specific server. Or extract all settings into a single configurations artifact if you'd prefer. This also guarantees that the artifact you perform QA on is identical (same code etc) to the artifact you deploy to PROD which is a requirement for most sensibly-defined environments. If you build 10 artifacts (one per environment) as you suggested then there is no such guarantee. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org