diff options
author | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-10-30 11:53:11 +0100 |
---|---|---|
committer | Mark Donszelmann <Mark.Donszelmann@gmail.com> | 2009-10-30 11:53:11 +0100 |
commit | fb0fba2f15f4e51628bf2d33d7afa5a7247fcf85 (patch) | |
tree | 8c0632778282e2b8928d8a9ca4f762aa6770ec8c | |
parent | b38b49ae35e148f9dab5d26251726c8d007b53bd (diff) | |
download | maven-nar-plugin-fb0fba2f15f4e51628bf2d33d7afa5a7247fcf85.tar.gz maven-nar-plugin-fb0fba2f15f4e51628bf2d33d7afa5a7247fcf85.tar.bz2 maven-nar-plugin-fb0fba2f15f4e51628bf2d33d7afa5a7247fcf85.tar.xz maven-nar-plugin-fb0fba2f15f4e51628bf2d33d7afa5a7247fcf85.zip |
Added comments to NarSystem generated file; Fixed NAR-19
-rw-r--r-- | src/main/java/org/apache/maven/plugin/nar/NarSystemGenerate.java | 16 |
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(); |