Put this in your settings.xml:

    <!-- skip tests by default, but allow override on command line -->
    <profile>
      <id>skiptests</id>
      <activation>
        <property>
          <name>!maven.test.skip</name>
        </property>
      </activation>
      <properties>
        <maven.test.skip>true</maven.test.skip>
      </properties>
    </profile>

This will set maven.test.skip to true, as long as you don't set it on the command line. The nice part about this technique is that it DOES allow you to override it on the command line if you want to.

-Max


Matt Raible wrote:
In Maven 1, it was possible to turn off tests by creating a
build.properties and adding maven.test.skip=true.  I want to do
something similar (don't worry, only temporarily) for Maven 2.  I
tried creating a ~/.m2/settings.xml with the following, but it doesn't
seem to work.

<settings>
 <profiles>
   <profile>
     <id>skip.tests</id>
     <properties>
       <name>maven.test.skip</name>
       <value>true</value>
     </properties>
   </profile>
 </profiles>

 <activeProfiles>
   <activeProfile>skip.tests</activeProfile>
 </activeProfiles>
</settings>

On a related note, is it possible to create a setting that sets up
"offline mode" permanently w/o typing -o?

Thanks,

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to