Creating '--rsyncable' maven assembly - maven

Currently, maven-assembly-plugin allows only pre-defined output archive formats, such as .zip, tar.gz. The docs do not mention straightforward configuration to create --rsyncable gzip.
So far, I've gotten as far as maven-archiver should be configured, however the docs are rather scarce.
Just wondering, anyone already explored this?
Update: Maven-archiver uses org.codehaus.plexus.archiver.gzip, which uses java.util.zip.GZIPOutputStream, which is a standard impl of zip, expectedly without --rsyncable support.
Looks like the most feasible option is to search for alternative zip implementation and promote it to plexus guys.

I had the same problem and tried to find a way to create rsyncable tar.gz archives but to no avail. However I could solve it by using 'zip' as format. 'zip' seems to be rsyncable by default. Most probably 'jar' will do the trick as well. So, if there is no specific reason to use 'tar.gz' or 'tar.bz2', I prefer 'zip' now for packaging in order to get the advantage from rsync on transfering my packages to remote machines.

Related

Sorbet powered gem distribution [duplicate]

I have a gem I want to add types to (either by submitting a PR or by forking to use just in my project), but the documentation does not give any more guidance other than to create an /rbi folder.
Thinking out loud, should it mirror the files in lib/ with added type signatures, or should it be one large file (per version?) like the signatures in sorbet-typed?
I don't know of any gems doing this yet, and the documentation doesn't mention it either.
I recently went through this process for one of my gems - pdf-reader. It was my first experience with sorbet (so I'm no expert), and I also noticed the lack of documentation for the specific use case of adding types to a gem.
I ended up generating the initial rbi file using parlour, which put them all into a single file: https://github.com/yob/pdf-reader/blob/480aa240a531cd6f97a46a29279f19025821e886/rbi/pdf-reader.rbi
Sorbet seems happy with that, so I haven't changed it.

What is the directory structure for adding Sorbet RBIs to a gem?

I have a gem I want to add types to (either by submitting a PR or by forking to use just in my project), but the documentation does not give any more guidance other than to create an /rbi folder.
Thinking out loud, should it mirror the files in lib/ with added type signatures, or should it be one large file (per version?) like the signatures in sorbet-typed?
I don't know of any gems doing this yet, and the documentation doesn't mention it either.
I recently went through this process for one of my gems - pdf-reader. It was my first experience with sorbet (so I'm no expert), and I also noticed the lack of documentation for the specific use case of adding types to a gem.
I ended up generating the initial rbi file using parlour, which put them all into a single file: https://github.com/yob/pdf-reader/blob/480aa240a531cd6f97a46a29279f19025821e886/rbi/pdf-reader.rbi
Sorbet seems happy with that, so I haven't changed it.

Aurelia CLI and braintree-web

I am trying to use https://www.npmjs.com/package/braintree-web with Aurelia (using the aurelia-cli and RequireJS). I am stuck trying to get all the many dependencies to resolve.
To use 3rd party library in Aurelia the library must be defined in the aurelia.json file.
If I add "braintree-web" in that file then aurelia complains that "braintree-web" it requires the modules "american-express", "apple-pay" etc etc.
If I manually create the "american-express", "apple-pay" dependencies then each one also refers to "braintree-web/lib", and a bunch of other sub-directory dependencies.
In short I can't get the "braintree-web" module to load because I have to manually build all sub-dependencies and its too complex to get working.
As I state above, I am using requireJS, should these dependencies all resolve correctly?
Any ideas as to how I can get this working?
Thanks
If all dependencies is what you need, then with requirejs + aurelia-cli you'll have to declare all dependencies. There is an experimental version of the cli being developed which you can find here, where you won't have to declare any dependencies in aurelia.json anymore.
With webpack you also don't need to declare any dependencies by the way.
Do you really need everything though? The docs mention for example you could import just the client. Still looks like a whole heap of dependencies, but at least a lot less than importing the main index.js.
You could also just include their pre-bundled client which I believe is https://js.braintreegateway.com/web/3.32.1/js/client.min.js
On a side note, the person developing aforementioned experimental CLI is actually looking for people to test it with non-trivial apps. Me and several others have tried it with great results, so I can recommend you try it. If you could report back in the PR that would be really awesome.

maven-javadoc-plugin sourceFileExcludes not working

I'm not too sure what is the right way to use this tag, but I use it like this:
<sourceFileExcludes>
<exclude></exclude>
<exclude></exclude>
</sourceFileExcludes>
It doesn't work at all. It seems that there was a known bug in maven that this tag won't work as I found these threads:
https://stackoverflow.com/a/26223872/3209177
But that was a while ago. I didn't find much useful information on maven website as well.
So how can we exclude certain source files / classes while we build javadoc using maven?
Finally figured it out.
First, there was an known bug as tracked in this page: https://issues.apache.org/jira/browse/MJAVADOC-365
And the patch went into the plugin 2.10.2. So after that version, the bug is fixed. However, I was using some earlier version.
Second, use this schema:
<sourceFileExcludes>
<sourceFileExclude></sourceFileExclude>
<sourceFileExclude></sourceFileExclude>
</sourceFileExcludes>
To exclude file.
Third, in the sourceFileExclude, I used someClass.java, this is probably not right. Instead, I used someClass.* and this works for me.
You can use this pattern. It excludes the files irregardless of their package structure. More information here
<sourceFileExcludes>
<exclude>**/AppTest.java</exclude>
<exclude>**/Tester.java</exclude>
</sourceFileExcludes>

Where are vagrant plugins installed?

I'm curious to find where exactly vagrant plugins are installed. I'm currently looking at a vagrant installation on Windows, and my example is the vagrant-timezone plugin. My best guess was in the C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.8.1\plugins, but I'm not seeing "timezone" anywhere around there?
From some more research, it appears that information for plugins is spread across a few locations:
%USERPROFILE%\.vagrant.d\plugins.json
lists all installed plugins
%USERPROFILE%\.vagrant.d\gems\gems\"plugin_name-version"
Directory (not sure what all the files do, but this looks like the bulk of it)
%USERPROFILE%\.vagrant.d\gems\specifications\"plugin_name-version".gemspec
For my use case, I was looking to manually extract and install a plugin, so these seemed to be all that I needed to account for.

Resources