From 5e23f54cbea0a5283ec402399631cf8c22df856c Mon Sep 17 00:00:00 2001 From: Lyor Goldstein Date: Sun, 17 Jan 2016 12:07:50 +0200 Subject: [PATCH] Mavenize the build process - Phase 1: building the native code via Maven --- .gitignore | 8 +- CHANGES.md | 1 + native/build.xml | 385 +++++++++++++++++++++++++++++++++++++++ native/pom.xml | 54 ++++++ parent/build-base.xml | 99 ++++++++++ parent/build-compile.xml | 144 +++++++++++++++ parent/pom.xml | 308 +++++++++++++++++++++++++++++++ 7 files changed, 998 insertions(+), 1 deletion(-) create mode 100644 native/build.xml create mode 100644 native/pom.xml create mode 100644 parent/build-base.xml create mode 100644 parent/build-compile.xml create mode 100644 parent/pom.xml diff --git a/.gitignore b/.gitignore index 8ac58825f4..d2c6d7afa5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ -build +target/ +.project +.classpath +build/ build-d64 build.eclipse build.number @@ -21,3 +24,6 @@ native/libffi/doc/libffi.info junit-* pom-jna.xml.asc pom-jna-platform.xml.asc +# IntelliJ IDEA +.idea +*.iml diff --git a/CHANGES.md b/CHANGES.md index 3c980d4ce0..964874539b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -36,6 +36,7 @@ Features * [#583](https://github.com/java-native-access/jna/pull/583): Added printer attributes and status - [@IvanRF](https://github.com/IvanRF). * [#589](https://github.com/java-native-access/jna/pull/589): Use MethodResultContext in direct mapping (as done in interface mapping) - [@marco2357](https://github.com/marco2357). * [#595](https://github.com/java-native-access/jna/pull/595): Allow calling COM methods/getters requiring hybrid calling (METHOD+PROPERTYGET) - [@matthiasblaesing](https://github.com/matthiasblaesing). +* [#582](https://github.com/java-native-access/jna/pull/582): Mavenize the build process - Phase 1: building the native code via Maven [@lgoldstein](https://github.com/lgoldstein) Bug Fixes --------- diff --git a/native/build.xml b/native/build.xml new file mode 100644 index 0000000000..c7129efcde --- /dev/null +++ b/native/build.xml @@ -0,0 +1,385 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/native/pom.xml b/native/pom.xml new file mode 100644 index 0000000000..cbf563aa7d --- /dev/null +++ b/native/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + native + pom + net.java.dev.jna:native + + + net.java.dev.jna + parent + 4.3.0-SNAPHSOT + ../parent + + + + + + maven-antrun-plugin + + + compile-native-library + package + + run + + + + + + + + + + + + + + maven-install-plugin + + true + + + + maven-deploy-plugin + + true + + + + + diff --git a/parent/build-base.xml b/parent/build-base.xml new file mode 100644 index 0000000000..94b931e1b6 --- /dev/null +++ b/parent/build-base.xml @@ -0,0 +1,99 @@ + + + + Holds common imported definitions for ANT build.xml file(s) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/parent/build-compile.xml b/parent/build-compile.xml new file mode 100644 index 0000000000..b7337f9202 --- /dev/null +++ b/parent/build-compile.xml @@ -0,0 +1,144 @@ + + + + Holds common imported definitions for ANT build.xml file(s) + that build/generate artifacts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/parent/pom.xml b/parent/pom.xml new file mode 100644 index 0000000000..3760b120f2 --- /dev/null +++ b/parent/pom.xml @@ -0,0 +1,308 @@ + + + 4.0.0 + net.java.dev.jna + parent + 4.3.0-SNAPHSOT + pom + net.java.dev.jna:parent + https://github.com/java-native-access/jna + + + UTF-8 + + + + 1 + 5 + 0 + + ${jvm.major.version}.${jvm.minor.version} + ${javac.source} + ${javac.source} + ${javac.source} + + ${javac.source} + ${javac.target} + ${javac.target} + ${javac.target} + + 3.2 + 2.19 + + 1.9.6 + 1.16 + 1.0b3 + + 4.12 + + 2.10.1 + + + + ${min.required.maven.version} + + + + + + junit + junit + ${junit.version} + test + + + + + + + LGPL, version 2.1 + http://www.gnu.org/licenses/licenses.html + repo + + + ASL, version 2 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + scm:git:https://github.com/java-native-access/jna + scm:git:ssh://git@github.com/java-native-access/jna.git + https://github.com/java-native-access/jna + + + + + twall + Timothy Wall + + Owner + + + + + + package + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + org.apache.maven.plugins + maven-dependency-plugin + [1.0,) + + copy + copy-dependencies + + + + + + + + + org.codehaus.gmaven + gmaven-plugin + [1.0,) + + compile + execute + testCompile + + + + + + + + + + + + + maven-compiler-plugin + 3.3 + + ${javac.source} + ${javac.target} + -Xlint:-serial + + + + + maven-jar-plugin + 2.6 + + + + true + true + + true + true + + + + ${java.version} + ${java.vm.version} + ${user.name} + + ${maven.build.timestamp} + ${maven.version} + + + + + + + maven-install-plugin + 2.5.2 + + + + maven-dependency-plugin + 2.10 + + + install + install + + sources + + + + + + + maven-clean-plugin + 2.6.1 + + + + maven-deploy-plugin + 2.8.2 + + + + maven-antrun-plugin + 1.8 + + + org.apache.ant + ant + ${ant.version} + + + com.sun + tools + ${javac.source} + system + ${java.home}/../lib/tools.jar + + + + + + maven-javadoc-plugin + ${javadoc.plugin.version} + + + + + + + maven-enforcer-plugin + 1.4 + + + enforce-versions + + enforce + + + + + + + [${min.required.maven.version},) + + + [${javac.target},) + + + + + + + maven-source-plugin + 2.4 + + + attach-sources + verify + + jar-no-fork + + + + + + + maven-surefire-plugin + ${surefire.plugin.version} + + + **/*Test.java + + + + + + + + ../native + + + + + + maven-project-info-reports-plugin + 2.2 + + + + maven-surefire-report-plugin + ${surefire.plugin.version} + + + + maven-javadoc-plugin + ${javadoc.plugin.version} + + + + + + + fast + + true + true + + + +