Index: src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java
===================================================================
--- src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java	(revision 824361)
+++ src/main/java/org/apache/maven/plugin/ant/AntBuildWriter.java	(working copy)
@@ -32,6 +32,7 @@
 import java.util.Properties;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Repository;
 import org.apache.maven.model.Resource;
 import org.apache.maven.project.MavenProject;
@@ -587,23 +588,9 @@
         writer.addAttribute( "id", "build.classpath" );
         writer.startElement( "fileset" );
         writer.addAttribute( "dir", "${maven.repo.local}" );
-        if ( !project.getCompileArtifacts().isEmpty() )
-        {
-            for ( Iterator i = project.getCompileArtifacts().iterator(); i.hasNext(); )
-            {
-                Artifact artifact = (Artifact) i.next();
-                String path = artifactResolverWrapper.getLocalArtifactPath( artifact );
-                writer.startElement( "include" );
-                writer.addAttribute( "name", path );
-                writer.endElement(); // include
-            }
-        }
-        else
-        {
-            writer.startElement( "include" );
-            writer.addAttribute( "name", "*.jar" );
-            writer.endElement(); // include
-        }
+
+        writeBuildPathDefintionArtifacts(writer, project.getCompileArtifacts());
+
         writer.endElement(); // fileset
         writer.endElement(); // path
 
@@ -611,12 +598,40 @@
         writer.addAttribute( "id", "build.test.classpath" );
         writer.startElement( "fileset" );
         writer.addAttribute( "dir", "${maven.repo.local}" );
-        if ( !project.getTestArtifacts().isEmpty() )
+
+        writeBuildPathDefintionArtifacts(writer, project.getTestArtifacts());
+
+        writer.endElement(); // fileset
+        writer.endElement(); // path
+
+        XmlWriterUtil.writeLineBreak( writer );
+    }
+
+    /**
+     * Write artifact list for the build path definition.
+     * Uses the <code>systemPath</code> for system scope artifacts.
+     *
+     * @param writer the XML writer to output to.
+     * @param artifacts the artifacts to output.
+     */
+    private void writeBuildPathDefintionArtifacts(XMLWriter writer, List artifacts) {
+        if ( !artifacts.isEmpty() )
         {
             for ( Iterator i = project.getTestArtifacts().iterator(); i.hasNext(); )
             {
                 Artifact artifact = (Artifact) i.next();
-                String path = artifactResolverWrapper.getLocalArtifactPath( artifact );
+                String path;
+
+                if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
+                {
+                    // unresolve properties to ensure platform independence
+                    path = unresolveProperties( findDependency( artifact ).getSystemPath() );
+                }
+                else
+                {
+                    path = artifactResolverWrapper.getLocalArtifactPath( artifact );
+                }
+
                 writer.startElement( "include" );
                 writer.addAttribute( "name", path );
                 writer.endElement(); // include
@@ -628,13 +643,58 @@
             writer.addAttribute( "name", "*.jar" );
             writer.endElement(); // include
         }
-        writer.endElement(); // fileset
-        writer.endElement(); // path
+    }
 
-        XmlWriterUtil.writeLineBreak( writer );
+    /**
+     * Find the corresponding dependency for a given artifact.
+     *
+     * @param artifact the artifact to get the dependency for.
+     *
+     * @return the dependency with the same groupId, artifactId and version
+     *         or <code>null</code>, if none is found.
+     */
+    private Dependency findDependency( Artifact artifact ) {
+        for ( Iterator i = project.getDependencies().iterator(); i.hasNext(); )
+        {
+            Dependency dep = (Dependency) i.next();
+
+            if ( dep.getGroupId().equals( artifact.getGroupId() ) &&
+                 dep.getArtifactId().equals( artifact.getArtifactId() ) &&
+                 dep.getVersion().equals( artifact.getVersion() ) )
+            {
+
+                return dep;
+            }
+        }
+
+        return null;
     }
 
+
     /**
+     * Unresolve any properties in a given string.
+     * Replaces each property-value with the corresponding key.
+     *
+     * @param str the string with resolved properties.
+     *
+     * @return the string with unresolved properties.
+     */
+    private String unresolveProperties( String str )
+    {
+        Properties properties = project.getProperties();
+
+        for( Iterator i = properties.keySet().iterator(); i.hasNext(); )
+        {
+            String key = i.next().toString();
+            String value = properties.getProperty(key);
+
+            str = str.replaceAll(value, "\\${" + key + "}");
+        }
+
+        return str;
+    }
+
+    /**
      * Write clean target in the writer depending the packaging of the project.
      *
      * @param writer
@@ -1262,6 +1322,11 @@
         {
             Artifact artifact = (Artifact) i.next();
 
+            if( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )
+            {
+                continue;
+            }
+
             // TODO: should the artifacthandler be used instead?
             String path = artifactResolverWrapper.getLocalArtifactPath( artifact );
 
@@ -1317,7 +1382,7 @@
      * Gets the relative path to a repository that is rooted in the project. The returned path (if any) will always use
      * the forward slash ('/') as the directory separator. For example, the path "target/it-repo" will be returned for a
      * repository constructed from the URL "file://${basedir}/target/it-repo".
-     * 
+     *
      * @param repoUrl The URL to the repository, must not be <code>null</code>.
      * @param projectDir The absolute path to the base directory of the project, must not be <code>null</code>
      * @return The path to the repository (relative to the project base directory) or <code>null</code> if the

