Hi again Christian and Dirk:
I should also mention - another goal for me is that things be self-contained enough that I can share the whole thing on github, like here:
https://github.com/wendellpiez/Luminescent
Of course this is a huge mess since it has been architected by accretion, but the idea is that I (or anyone) would be able to download the stuff and start playing as quickly as possible. Mind you, this is meant as a long-term backup and project management strategy for me as much as anything -- since the point is less the processing than the results. However, I am working on the assumption that any improvement for anyone is an improvement for myself.
I don't need to deliver BaseX to my user, but I would like to give users (my future self) an easy way to run BaseX with the necessary settings and resources available, to get my XSLT/XQuery-driven functionality onto their systems and screens as speedily as possible.
Thanks again, Wendell
On Wed, Feb 4, 2015 at 12:36 PM, Wendell Piez wapiez@wendellpiez.com wrote:
Dear Christian,
Absolutely, the BaseX wiki page helps.
The one thing I am stuck on is the selection of the Maven archetype. I vaguely get that it will generate a POM (an editable and extensible configuration file) and a subdirectory structure, wherein I can develop my BaseX application.
But *which* Maven archetype of the many available is the appropriate one for my needs ... I cannot pretend to know.
I do not, however, wish to compile BaseX locally -- or at least, that is not a goal. (As a means to an end I can be convinced it'd be okay.) I won't be extending or manipulating BaseX itself or writing any Java; all my code is XQuery and XSLT.
(Indeed, minimizing a dependency on BaseX -- maintaining the capability to use the same libraries in another framework or environment -- such as Apache Cocoon, XProc pipelines, eXist, MarkLogic, what have you -- is a strategic goal for me. BaseX's support of standards along with its ease of use is thus very important to me.)
Currently, I have everything running well from a single BaseX installation, without Maven (tweaking the RESTXQ directory setting to point it to my project). However, I have more than one project using BaseX, and wish to keep them independent.
I am considering Maven as a good way for me to set up and configure BaseX, with minimal overhead, in a portable and project-specific way, not to customize or compile it, but just to run it ... call a script to update a database, then call another to start the http server ...
But my goal would also be accomplished if I knew how to do something comparatively simple (or so I would think): start up BaseX to run with a project-specific runtime setting.
So Dirk suggests a script that runs
export BASEX_JVM=-p=/my/restxq/directory && basexhttp
which I could totally do, as soon as I upgrade BaseX to v8.0.
Or, if Maven is a simple, clean, and lightweight way to do it, I'm not opposed. It's how that would or could work (in specific) for me, that has me stumped. I can type mvn generate:archetype and then fake it, and I can edit the POM and sniff around in the directory structure ... feeling increasingly like a blind monkey, if you get my drift.
But Dirk urged that I help support other newbies by asking these questions in public, albeit they are slightly OT (Maven, Linux scripting), since they have to do with setting up and running BaseX ...
So what's the appropriate maven archetype for me given I wish to run BaseX but not compile any Java, per se?
Thanks! Wendell
On Wed, Feb 4, 2015 at 2:58 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Wendell,
For all us Maven innoscenti, I wonder if you could recommend which maven archetype one should use when getting started running BaseX? (Any guidance or resource appreciated.)
I would like to redirect you to our Wiki documentation [1]. Does it help, or do you think some essential information is missing here (which we could/should add)?
It's absolutely ok to run BaseX without Maven. The easiest thing is to use the zip file and start "basexhttp" (see e.g. [2] for more information).
Best, Christian
[1] http://docs.basex.org/wiki/Maven [2] http://docs.basex.org/wiki/Startup
On Tue, Feb 3, 2015 at 10:47 PM, Wendell Piez wapiez@wendellpiez.com wrote:
Dear Christian and Dirk,
I am guessing something with 'webapp' but I have no idea, I don't even know what "webapp" means in this context (although I think it may be what I want).
Cordially, Wendell
On Mon, Jan 19, 2015 at 1:55 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Wendell, hi Dirk,
I'd like to jump in: Depending on the use case, I think I can absolutely make sense to work with the snapshot. The more feedback we get on potential errors, the more we'll be forced to keep it as stable as possible, and write more test cases ensuring it. Moreover, obviously, you'll always have access to the latest features.
This is how your maven snippet needs to look like:
<dependency> <groupId>org.basex</groupId> <artifactId>basex-api</artifactId> <version>8.0-SNAPSHOT</version> </dependency>
Hope this helps, Christian
On Sun, Jan 18, 2015 at 10:52 PM, Dirk Kirsten dk@basex.org wrote:
Hi Wendell,
no, actually this is even bad practice. You should always explicitly set the required version in your pomfile. Otherwise, your application always uses the latest version and isn't realiably testable. The following should fetch BaseX 7.9, the latest stable release:
<dependency> <groupId>org.basex</groupId> <artifactId>basex-api</artifactId> <version>7.9</version>
</dependency>
For Saxon, if you have the jar file in your lib you should be good to go (are you sure however that you included it via maven). Should be somethin like that as dependency:
<dependency> <groupId>net.sf.saxon</groupId> <artifactId>Saxon-HE</artifactId> <version>SAXON-VERSION-YOU-LIKE</version> </dependency>
Cheers, Dirk
On 01/18/2015 10:29 PM, Wendell Piez wrote:
BaseX friends,
If I run BaseX from Maven, do I always get to use the latest BaseX?
Do I have to do anything special to set up BaseX in Maven to use SaxonHE instead of Xalan for xslt:transform()? (I have Saxon9he.jar in my BaseX lib.)
Thanks! Wendell
-- Dirk Kirsten, BaseX GmbH, http://basexgmbh.de |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
-- Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^
-- Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^