MLCP not found in PATH
ml local mlcp requires that mlcp either be in a well known location, or that an entry be added in local.properties.
It would be far better to have it just determine for itself if mlcp is already on the system.
The easiest way would be to look for the PATH env variable, and search for mlcp.sh or mlcp.bat. From there, it's simple to get the path to the jar files.
Alternately, just download the jars and dependancies from maven. Or just use http to download and install the jars into the project, the first time the mlcp command is run.
There might be good reason to want to pick a different mlcp for Roxy. Searching PATH could be an interesting fall-back though. Found a pure-Ruby implementation of 'which' that could be useful to derive mlcp-home from mlcp 'exe':
http://stackoverflow.com/questions/2108727/which-in-ruby-checking-if-program-exists-in-path-from-ruby
Downloading jars would cause jars to be duplicated for each project. Would add several mb's to each project, with the risk of them getting checked in as well. I would prefer using a global mlcp..
Ran into this on Windows. Gave the a not very intuitive error (esp for those with low experience with roxy/MLCP). Any word on this happening?
Added to next milestone. On my wish list for a while, but not sure I have time to look into it before tech summit..
Alt might be to have our slush generator search for mlcp, and fix mlcp-home for us.. :P
Then again, that will only work for the person that actually ran that generator, so not my favorite..
Yeah that would be annoying and just cause git issues.
Unless there was possibly a task added to gulp to generate the file locally but that seems sorta complex..
well, could fit into my ideas about https://github.com/marklogic/slush-marklogic-node/issues/151. I'd love to put all those generator options in local.json, next to a defaults.json or something like that. And then make Roxy use those too. Not sure how easy that will be..
Simplest way of reading JSON (using core gems):
require 'yaml'
items = YAML.load_file('local.json')
items.each do |key, item|
puts "#{key}:#{item}"
end
Should be easy enough to integrate that into Roxy. If necessary through app_specific (for easier use in slush-marklogic-node)..
#515 could provide a way around, but I still like the idea searching path for mlcp.sh/.bat..
Pushing this away for the moment though..