You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Richard Wallace <rw...@thewallacepack.net> on 2006/04/06 01:14:58 UTC

[m2] profiles and activeByDefault

Is the <activeByDefault /> flag working for profiles?  I've got the 
following profiles.xml

<profiles>
  <profile>
    <id>tomcat-local</id>
    <activation>
      <activeByDefault/>
      <property>
        <name>tomcat</name>
        <value>local</value>
      </property>
    </activation>
    <properties>
      <tomcat.server>tomcat-local</tomcat.server>
      <tomcat.url>http://localhost:8080/manager</tomcat.url>
    </properties>
  </profile>
</profiles>


That I'm using in my pom.xml to configure the tomcat plugin like

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <configuration>
          <server>${tomcat.server}</server>
          <url>${tomcat.url}</url>
        </configuration>
      </plugin>
    </plugins>
  </build>

and I have to specify -Dtomcat=local to make it work or I get the error

$ mvn tomcat:undeploy
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'tomcat'.
[INFO] 
----------------------------------------------------------------------------
[INFO] Building MyPowerLearning Web Application
[INFO]    task-segment: [tomcat:undeploy]
[INFO] 
----------------------------------------------------------------------------
[INFO] [tomcat:undeploy]
[INFO] Undeploying application at http://localhost:8080/mpl
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
[INFO] Cannot invoke Tomcat manager

Embedded error: Server returned HTTP response code: 401 for URL: 
http://localhost:8080/manager/undeploy?path=%2Fmpl

The strange thing is that it looks like the tomcat.url variable is being 
replaced, but the server information for the appropriate tomcat server 
isn't being used.

Any ideas what's going on?

Thanks,
Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] profiles and activeByDefault

Posted by Richard Wallace <rw...@thewallacepack.net>.
Yup.  I have multiple profiles activated by different values being set 
for the tomcat parameter.  If nothing is set then the one with 
<activeByDefault>true</activeByDefault> is used.

Lee Meador wrote:
> Does that work to have <activation> with <activeByDefault> and a <property>
> in the same profile? Does it activate if you put tomcat=local or anytime
> some other profile doesn't get activated?
>
> Thanks.
>
> -- Lee
>
> On 4/5/06, Richard Wallace <rw...@thewallacepack.net> wrote:
>   
>> Henry S. Isidro wrote:
>>     
>>> Richard Wallace wrote:
>>>
>>>       
>>>> Is the <activeByDefault /> flag working for profiles?  I've got the
>>>> following profiles.xml
>>>>
>>>> <profiles>
>>>>  <profile>
>>>>    <id>tomcat-local</id>
>>>>    <activation>
>>>>      <activeByDefault/>
>>>>      <property>
>>>>        <name>tomcat</name>
>>>>        <value>local</value>
>>>>      </property>
>>>>    </activation>
>>>>    <properties>
>>>>      <tomcat.server>tomcat-local</tomcat.server>
>>>>      <tomcat.url>http://localhost:8080/manager</tomcat.url>
>>>>    </properties>
>>>>  </profile>
>>>> </profiles>
>>>>         
>>> Shouldn't you put a value in the <activeByDefault> tag? Like
>>> <activeByDefault>true</activeByDefault>
>>>       
>> Yup, you're absolutely right.   I hope that wasn't the problem this
>> whole time.  That'd be really embarrassing ;)
>>
>> Thanks,
>> Rich
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     
>
>
> --
> -- Lee Meador
> Sent from gmail. My real email address is lee@leemeador.com
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] profiles and activeByDefault

Posted by Lee Meador <le...@leemeador.com>.
Does that work to have <activation> with <activeByDefault> and a <property>
in the same profile? Does it activate if you put tomcat=local or anytime
some other profile doesn't get activated?

Thanks.

-- Lee

On 4/5/06, Richard Wallace <rw...@thewallacepack.net> wrote:
>
> Henry S. Isidro wrote:
> > Richard Wallace wrote:
> >
> >> Is the <activeByDefault /> flag working for profiles?  I've got the
> >> following profiles.xml
> >>
> >> <profiles>
> >>  <profile>
> >>    <id>tomcat-local</id>
> >>    <activation>
> >>      <activeByDefault/>
> >>      <property>
> >>        <name>tomcat</name>
> >>        <value>local</value>
> >>      </property>
> >>    </activation>
> >>    <properties>
> >>      <tomcat.server>tomcat-local</tomcat.server>
> >>      <tomcat.url>http://localhost:8080/manager</tomcat.url>
> >>    </properties>
> >>  </profile>
> >> </profiles>
> >
> > Shouldn't you put a value in the <activeByDefault> tag? Like
> > <activeByDefault>true</activeByDefault>
> Yup, you're absolutely right.   I hope that wasn't the problem this
> whole time.  That'd be really embarrassing ;)
>
> Thanks,
> Rich
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com

Re: [m2] profiles and activeByDefault

Posted by Richard Wallace <rw...@thewallacepack.net>.
Henry S. Isidro wrote:
> Richard Wallace wrote:
>
>> Is the <activeByDefault /> flag working for profiles?  I've got the 
>> following profiles.xml
>>
>> <profiles>
>>  <profile>
>>    <id>tomcat-local</id>
>>    <activation>
>>      <activeByDefault/>
>>      <property>
>>        <name>tomcat</name>
>>        <value>local</value>
>>      </property>
>>    </activation>
>>    <properties>
>>      <tomcat.server>tomcat-local</tomcat.server>
>>      <tomcat.url>http://localhost:8080/manager</tomcat.url>
>>    </properties>
>>  </profile>
>> </profiles>
>
> Shouldn't you put a value in the <activeByDefault> tag? Like 
> <activeByDefault>true</activeByDefault>
Yup, you're absolutely right.   I hope that wasn't the problem this 
whole time.  That'd be really embarrassing ;)

Thanks,
Rich

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: [m2] profiles and activeByDefault

Posted by "Henry S. Isidro" <hi...@exist.com>.
Richard Wallace wrote:

> Is the <activeByDefault /> flag working for profiles?  I've got the 
> following profiles.xml
>
> <profiles>
>  <profile>
>    <id>tomcat-local</id>
>    <activation>
>      <activeByDefault/>
>      <property>
>        <name>tomcat</name>
>        <value>local</value>
>      </property>
>    </activation>
>    <properties>
>      <tomcat.server>tomcat-local</tomcat.server>
>      <tomcat.url>http://localhost:8080/manager</tomcat.url>
>    </properties>
>  </profile>
> </profiles>

Shouldn't you put a value in the <activeByDefault> tag? Like 
<activeByDefault>true</activeByDefault>

- Henry

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org