summaryrefslogtreecommitdiff
path: root/src/site/apt/faq.apt
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2009-10-01 14:33:24 +0200
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2009-10-01 14:33:24 +0200
commit846700d44b67b22835b57a1c04f17043db8323a3 (patch)
treea253ecd4ada6f80dbcd08177035cfa71ade9b670 /src/site/apt/faq.apt
parent0a8746644d70eb8b1cfb615c27155c19e09f46d3 (diff)
downloadmaven-nar-plugin-846700d44b67b22835b57a1c04f17043db8323a3.tar.gz
maven-nar-plugin-846700d44b67b22835b57a1c04f17043db8323a3.tar.bz2
maven-nar-plugin-846700d44b67b22835b57a1c04f17043db8323a3.tar.xz
maven-nar-plugin-846700d44b67b22835b57a1c04f17043db8323a3.zip
Moved files in from freehep-nar-plugin version 2.0-alpha-11-SNAPSHOT
Diffstat (limited to 'src/site/apt/faq.apt')
-rw-r--r--src/site/apt/faq.apt50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/site/apt/faq.apt b/src/site/apt/faq.apt
new file mode 100644
index 0000000..ec1796f
--- /dev/null
+++ b/src/site/apt/faq.apt
@@ -0,0 +1,50 @@
+ ---
+FreeHEP NAR Plugin
+ ---
+ ---
+Mark Donszelmann
+ ---
+
+Frequently Asked Questions
+
+ [Why does the nar-package goal run before the (general) jar goal]
+The nar-package goal generates the nar.properties file which needs to
+be included in the general jar artifact.
+
+ [Why does the nar plugin produce both a jar artifact and an
+ attached -noarch.nar artifact. Could these two not be combined?]
+The jar artifact contains only java classes and gets added to the classpath.
+It needs no further processing. The -noarch.nar artifact contains include
+files and needs to be unpacked to be useful for the native compilers.
+It does not need to be added to the classpath. Combining the two artifacts
+would complicate matters.
+
+ [I use the nar-plugin to create a JNI type library. How do I load this library
+ from my code?]
+The JNI library is strictly connected to the corresponding java code in the
+main artifact (jar file). Since the main artifact has a version number, we decided
+that the JNI library should have the same version number. If you add the subtag
+<packageName> to the <library> tag, the nar-plugin will generate a NarSystem
+class for you which will load the library. Assuming you specified com.mycompany.mypackage
+as packageName, then you need to add the following code to the class with the native
+methods:
+
++--
+import com.mycompany.mypackage.NarSystem
+
+public class ... {
+
+ ...
+
+ static {
+ NarSystem.loadLibrary();
+ }
+
+ ...
+
+}
++--
+
+
+
+ \ No newline at end of file