summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/apache/maven/plugin/nar/NarSystemGenerate.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/org/apache/maven/plugin/nar/NarSystemGenerate.java b/src/main/java/org/apache/maven/plugin/nar/NarSystemGenerate.java
index e3c8161..d33df60 100644
--- a/src/main/java/org/apache/maven/plugin/nar/NarSystemGenerate.java
+++ b/src/main/java/org/apache/maven/plugin/nar/NarSystemGenerate.java
@@ -80,11 +80,18 @@ public class NarSystemGenerate
getLog().info("Generating "+narSystem);
try
{
+ String artifactId = getMavenProject().getArtifactId();
+ String version = getMavenProject().getVersion();
FileOutputStream fos = new FileOutputStream( narSystem );
PrintWriter p = new PrintWriter( fos );
p.println( "// DO NOT EDIT: Generated by NarSystemGenerate." );
p.println( "package " + packageName + ";" );
p.println( "" );
+ p.println( "/**" );
+ p.println( " * Generated class to load the correct version of the jni library" );
+ p.println( " *" );
+ p.println( " * @author maven-nar-plugin" );
+ p.println( " */" );
p.println( "public class NarSystem" );
p.println( "{" );
p.println( "" );
@@ -92,10 +99,15 @@ public class NarSystemGenerate
p.println( " {" );
p.println( " }" );
p.println( "" );
+ p.println( " /**" );
+ p.println( " * Load jni library: "+artifactId+"-"+version );
+ p.println( " *" );
+ p.println( " * @author maven-nar-plugin" );
+ p.println( " */" );
p.println( " public static void loadLibrary()" );
p.println( " {" );
- p.println( " System.loadLibrary(\"" + getMavenProject().getArtifactId() + "-"
- + getMavenProject().getVersion() + "\");" );
+ p.println( " System.loadLibrary(\"" + artifactId + "-"
+ + version + "\");" );
p.println( " }" );
p.println( "}" );
p.close();