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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to