From 14f1d0564d6e2c71c74288e537fcfa4acf7f4c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Mon, 25 Sep 2017 23:48:13 +0200 Subject: [PATCH] renamed maven-hawtjni-plugin to hawtjni-maven-plugin --- .gitignore | 1 + hawtjni-example/pom.xml | 6 +- .../pom.xml | 2 +- .../fusesource/hawtjni/maven/BuildMojo.java | 0 .../org/fusesource/hawtjni/maven/CLI.java | 0 .../hawtjni/maven/GenerateMojo.java | 0 .../hawtjni/maven/PackageJarMojo.java | 0 .../hawtjni/maven/PackageSourceMojo.java | 0 .../resources/project-template/Makefile.am | 0 .../resources/project-template/autogen.sh | 0 .../resources/project-template/configure.ac | 0 .../resources/project-template/m4/custom.m4 | 0 .../main/resources/project-template/m4/jni.m4 | 0 .../project-template/m4/osx-universal.m4 | 0 .../main/resources/project-template/readme.md | 0 .../resources/project-template/vs2008.vcproj | 0 .../resources/project-template/vs2010.vcxproj | 0 .../src/documentation/developer-guide.md | 80 +++---------------- pom.xml | 11 ++- 19 files changed, 23 insertions(+), 77 deletions(-) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/pom.xml (99%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/java/org/fusesource/hawtjni/maven/BuildMojo.java (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/java/org/fusesource/hawtjni/maven/CLI.java (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/java/org/fusesource/hawtjni/maven/GenerateMojo.java (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/java/org/fusesource/hawtjni/maven/PackageJarMojo.java (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/java/org/fusesource/hawtjni/maven/PackageSourceMojo.java (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/Makefile.am (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/autogen.sh (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/configure.ac (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/m4/custom.m4 (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/m4/jni.m4 (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/m4/osx-universal.m4 (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/readme.md (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/vs2008.vcproj (100%) rename {maven-hawtjni-plugin => hawtjni-maven-plugin}/src/main/resources/project-template/vs2010.vcxproj (100%) diff --git a/.gitignore b/.gitignore index 40616f5b..f0458187 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ webgen/out webgen/webgen.cache target +dependency-reduced-pom.xml diff --git a/hawtjni-example/pom.xml b/hawtjni-example/pom.xml index 4ae90829..51c51c03 100644 --- a/hawtjni-example/pom.xml +++ b/hawtjni-example/pom.xml @@ -61,8 +61,8 @@ org.fusesource.hawtjni - maven-hawtjni-plugin - 1.16-SNAPSHOT + hawtjni-maven-plugin + ${project.version} @@ -127,7 +127,7 @@ org.fusesource.hawtjni - maven-hawtjni-plugin + hawtjni-maven-plugin osname=MacOS;processor=x86-64 diff --git a/maven-hawtjni-plugin/pom.xml b/hawtjni-maven-plugin/pom.xml similarity index 99% rename from maven-hawtjni-plugin/pom.xml rename to hawtjni-maven-plugin/pom.xml index de519157..20a7f3cc 100644 --- a/maven-hawtjni-plugin/pom.xml +++ b/hawtjni-maven-plugin/pom.xml @@ -24,7 +24,7 @@ 1.16-SNAPSHOT - maven-hawtjni-plugin + hawtjni-maven-plugin maven-plugin HawtJNI Maven Plugin diff --git a/maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/BuildMojo.java b/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/BuildMojo.java similarity index 100% rename from maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/BuildMojo.java rename to hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/BuildMojo.java diff --git a/maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/CLI.java b/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/CLI.java similarity index 100% rename from maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/CLI.java rename to hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/CLI.java diff --git a/maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/GenerateMojo.java b/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/GenerateMojo.java similarity index 100% rename from maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/GenerateMojo.java rename to hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/GenerateMojo.java diff --git a/maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageJarMojo.java b/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageJarMojo.java similarity index 100% rename from maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageJarMojo.java rename to hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageJarMojo.java diff --git a/maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageSourceMojo.java b/hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageSourceMojo.java similarity index 100% rename from maven-hawtjni-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageSourceMojo.java rename to hawtjni-maven-plugin/src/main/java/org/fusesource/hawtjni/maven/PackageSourceMojo.java diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/Makefile.am b/hawtjni-maven-plugin/src/main/resources/project-template/Makefile.am similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/Makefile.am rename to hawtjni-maven-plugin/src/main/resources/project-template/Makefile.am diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/autogen.sh b/hawtjni-maven-plugin/src/main/resources/project-template/autogen.sh similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/autogen.sh rename to hawtjni-maven-plugin/src/main/resources/project-template/autogen.sh diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/configure.ac b/hawtjni-maven-plugin/src/main/resources/project-template/configure.ac similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/configure.ac rename to hawtjni-maven-plugin/src/main/resources/project-template/configure.ac diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/m4/custom.m4 b/hawtjni-maven-plugin/src/main/resources/project-template/m4/custom.m4 similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/m4/custom.m4 rename to hawtjni-maven-plugin/src/main/resources/project-template/m4/custom.m4 diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/m4/jni.m4 b/hawtjni-maven-plugin/src/main/resources/project-template/m4/jni.m4 similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/m4/jni.m4 rename to hawtjni-maven-plugin/src/main/resources/project-template/m4/jni.m4 diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/m4/osx-universal.m4 b/hawtjni-maven-plugin/src/main/resources/project-template/m4/osx-universal.m4 similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/m4/osx-universal.m4 rename to hawtjni-maven-plugin/src/main/resources/project-template/m4/osx-universal.m4 diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/readme.md b/hawtjni-maven-plugin/src/main/resources/project-template/readme.md similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/readme.md rename to hawtjni-maven-plugin/src/main/resources/project-template/readme.md diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/vs2008.vcproj b/hawtjni-maven-plugin/src/main/resources/project-template/vs2008.vcproj similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/vs2008.vcproj rename to hawtjni-maven-plugin/src/main/resources/project-template/vs2008.vcproj diff --git a/maven-hawtjni-plugin/src/main/resources/project-template/vs2010.vcxproj b/hawtjni-maven-plugin/src/main/resources/project-template/vs2010.vcxproj similarity index 100% rename from maven-hawtjni-plugin/src/main/resources/project-template/vs2010.vcxproj rename to hawtjni-maven-plugin/src/main/resources/project-template/vs2010.vcxproj diff --git a/hawtjni-website/src/documentation/developer-guide.md b/hawtjni-website/src/documentation/developer-guide.md index 967b0028..06ac53fe 100644 --- a/hawtjni-website/src/documentation/developer-guide.md +++ b/hawtjni-website/src/documentation/developer-guide.md @@ -68,23 +68,23 @@ If you are not familiar with Maven, please checkout [Maven by Example](http://www.sonatype.com/books/mvnex-book/reference/public-book.html). The easiest way to get started with HawtJNI is copy and use -[the example maven project](http://github.com/chirino/hawtjni/tree/master/hawtjni-example/) as a template for your module. +[the example maven project](http://github.com/fusersource/hawtjni/tree/master/hawtjni-example/) as a template for your module. -At the root of the maven project run: +At the root of the Maven project run: {pygmentize:: text} mvn install {pygmentize} -The maven build will produce the following artifacts: +The Maven build will produce the following artifacts: -* `target/${artifactId}-${version}.jar`: is the standard jar which maven produces that contains all your java classes. +* `target/${artifactId}-${version}.jar`: is the standard jar which Maven produces that contains all your java classes. * `target/${artifactId}-${version}-native-src.zip`: is a source archive of a autoconf and msbuild based build project for the native library. You can easily build this on other platforms using the platforms native toolchain. * `target/${artifactId}-${version}-${platform}.jar` is the platform specific jar which contains the your build JNI library as a resource. -These artifacts will be deployed to the maven repository so that other users can +These artifacts will be deployed to the Maven repository so that other users can easily use them as dependencies in their builds. You may also be interesting in @@ -702,60 +702,24 @@ have have the same conditional applied, just set it on the `@JniClass` annotatio ## Maven Plugin Reference {#adding-to-maven-build} -The HawtJNI provides a maven plugin which makes it easy code generate and build +The HawtJNI provides a Maven plugin which makes it easy code generate and build the native library for your current platform. -The maven tooling takes care of: +The Maven tooling takes care of: * Generating the native JNI source code from your annotated Java code * Generating a GNU make and MS Build compatible source project for building the native library -* Attaches the source project as `native-src.zip` artifact to the maven build +* Attaches the source project as `native-src.zip` artifact to the Maven build * Kicking of a native build of the library using the platform's build tools -* Packages the native library in a `platform.jar` and attaches the artifact to the maven build. +* Packages the native library in a `platform.jar` and attaches the artifact to the Maven build. * Updates the test build path so that unit tests can use the build native library. ### Usage -Once you have a working maven build for a java module, you can then update it to +Once you have a working Maven build for a java module, you can then update it to use HawtJNI to generate your JNI libraries. With the following steps: -1. Add the hawtjni repositories to the `pom.xml` configuration. - {pygmentize:: xml} - - - ... - - hawtjni.snapshot.fusesource.org - HawtJNI Snapshot Repo - http://hawtjni.fusesource.org/repo/snapshot - - false - - - true - - - ... - - - ... - - hawtjni.snapshot.fusesource.org - HawtJNI Snapshot Repo - http://hawtjni.fusesource.org/repo/snapshot - - false - - - true - - - ... - - - {pygmentize} - -2. Add the `hawtjni-runtime` dependency to pom. This small 19k jar file contains the HawtJNI annotations and a few Helper classes that +1. Add the `hawtjni-runtime` dependency to pom. This small 19k jar file contains the HawtJNI annotations and a few helper classes that you will be developing against. {pygmentize:: xml} @@ -771,7 +735,7 @@ use HawtJNI to generate your JNI libraries. With the following steps: {pygmentize} -3. Add the HawtJNI maven plugin to the pom. +2. Add the HawtJNI Maven plugin to the pom. {pygmentize:: xml} @@ -779,7 +743,7 @@ use HawtJNI to generate your JNI libraries. With the following steps: ... org.fusesource.hawtjni - maven-hawtjni-plugin + hawtjni-maven-plugin {project_version:} @@ -797,24 +761,6 @@ use HawtJNI to generate your JNI libraries. With the following steps: {pygmentize} - -4. If you run into problems with `mvn clean` no deleting native files, make sure you are using at least version 2.3 of the maven clean plugin. Previous - versions would run into problems with symlinks. - {pygmentize:: xml} - - - - ... - - org.apache.maven.plugins - maven-clean-plugin - 2.3 - - ... - - - - {pygmentize} ### Build Phases diff --git a/pom.xml b/pom.xml index e84f5b32..11d73a4e 100644 --- a/pom.xml +++ b/pom.xml @@ -181,9 +181,9 @@ - org.codehaus.mojo - jxr-maven-plugin - 2.0-beta-1 + org.apache.maven.plugins + maven-jxr-plugin + 2.5 true @@ -200,7 +200,7 @@ index - sumary + summary plugins dependencies mailing-list @@ -214,7 +214,6 @@ org.codehaus.mojo surefire-report-maven-plugin - 2.20 @@ -222,7 +221,7 @@ hawtjni-runtime hawtjni-generator - maven-hawtjni-plugin + hawtjni-maven-plugin hawtjni-example