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 --- src/it/it0018-fortran/pom.xml | 81 ++++++++++++++++++++++ src/it/it0018-fortran/src/main/fortran/a.f90 | 14 ++++ src/it/it0018-fortran/src/main/fortran/b.f90 | 11 +++ src/it/it0018-fortran/src/main/fortran/c.f90 | 11 +++ src/it/it0018-fortran/src/main/fortran/d.f90 | 11 +++ .../apache/maven/plugin/nar/AbstractNarLayout.java | 1 - .../java/org/apache/maven/plugin/nar/Compiler.java | 12 ++++ .../java/org/apache/maven/plugin/nar/Fortran.java | 1 - 8 files changed, 140 insertions(+), 2 deletions(-) create mode 100644 src/it/it0018-fortran/pom.xml create mode 100644 src/it/it0018-fortran/src/main/fortran/a.f90 create mode 100644 src/it/it0018-fortran/src/main/fortran/b.f90 create mode 100644 src/it/it0018-fortran/src/main/fortran/c.f90 create mode 100644 src/it/it0018-fortran/src/main/fortran/d.f90 diff --git a/src/it/it0018-fortran/pom.xml b/src/it/it0018-fortran/pom.xml new file mode 100644 index 0000000..b5bdb7a --- /dev/null +++ b/src/it/it0018-fortran/pom.xml @@ -0,0 +1,81 @@ + + + + + + 4.0.0 + + + org.apache.maven.its.nar + it-parent + 1.0-SNAPSHOT + ../it-parent/pom.xml + + + it0018-fortran + nar + + Maven NAR Fortran + 1.0-SNAPSHOT + + Fortran Example + + http://maven.apache.org/ + + + true + + + + + default + + true + + + install + + + maven-nar-plugin + true + + + c, d, b + + + + executable + + + + + + + + + + + + + + + + + diff --git a/src/it/it0018-fortran/src/main/fortran/a.f90 b/src/it/it0018-fortran/src/main/fortran/a.f90 new file mode 100644 index 0000000..2c898d1 --- /dev/null +++ b/src/it/it0018-fortran/src/main/fortran/a.f90 @@ -0,0 +1,14 @@ +program a +use B +use C +use D + +implicit none + + call f_b() + call f_c() + call f_d() + +end program a + + diff --git a/src/it/it0018-fortran/src/main/fortran/b.f90 b/src/it/it0018-fortran/src/main/fortran/b.f90 new file mode 100644 index 0000000..9a2d0bc --- /dev/null +++ b/src/it/it0018-fortran/src/main/fortran/b.f90 @@ -0,0 +1,11 @@ +module B + +contains + +subroutine f_b() + +write (6,*) "f_b()" + +end subroutine f_b + +end module B diff --git a/src/it/it0018-fortran/src/main/fortran/c.f90 b/src/it/it0018-fortran/src/main/fortran/c.f90 new file mode 100644 index 0000000..01dc193 --- /dev/null +++ b/src/it/it0018-fortran/src/main/fortran/c.f90 @@ -0,0 +1,11 @@ +module C + +contains + +subroutine f_c() + +write (6,*) "f_c()" + +end subroutine f_c + +end module C diff --git a/src/it/it0018-fortran/src/main/fortran/d.f90 b/src/it/it0018-fortran/src/main/fortran/d.f90 new file mode 100644 index 0000000..8b8b369 --- /dev/null +++ b/src/it/it0018-fortran/src/main/fortran/d.f90 @@ -0,0 +1,11 @@ +module D + +contains + +subroutine f_d() + +write (6,*) "f_d()" + +end subroutine f_d + +end module D 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