diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-03 15:18:49 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-12-03 15:18:49 +0100 |
commit | 7e67a8e010cc8b42b88fea00ea57a0df5dafd692 (patch) | |
tree | ee4a070e9d4972d5b50fd62c29cd96e37c6279af /src | |
parent | 1c6d59f627673a420f1773bbcfeeabc32cc2919a (diff) | |
download | maven-nar-plugin-7e67a8e010cc8b42b88fea00ea57a0df5dafd692.tar.gz maven-nar-plugin-7e67a8e010cc8b42b88fea00ea57a0df5dafd692.tar.bz2 maven-nar-plugin-7e67a8e010cc8b42b88fea00ea57a0df5dafd692.tar.xz maven-nar-plugin-7e67a8e010cc8b42b88fea00ea57a0df5dafd692.zip |
Fixed NAR-72
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarSystemMojo.java | 4 | ||||
-rw-r--r-- | src/main/resources/META-INF/plexus/components.xml | 6 | ||||
-rw-r--r-- | src/site/apt/index.apt | 22 | ||||
-rw-r--r-- | src/site/apt/lifecycle.apt | 6 |
4 files changed, 20 insertions, 18 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarSystemMojo.java b/src/main/java/org/apache/maven/plugin/nar/NarSystemMojo.java index 0eb2905..24443c3 100644 --- a/src/main/java/org/apache/maven/plugin/nar/NarSystemMojo.java +++ b/src/main/java/org/apache/maven/plugin/nar/NarSystemMojo.java @@ -30,9 +30,11 @@ import org.apache.maven.plugin.MojoFailureException; /** * Generates a NarSystem class with static methods to use inside the java part of the library. + * Runs in generate-resources rather than generate-sources to allow the maven-swig-plugin (which runs in + * generate-sources) to configure the nar plugin and to let it generate a proper system file. * * @goal nar-system-generate - * @phase generate-sources + * @phase generate-resources * @requiresProject * @author Mark Donszelmann */ diff --git a/src/main/resources/META-INF/plexus/components.xml b/src/main/resources/META-INF/plexus/components.xml index 0308dc3..4b508c1 100644 --- a/src/main/resources/META-INF/plexus/components.xml +++ b/src/main/resources/META-INF/plexus/components.xml @@ -26,13 +26,13 @@ <phases> <validate>org.apache.maven.plugins:maven-nar-plugin:nar-validate</validate> <initialize></initialize> - <generate-sources>org.apache.maven.plugins:maven-nar-plugin:nar-download, - org.apache.maven.plugins:maven-nar-plugin:nar-system-generate + <generate-sources>org.apache.maven.plugins:maven-nar-plugin:nar-download </generate-sources> <process-sources>org.apache.maven.plugins:maven-nar-plugin:nar-unpack, org.apache.maven.plugins:maven-nar-plugin:nar-gnu-configure </process-sources> - <generate-resources></generate-resources> + <generate-resources>org.apache.maven.plugins:maven-nar-plugin:nar-system-generate + </generate-resources> <process-resources>org.apache.maven.plugins:maven-resources-plugin:resources, org.apache.maven.plugins:maven-nar-plugin:nar-resources, org.apache.maven.plugins:maven-nar-plugin:nar-gnu-resources diff --git a/src/site/apt/index.apt b/src/site/apt/index.apt index 50781b6..15ad924 100644 --- a/src/site/apt/index.apt +++ b/src/site/apt/index.apt @@ -33,11 +33,11 @@ allows you to build a jar file as well as nar files. The list below shows the se [[2]] {{{#nar-download}nar-download}} - [[3]] {{{#nar-system-generate}nar-system-generate}} + [[3]] {{{#nar-unpack}nar-unpack}} - [[4]] {{{#nar-unpack}nar-unpack}} + [[4]] {{{#nar-gnu-configure}nar-gnu-configure}} - [[5]] {{{#nar-gnu-configure}nar-gnu-configure}} + [[5]] {{{#nar-system-generate}nar-system-generate}} [[6]] {{{#nar-resources}nar-resources}} @@ -99,14 +99,6 @@ all dependent jar files some of which may include a nar.properties file. This property file contains information on what other machine dependent and machine independent nar files to download. This goal will download any further necessary nar files into the local repository. -* {nar-system-generate} - - This goal generates a NarSystem class if necessary. This class contains helper methods for your -code to handle things at run-time. The static method "loadLibrary()" is currently the only method -generated and will load your JNI library with name "artifactId-version". This goals only executed -if you produce a JNI library and you specify a <packageName> as subtag of <library>. The NarSystem -class will then end up in this package. - * {nar-unpack} Since a nar file is of no use to any native compilation process the nar-unpack goal unpacks the nar into @@ -120,6 +112,14 @@ over them with a target set to gnuTargetDirectory. This process can be inhibited gnuConfigureSkip and normally does not take place on Windows, unless gnuUseOnWindows is set. The generated and configured files are all stored in gnuTargetDirectory and will be handled in subsequent NAR goals. +* {nar-system-generate} + + This goal generates a NarSystem class if necessary. This class contains helper methods for your +code to handle things at run-time. The static method "loadLibrary()" is currently the only method +generated and will load your JNI library with name "artifactId-version". This goals only executed +if you produce a JNI library and you specify a <packageName> as subtag of <library>. The NarSystem +class will then end up in this package. + * {nar-resources} This is an optional goal. It will take any resources in src/nar/resources and copy them into diff --git a/src/site/apt/lifecycle.apt b/src/site/apt/lifecycle.apt index 9c66804..09ce29a 100644 --- a/src/site/apt/lifecycle.apt +++ b/src/site/apt/lifecycle.apt @@ -18,12 +18,12 @@ standard maven goals) attached to them. The order is left to right, top to botto *------------------------+-----------------------------------------------------------+ | initialize | | *------------------------+-----------------------------------------------------------+ -| generate-sources | <<nar-download>>, <<nar-system-generate>> | -*------------------------+-----------------------------------------------------------+ -| generate-resources | | +| generate-sources | <<nar-download>> | *------------------------+-----------------------------------------------------------+ | process-sources | <<nar-unpack>>, <<nar-gnu-configure>> | *------------------------+-----------------------------------------------------------+ +| generate-resources | <<nar-system-generate>> | +*------------------------+-----------------------------------------------------------+ | process-resources | resources, <<nar-resources>>, <<nar-gnu-resources>> | *------------------------+-----------------------------------------------------------+ | compile | compile, <<nar-javah>>, <<nar-gnu-make>>, <<nar-compile>> | |