From 021d3647452e704bfb99a82faa99492383d11556 Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Tue, 1 Sep 2015 11:13:33 +0000 Subject: [PATCH 1/7] Add a Maven POM definition to package compiled resources into a jar file. --- pom.xml | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 pom.xml diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..451d17ef5 --- /dev/null +++ b/pom.xml @@ -0,0 +1,96 @@ + + + + 4.0.0 + org.readium + readium-shared-js + 0.20.0 + + jar + Readium SDK (Shared JavaScript components) + https://github.com/readium/readium-sdk + + + UTF-8 + UTF-8 + + + + 3.2.1 + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 2.6.1 + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-install-plugin + 2.5.2 + + + org.apache.maven.plugins + maven-resources-plugin + 2.7 + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + + ${project.name} + ${project.version} + Readium Foundation + ${project.name} + ${project.version} + Readium Foundation + ${project.groupId} + true + + + + + + + + + + + build-output/_single-bundle + + readium-shared-js_all.js + readium-shared-js_all.js.bundles.js + readium-shared-js_all.js.map + + + + build-output/css + + sdk.css + + + + + + From c289d040bb29f11c46915e0ed2642d6b4247d0b8 Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Tue, 1 Sep 2015 12:12:13 +0000 Subject: [PATCH 2/7] Update README for Maven package --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 910e13faa..76aa502ac 100644 --- a/README.md +++ b/README.md @@ -202,3 +202,29 @@ For more complex build processes, Grunt / Gulp can be used, but these build syst Downside: DO NOT invoke `npm init` or `npm install --save` `--save-dev` `--save-optional`, as this would overwrite / update the JSON, not the master CSON! + +## Maven Package + +Once the JS components have been bundled with the `npm build` commands +shown above, a Maven package can be produced containing the relevant +resources. This can then be referenced from Android applications as +a standard library dependency, instead of having to import the sources +directly into the project as a `git submodule`. + +To create a package: + +```bash +$ mvn clean package +``` + +To reference the package from an Android application (in Maven +dependency syntax): + +``` + + org.readium + readium-shared-js + 0.20.0 + +``` + From 4b919390f73f7d6f423dcb424d24dc78268d58ea Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Tue, 1 Sep 2015 12:25:46 +0000 Subject: [PATCH 3/7] Correct URL --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 451d17ef5..e345a566f 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ jar Readium SDK (Shared JavaScript components) - https://github.com/readium/readium-sdk + https://github.com/readium/readium-shared-js UTF-8 From 27a2d5539958bf446ce9a2e3177622c7c28e66fa Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Tue, 1 Sep 2015 12:27:02 +0000 Subject: [PATCH 4/7] Clarify deployment --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76aa502ac..23139b245 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,8 @@ To create a package: $ mvn clean package ``` -To reference the package from an Android application (in Maven +After the package has been deployed to a repository with `mvn deploy`, +the package can be referenced from an Android application with (in Maven dependency syntax): ``` From bb7cb8ad320e496e26d2e5b239db3c65f3cee450 Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Thu, 24 Sep 2015 18:02:42 +0000 Subject: [PATCH 5/7] Set POM version to 0.20.0-alpha, and add POM metadata to meet Maven Central OSSRH requirements. --- pom.xml | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e345a566f..3db3a6e3c 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ 4.0.0 org.readium readium-shared-js - 0.20.0 + 0.20.0-alpha jar Readium SDK (Shared JavaScript components) @@ -18,6 +18,48 @@ UTF-8 + + https://github.com/readium/readium-shared-js + scm:https://github.com/readium/readium-shared-js + scm:https://github.com/readium/readium-shared-js + + + + https://github.com/readium/readium-shared-js/issues + GitHub + + + + + GitHub + GitHub + ${project.url} + + + + + + 3-Clause BSD License + http://opensource.org/licenses/BSD-3-Clause + + + + + + Daniel Weck + daniel.weck@gmail.com + Readium Foundation + http://readium.org/ + + + Mark Raynsford + code@io7m.com + + Maven operator + + + + 3.2.1 From 2059852a4416c972ff3aa4a67d5376f328f4b24c Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Thu, 24 Sep 2015 18:05:13 +0000 Subject: [PATCH 6/7] Enable optional PGP signing of packages when the readium-sign profile is enabled. --- pom.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pom.xml b/pom.xml index 3db3a6e3c..ab8a068c1 100644 --- a/pom.xml +++ b/pom.xml @@ -135,4 +135,29 @@ + + + + readium-sign + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + + + + From dac53a7f68c3bea48b0766384a7d94f673c95adb Mon Sep 17 00:00:00 2001 From: Mark Raynsford Date: Thu, 24 Sep 2015 18:21:50 +0000 Subject: [PATCH 7/7] Produce a jar of the JS resources, and an empty "sources" and "javadoc" jar, as these are requirements for the OSSRH repository. --- pom.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/pom.xml b/pom.xml index ab8a068c1..715db5325 100644 --- a/pom.xml +++ b/pom.xml @@ -133,6 +133,43 @@ + + + + + org.apache.maven.plugins + maven-jar-plugin + + + default-jar + package + jar + + + source-jar + package + jar + + + **/** + + sources + + + + javadoc-jar + package + jar + + + **/** + + javadoc + + + + +