Hi,
I wonder if there is need for an eXist maven plugin todo database operations from the build process. As such I wrote it (I needed it) and am willing to share it. It runs under maven-2.0.9 and java-6 and is capable of doing create,delete operations. The plugin can be extended to support Xquery operations (so that update scripts can be written as well), but thats for later... Oh, not unimportant, the plugin makes use of the xml-rpc protocol and is intended for interaction with standalone installations of eXist. Regards, Mike |
Administrator
|
Mike,
Thanks for sharing. At the moment, we do not interact with eXist at all during the build process. One thing which *could* be done would be to pre-populate the built-in eXist instance with data, for example to provide example forms and data. Would your plugin allow doing that? -Erik On Jun 24, 2008, at 1:47 AM, Mike Ahlers wrote: > > Hi, > > I wonder if there is need for an eXist maven plugin todo database > operations > from the build process. As such I wrote it (I needed it) and am > willing to > share it. It runs under maven-2.0.9 and java-6 and is capable of doing > create,delete operations. The plugin can be extended to support Xquery > operations (so that update scripts can be written as well), but > thats for > later... > > Oh, not unimportant, the plugin makes use of the xml-rpc protocol > and is > intended for interaction with standalone installations of eXist. > > Regards, > Mike > -- > View this message in context: http://www.nabble.com/Maven-eXist-plugin-tp18086622p18086622.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
The plugin does exactly that, populate the database with data, or, if you like, delete data from it. All you need to do is to specify the location (URL) of a running instance and activate the maven goal. For example, I am using a profile called recreate-database which sets it up. Find the source attached, and an snippet example (profile) of how to use it. ExistPlugin.java Data.java <configuration> <url>xmldb:exist://localhost:8088/xmlrpc/db</url> <username>admin</username> <password></password> <deleteCollections> deleteme </deleteCollections> <createCollections> test/test1 test/test2 </createCollections> <createData> <data> <source>src/main/database/data/users/users.xml</source> <destination>test/test1</destination> </data> <data> <source>src/main/database/data/users/sample.xml</source> <destination>test/test2</destination> </data> <data> <source>src/main/database/data/users/logo.jpg</source> <destination>test/test2</destination> <type>jpg</type> </data> </createData> <deleteData> test/test2/pom.xml </deleteData> </configuration> The plugin supports binary data as well (as long type != xml)... There are dependencies involved, but I figure with the code it could be refactored easily and the dependencies are straightforward. If assistance is required, let me know. Regards, Mike PS> My goal is to have Orbeon itself fully build with maven, but my workload as it is puts that in the backseat for a while. PPS> You can also use eXist binary data (representing the database with data) as part of the distribution. |
Administrator
|
Thanks. Just thinking that this would be a little more complicated
because you must start and eXist instance during the build process to create the data too. Maybe the ideal would be for ant to start an embedded eXist for that purpose? -Erik On Jun 24, 2008, at 12:43 PM, Mike Ahlers wrote: > > Hi Erik, > > The plugin does exactly that, populate the database with data, or, > if you > like, delete data from it. All you need to do is to specify the > location > (URL) of a running instance and activate the maven goal. For > example, I am > using a profile called recreate-database which sets it up. Find the > source > attached, and an snippet example (profile) of how to use it. > > http://www.nabble.com/file/p18098490/ExistPlugin.java ExistPlugin.java > http://www.nabble.com/file/p18098490/Data.java Data.java > > <configuration> > <url>xmldb:exist://localhost:8088/xmlrpc/db</url> > <username>admin</username> > <password></password> > <deleteCollections> > deleteme > </deleteCollections> > <createCollections> > test/test1 > test/test2 > </createCollections> > <createData> > <data> > <source>src/main/database/data/users/users.xml</source> > <destination>test/test1</destination> > </data> > <data> > <source>src/main/database/data/users/sample.xml</source> > <destination>test/test2</destination> > </data> > <data> > <source>src/main/database/data/users/logo.jpg</source> > <destination>test/test2</destination> > <type>jpg</type> > </data> > </createData> > <deleteData> > test/test2/pom.xml > </deleteData> > </configuration> > > The plugin supports binary data as well (as long type != xml)... > > There are dependencies involved, but I figure with the code it could > be > refactored easily and the dependencies are straightforward. If > assistance is > required, let me know. > > Regards, > Mike > > PS> My goal is to have Orbeon itself fully build with maven, but my > workload > as it is puts that in the backseat for a while. > PPS> You can also use eXist binary data (representing the database > with > data) as part of the distribution. > -- > View this message in context: http://www.nabble.com/Maven-eXist-plugin-tp18086622p18098490.html > Sent from the ObjectWeb OPS - Users mailing list archive at > Nabble.com. > > > -- > You receive this message as a subscriber of the [hidden email] > mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
Not that I have done it before, but I know it is possible with 'cargo' (container plugin), see: http://cargo.codehaus.org/Maven2+plugin. In association with 'wagon' (transport plugin) you can publish nightly builds automatically (just a plugin configuration), which has similarities to the one we discuss, see also: http://maven.apache.org/wagon/ This post almost borders maven evagelism (sorry ;-), as I know you mentioned you're using Ivy. Can't resist: http://docs.codehaus.org/display/MAVEN/Feature+Comparisons Regards, Mike |
Free forum by Nabble | Edit this page |