You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org> on 2007/08/23 15:15:47 UTC

[jira] Created: (MNG-3163) Profile activation based on hostname or IP

Profile activation based on hostname or IP
------------------------------------------

                 Key: MNG-3163
                 URL: http://jira.codehaus.org/browse/MNG-3163
             Project: Maven 2
          Issue Type: Improvement
          Components: Profiles
            Reporter: David J. M. Karlsen
            Priority: Minor


It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?

It would be even better if it can be expressed with regex'es or the likes.

WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3163) Profile activation based on hostname or IP

Posted by "David J. M. Karlsen (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_116610 ] 

David J. M. Karlsen commented on MNG-3163:
------------------------------------------

A more general approach would be to allow profiles to be triggered by shell. properties (not systemproperties).
On windows a profile can be triggered by env.COMPUTERNAME and on *nix env.HOSTNAME ootb.

> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 2.x
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-3163) Profile activation based on hostname or IP

Posted by "Jessie Crowe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156075#action_156075 ] 

Jessie Crowe edited comment on MNG-3163 at 12/1/08 2:29 PM:
------------------------------------------------------------

Here is an example project that demonstrates trying to load a build profile.  According to the maven introduction to build profiles, this should work, but it doesn't seem to.

I am using maven 2.0.8

      was (Author: dragonfly0806):
    Here is an example project that demonstrates trying to load a build profile.  According to the maven introduction to build profiles, this should work, but it doesn't seem to.
  
> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: exampleproject.zip
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3163) Profile activation based on hostname or IP

Posted by "Corporate Gadfly (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156180#action_156180 ] 

Corporate Gadfly commented on MNG-3163:
---------------------------------------

You are using maven 2.0.8. Try it with 2.0.9. I'm using env.COMPUTERNAME to trigger a profile. Here's a snippet which triggers when run on HOST1:
{code:xml}
            <activation>
                <property>
                    <name>env.COMPUTERNAME</name>
                    <value>HOST1</value>
                </property>
            </activation>
{code}

> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: exampleproject.zip
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3163) Profile activation based on hostname or IP

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated MNG-3163:
------------------------------

    Fix Version/s: 2.x

> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 2.x
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3163) Profile activation based on hostname or IP

Posted by "Jessie Crowe (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jessie Crowe updated MNG-3163:
------------------------------

    Attachment: exampleproject.zip

Here is an example project that demonstrates trying to load a build profile.  According to the maven introduction to build profiles, this should work, but it doesn't seem to.

> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 3.x
>
>         Attachments: exampleproject.zip
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3163) Profile activation based on hostname or IP

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_111973 ] 

Brett Porter commented on MNG-3163:
-----------------------------------

seems a little dangerous in general, but possibly useful

> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 2.x
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3163) Profile activation based on hostname or IP

Posted by "Jessie Crowe (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156072#action_156072 ] 

Jessie Crowe commented on MNG-3163:
-----------------------------------

The maven guide seems to imply this already works here:

http://maven.apache.org/guides/introduction/introduction-to-profiles.html

I cannot seem to get it to work.  I tried

<activation><property><name>env.COMPUTERNAME</name></property> on a windows box, but the profile did not activate.


> Profile activation based on hostname or IP
> ------------------------------------------
>
>                 Key: MNG-3163
>                 URL: http://jira.codehaus.org/browse/MNG-3163
>             Project: Maven 2
>          Issue Type: Improvement
>          Components: Profiles
>            Reporter: David J. M. Karlsen
>            Priority: Minor
>             Fix For: 3.x
>
>
> It would be very nice to be able to activate profiles based on hostname[s] or IP-address[es].
> Yes, this could be exported from the system as a systemproperty quite easily on *NIX with -Dhostname=`hostname` but is a little more tricky on other platforms - so why not include it in maven itself?
> It would be even better if it can be expressed with regex'es or the likes.
> WDYT?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira