Try this instead 

<settings>

....

 <activeProfiles>
   <activeProfile>tomcat-local</activeProfile>
 </activeProfiles>

....
</settings>

-j

---------------------------------------------------
Justin Fung
[EMAIL PROTECTED]
Sr. Analyst, Business Systems
IT Banking Systems, e-Business
HSBC Bank Canada
http://www.hsbc.ca
p: (604) 643-6605
f: (604) 643-6727








Richard Wallace <[EMAIL PROTECTED]>
04/05/2006 04:14 PM
Please respond to "Maven Users List"

 
        To:     Maven Users List <[email protected]>
        cc: 
        Subject:        [m2] profiles and activeByDefault

      Our Ref: 
            Your Ref: 


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]



 
*************************************************************** 
This email may contain confidential information, and is intended only for 
the named recipient and may be privileged.  Distribution or copying of 
this email by anyone other than the named recipient is prohibited. If you 
are not the named recipient, please notify us immediately and permanently 
destroy this email and all copies of it.  Internet email is not private, 
secure, or reliable.  No member of the HSBC Group is liable for any errors 
or omissions in the content or transmission of this email. Any opinions 
contained in this email are solely those of the author and, unless clearly 
indicated otherwise in writing, are not endorsed by any member of the HSBC 
Group. 
*************************************************************** 
Ce courriel peut renfermer des renseignements confidentiels et privilégiés 
et s'adresse au destinataire désigné seulement.   La distribution ou la 
copie de ce courriel par toute personne autre que le destinataire désigné 
est interdite.  Si vous n'êtes pas le destinataire désigné, veuillez nous 
en aviser immédiatement et détruire de façon permanente ce courriel ainsi 
que toute copie de celui-ci. La transmission de courriel par Internet ne 
constitue pas un mode de transmission confidentiel, sécuritaire ou fiable. 
 Aucun membre du Groupe HSBC ne sera responsable des erreurs ou des 
omissions relatives au contenu ou à la transmission de ce courriel. 
L'auteur de ce courriel est seul responsable des opinions émises dans ce 
courriel, lesquelles, à moins  d'un avis contraire fourni par écrit, ne 
sont pas endossées par aucun membre du Groupe HSBC. 
*************************************************************** 

Reply via email to