Skip to content
This repository was archived by the owner on Jan 11, 2022. It is now read-only.

Package only bioformats_package.jar#2

Merged
joshmoore merged 1 commit intomicroscopepony:masterfrom
rleigh-codelibre:package-bioformats-package-jar
Mar 23, 2018
Merged

Package only bioformats_package.jar#2
joshmoore merged 1 commit intomicroscopepony:masterfrom
rleigh-codelibre:package-bioformats-package-jar

Conversation

@rleigh-codelibre
Copy link
Contributor

@rleigh-codelibre rleigh-codelibre commented Mar 2, 2018

Fetch the current versioned jar, and drop the version to recreate the unversioned jar.

Check the versioned bio-formats-matlab zip has the same contents as the unversioned bfmatlab.zip from downloads.openmicroscopy.org. Without this commit, it packs up all transitive dependencies.

Check that it works with matlab.

Fetch the current versioned jar, and drop the version to
recreate the unversioned jar.
@rleigh-codelibre
Copy link
Contributor Author

Green in https://web-proxy.openmicroscopy.org/east-ci/job/BIOFORMATS-merge/34/ -- zip can be downloaded from the workspace (bio-formats-matlab/target)

@joshmoore
Copy link
Member

Does this mean that there's no longer a formal dependency between this repo and the upstream one?

@rleigh-codelibre
Copy link
Contributor Author

rleigh-codelibre commented Mar 5, 2018

There is, in that the maven-dependency-plugin is pulling in the jar. But it's not a <dependency>, since this type of package-level dependency pulls in all the transitive dependencies which aren't needed for simple bundling of the uberjar in the zip.

@rleigh-codelibre
Copy link
Contributor Author

@joshmoore Please could we merge this in so I can rebase ome/bioformats#2989 for this new repository?

@joshmoore
Copy link
Member

Quick feedback from background investigation: https://stackoverflow.com/a/7556707/56887 suggests that wildcard exclusions are supported. joshmoore@b674423 seems to only download:

maven@9852f05838a2:/tmp/build$ ls -ltra ~/.m2/repository/ome/
total 20
drwxr-xr-x  3 maven maven 4096 Mar 23 13:13 bio-formats_plugins
drwxr-xr-x  3 maven maven 4096 Mar 23 13:13 pom-bio-formats
drwxr-xr-x  3 maven maven 4096 Mar 23 13:13 bio-formats-tools

Tested via this Dockerfile:

FROM maven
RUN useradd -ms /bin/bash maven
USER maven
RUN git clone -b package-bioformats-package-jar git://github.com/rleigh-codelibre/bio-formats-matlab /tmp/build
WORKDIR /tmp/build
RUN git remote add josh git://github.com/joshmoore/bio-formats-matlab
RUN git fetch josh
RUN git merge --ff-only josh/package-bioformats-package-jar

@rleigh-codelibre
Copy link
Contributor Author

rleigh-codelibre commented Mar 23, 2018

@joshmoore Thanks, this is useful to know. However, what we are doing here is packaging, and <dependencies> is not really the appropriate mechanism for that. We are aggregating several files and bundling them together, and that's not what <dependencies> is intended for. This is one of the intended uses of the dependency plugin--fetching file dependencies which are not for building or testing. We are using the maven dependency plugin in bio-formats-documentation to do almost exactly the same thing--fetching the examples and formats source code; the only difference is we unpack the contents into the target rather than leave the jar as is. There's very little difference to what we do here.

<dependencies> have a scope of compile, test, runtime etc. And none of these are appropriate or applicable to what we are doing here.

@joshmoore
Copy link
Member

Under the assumption that we'll likely be moving this repository away from maven (to gradle?), let's go ahead and get your strategy merged and then we can reevaluate in the next round.

@joshmoore joshmoore merged commit 6899347 into microscopepony:master Mar 23, 2018
@rleigh-codelibre rleigh-codelibre deleted the package-bioformats-package-jar branch March 23, 2018 17:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants