From 7b37aa82c72edb6e1e15768367e76621ddfbadfc Mon Sep 17 00:00:00 2001 From: Mark Donszelmann Date: Fri, 27 Nov 2009 14:23:04 +0100 Subject: Fixed NAR-109 --- .../java/org/apache/maven/plugin/nar/AbstractNarLayout.java | 1 - src/main/java/org/apache/maven/plugin/nar/Compiler.java | 12 ++++++++++++ src/main/java/org/apache/maven/plugin/nar/Fortran.java | 1 - 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/apache/maven/plugin/nar/AbstractNarLayout.java b/src/main/java/org/apache/maven/plugin/nar/AbstractNarLayout.java index e5dc7b5..2d13e63 100644 --- a/src/main/java/org/apache/maven/plugin/nar/AbstractNarLayout.java +++ b/src/main/java/org/apache/maven/plugin/nar/AbstractNarLayout.java @@ -29,7 +29,6 @@ import org.codehaus.plexus.archiver.Archiver; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.manager.ArchiverManager; import org.codehaus.plexus.archiver.manager.NoSuchArchiverException; -import org.codehaus.plexus.archiver.zip.ZipArchiver; /** * @author Mark Donszelmann (Mark.Donszelmann@gmail.com) diff --git a/src/main/java/org/apache/maven/plugin/nar/Compiler.java b/src/main/java/org/apache/maven/plugin/nar/Compiler.java index bfbece5..3c18951 100644 --- a/src/main/java/org/apache/maven/plugin/nar/Compiler.java +++ b/src/main/java/org/apache/maven/plugin/nar/Compiler.java @@ -22,6 +22,7 @@ package org.apache.maven.plugin.nar; import java.io.File; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -217,6 +218,13 @@ public abstract class Compiler * @required */ private boolean clearDefaultOptions; + + /** + * Comma separated list of filenames to compile in order + * + * @parameter expression="" + */ + private String compileOrder; private AbstractCompileMojo mojo; @@ -582,6 +590,10 @@ public abstract class Compiler mojo.getLog().debug( "Checking for existence of " + getLanguage() + " source directory: " + srcDir ); if ( srcDir.exists() ) { + if (compileOrder != null) { + compiler.setOrder(Arrays.asList(StringUtils.split(compileOrder, ", "))); + } + ConditionalFileSet fileSet = new ConditionalFileSet(); fileSet.setProject( mojo.getAntProject() ); fileSet.setIncludes( StringUtils.join( includeSet.iterator(), "," ) ); diff --git a/src/main/java/org/apache/maven/plugin/nar/Fortran.java b/src/main/java/org/apache/maven/plugin/nar/Fortran.java index aef297d..52cd77d 100644 --- a/src/main/java/org/apache/maven/plugin/nar/Fortran.java +++ b/src/main/java/org/apache/maven/plugin/nar/Fortran.java @@ -27,7 +27,6 @@ package org.apache.maven.plugin.nar; public class Fortran extends Compiler { - public Fortran() { } -- cgit v1.2.3