Java: Maven: Fix some boo boos with the Windows installation.
- The resource path should not use the platform's file separator. - Restore the commands to download and extract the Windows native libraries. - Unrelated tweaks the README Change: 151161421
This commit is contained in:
parent
3e1676e40a
commit
fdf32bc5ed
@ -54,7 +54,8 @@ conducted in a [Docker](https://www.docker.com) container.
|
||||
- An account at [oss.sonatype.org](https://oss.sonatype.org/), that has
|
||||
permissions to update artifacts in the `org.tensorflow` group. If your
|
||||
account does not have permissions, then you'll need to ask someone who does
|
||||
to [file a ticket](https://issues.sonatype.org/) to add to the permissions.
|
||||
to [file a ticket](https://issues.sonatype.org/) to add to the permissions
|
||||
([sample ticket](https://issues.sonatype.org/browse/MVNCENTRAL-1637)).
|
||||
- A GPG signing key, required [to sign the release artifacts](http://central.sonatype.org/pages/apache-maven.html#gpg-signed-components).
|
||||
|
||||
### Deploying to Maven Central
|
||||
@ -97,7 +98,12 @@ EOF
|
||||
the private staging repository. After verifying the release, visit
|
||||
https://oss.sonatype.org/#stagingRepositories, find the `org.tensorflow`
|
||||
release and click on either `Release` to finalize the release, or `Drop` to
|
||||
abort.
|
||||
abort. Some things of note:
|
||||
|
||||
- For details, look at the [Sonatype guide](http://central.sonatype.org/pages/releasing-the-deployment.html).
|
||||
- Syncing with [Maven Central](http://repo1.maven.org/maven2/org/tensorflow/)
|
||||
can take 10 minutes to 2 hours (as per the [OSSRH
|
||||
guide](http://central.sonatype.org/pages/ossrh-guide.html#releasing-to-central)).
|
||||
|
||||
4. Upon successful release, commit changes to all the `pom.xml` files
|
||||
(which should have the updated version number).
|
||||
|
@ -69,11 +69,11 @@ download_libtensorflow_jni() {
|
||||
else
|
||||
curl -L "${RELEASE_URL_PREFIX}/libtensorflow_jni-cpu-linux-x86_64-${TF_VERSION}.tar.gz" | tar -xvz -C linux-x86_64
|
||||
curl -L "${RELEASE_URL_PREFIX}/libtensorflow_jni-cpu-darwin-x86_64-${TF_VERSION}.tar.gz" | tar -xvz -C darwin-x86_64
|
||||
# curl -L "${RELEASE_URL_PREFIX}/libtensorflow_jni-cpu-windows-x86_64-${TF_VERSION}.zip" -o /tmp/windows.zip
|
||||
curl -L "${RELEASE_URL_PREFIX}/libtensorflow_jni-cpu-windows-x86_64-${TF_VERSION}.zip" -o /tmp/windows.zip
|
||||
fi
|
||||
|
||||
# unzip /tmp/windows.zip -d windows-x86_64
|
||||
# rm -f /tmp/windows.zip
|
||||
unzip /tmp/windows.zip -d windows-x86_64
|
||||
rm -f /tmp/windows.zip
|
||||
# Updated timestamps seem to be required to get Maven to pick up the file.
|
||||
touch linux-x86_64/*
|
||||
touch darwin-x86_64/*
|
||||
|
@ -138,18 +138,8 @@ final class NativeLibrary {
|
||||
}
|
||||
|
||||
private static String makeResourceName() {
|
||||
// Using string addition instead of more modern functions like
|
||||
// java.nio.file.Paths.get() to make this method usable on Android,
|
||||
// where as of March 2017, the java.nio.files package was not available.
|
||||
final String separator = System.getProperty("file.separator");
|
||||
return "org"
|
||||
+ separator
|
||||
+ "tensorflow"
|
||||
+ separator
|
||||
+ "native"
|
||||
+ separator
|
||||
+ String.format("%s-%s", os(), architecture())
|
||||
+ separator
|
||||
return "org/tensorflow/native/"
|
||||
+ String.format("%s-%s/", os(), architecture())
|
||||
+ System.mapLibraryName(LIBNAME);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user