How do I use Ashcroft with Maven

  1. Edit your project's project.xml to make sure Ashcroft is among your dependencies:
    project.xml
    <!-- Test time only -->
    <dependency>
      <id>ashcroft</id>
      <version>0.1</version>
    </dependency>
  2. Edit project.properties to enable Ashcroft:
    project.properties
    # make sure the ashcroft jar you're using is available in the remote repository (it is at codehaus)
    maven.repo.remote=http://www.ibiblio.org/maven,http://dist.codehaus.org
    
    # install ashcroft as your security manager
    maven.junit.jvmargs=-Djava.security.manager=com.thoughtworks.ashcroft.runtime.JohnAshcroft
    
    # make sure the jvm forks, otherwise the jvmargs will be ignored
    maven.junit.fork=true

Also see Ashcroft Configuration for a full list of configuration options.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Sep 15, 2004

    Jeffrey D. Brekke says:

    OK, I see the ashcroft directory on dist.codehaus.org, but there are no jars. I...

    OK, I see the ashcroft directory on dist.codehaus.org, but there are no jars. Is it supposed to automagically put your builds there?