summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-27 14:23:04 +0100
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-11-27 14:23:04 +0100
commit7b37aa82c72edb6e1e15768367e76621ddfbadfc (patch)
tree2462a0864bb2e954f063efe40401f4434b641d69 /src
parent92ec9b8e2f069406cad40d9466bf449cac0e3dee (diff)
downloadmaven-nar-plugin-7b37aa82c72edb6e1e15768367e76621ddfbadfc.tar.gz
maven-nar-plugin-7b37aa82c72edb6e1e15768367e76621ddfbadfc.tar.bz2
maven-nar-plugin-7b37aa82c72edb6e1e15768367e76621ddfbadfc.tar.xz
maven-nar-plugin-7b37aa82c72edb6e1e15768367e76621ddfbadfc.zip
Fixed NAR-109
Diffstat (limited to 'src')
-rw-r--r--src/it/it0018-fortran/pom.xml81
-rw-r--r--src/it/it0018-fortran/src/main/fortran/a.f9014
-rw-r--r--src/it/it0018-fortran/src/main/fortran/b.f9011
-rw-r--r--src/it/it0018-fortran/src/main/fortran/c.f9011
-rw-r--r--src/it/it0018-fortran/src/main/fortran/d.f9011
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/AbstractNarLayout.java1
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/Compiler.java12
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/Fortran.java1
8 files changed, 140 insertions, 2 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.maven.its.nar</groupId>
+ <artifactId>it-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <relativePath>../it-parent/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>it0018-fortran</artifactId>
+ <packaging>nar</packaging>
+
+ <name>Maven NAR Fortran</name>
+ <version>1.0-SNAPSHOT</version>
+ <description>
+ Fortran Example
+ </description>
+ <url>http://maven.apache.org/</url>
+
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <artifactId>maven-nar-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <fortran>
+ <compileOrder>c, d, b</compileOrder>
+ </fortran>
+ <libraries>
+ <library>
+ <type>executable</type>
+ <linkFortran />
+ </library>
+ </libraries>
+ <linker>
+ <options>
+ <option>-lgfortran</option>
+ </options>
+ </linker>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
+</project>
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()
{
}