Ontopia Maven Repository and ease of use with Maven

28 views
Skip to first unread message

Stig Lau

unread,
Aug 6, 2009, 2:57:11 PM8/6/09
to ont...@googlegroups.com
I have now created the maven-repository folder in SVN which is the basis for distribution with Maven2 and Ant Ivy. It contains the Ontopia- as well as 3rd party-artifacts not found in external repositories.
The repository can drastically improve ease of use and adoption for developers using Ontopia.
I have attached a demo web application which uses Ontopia and an XTM Topic Map to show a result from a query in a web page.
I believe this can make a big difference!
Regards
 -Stig,


Instructions for running application:
  • unzip
  • Set the path value in src/main/resources/tm-sources.xml (please send me the correct usage of tm-sources.xml :)
  • type mvn jetty:run in the command line - this will compile, run eventual tests, download an embedded web server and start it
  • go to http://localhost:8080 and press the links leading to index.jspx
This is the xml needed for Maven:
<dependency>
    <groupId>net.ontopia</groupId>
    <artifactId>ontopia-engine</artifactId>
    <version>5.0.0</version>
</dependency>

<repository>
    <id>Ontopia</id>
    <url>http://ontopia.googlecode.com/svn/maven-repository</url>
  </repository>
ontopia-stormberg-demowebapp.zip

Geir Ove Grønmo

unread,
Aug 6, 2009, 3:34:35 PM8/6/09
to ont...@googlegroups.com
On Thu, Aug 6, 2009 at 8:57 PM, Stig Lau<stig...@gmail.com> wrote:
> I have now created the maven-repository folder in SVN which is the basis for
> distribution with Maven2 and Ant Ivy. It contains the Ontopia- as well as
> 3rd party-artifacts not found in external repositories.
> The repository can drastically improve ease of use and adoption for
> developers using Ontopia.
> I have attached a demo web application which uses Ontopia and an XTM Topic
> Map to show a result from a query in a web page.
> I believe this can make a big difference!

Well done, Stig! This is awesome.

I get some warning when building, which I guess is because there are
no md5 checksum files in the repository:

[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for
net/ontopia/ontopia-engine/5.0.0/ontopia-engine-5.0.0.jar - IGNORING

I got your sample application up and running, but had to fix the
reference to the stormberg.xtm topic map document. We really need to
come up with a TopicMapSourceIF implementation that loads topic maps
through the class loader, so that we can put the topic maps in the
WEB-INF/classes directory.

--
Geir O.

Stig Lau

unread,
Aug 6, 2009, 4:01:09 PM8/6/09
to ont...@googlegroups.com
2009/8/6 Geir Ove Grønmo <indiap...@gmail.com>

On Thu, Aug 6, 2009 at 8:57 PM, Stig Lau<stig...@gmail.com> wrote:
> I have now created the maven-repository folder in SVN which is the basis for
> distribution with Maven2 and Ant Ivy. It contains the Ontopia- as well as
> 3rd party-artifacts not found in external repositories.
> The repository can drastically improve ease of use and adoption for
> developers using Ontopia.
> I have attached a demo web application which uses Ontopia and an XTM Topic
> Map to show a result from a query in a web page.
> I believe this can make a big difference!

Well done, Stig! This is awesome.
 
It's great when you can create a cool demo with so few lines of code. 


I get some warning when building, which I guess is because there are
 no md5 checksum files in the repository:
 
Correct. The md5's just need uploading and are autogenerated by mvn install... 
The artifact downloadtime can also be drastically reduced by trimming the transitive dependencies of the ontopia-engine pom.
The ontopia-engine pom would also look nice with the licensing and contributer info ;)


I got your sample application up and running, but had to fix the
reference to the stormberg.xtm topic map document. We really need to
come up with a TopicMapSourceIF implementation that loads topic maps
through the class loader, so that we can put the topic maps in the
WEB-INF/classes directory.
 
Just a quick scan gave me a recommendation to using Spring resource framework

 -Stig,


Baard H. Rehn Johansen

unread,
Aug 7, 2009, 7:26:41 AM8/7/09
to ont...@googlegroups.com
On Thu, Aug 06, 2009 at 10:01:09PM +0200, Stig Lau wrote:
> > I got your sample application up and running, but had to fix the
> > reference to the stormberg.xtm topic map document. We really need to
> > come up with a TopicMapSourceIF implementation that loads topic maps
> > through the class loader, so that we can put the topic maps in the
> > WEB-INF/classes directory.
>
> Just a quick scan gave me a recommendation to using Spring resource
> framework<http://static.springsource.org/spring/docs/2.5.x/reference/resources.html>

The Spring I/O framework is mainly convenience stuff for accessing
InputStream-s. I believe passing InputStream-s is more portable.

Your example-app could of course use Spring I/O. :)

/Baard

--
Baard H. Rehn Johansen <ba...@rehn.no>

Baard H. Rehn Johansen

unread,
Aug 7, 2009, 8:11:32 AM8/7/09
to ont...@googlegroups.com
On Fri, Aug 07, 2009 at 01:26:41PM +0200, Baard H. Rehn Johansen wrote:
> Your example-app could of course use Spring I/O. :)

Ah, there is no Java-code in the example-app, so ignore the last
comment.

Baard H. Rehn Johansen

unread,
Aug 7, 2009, 8:58:51 AM8/7/09
to ont...@googlegroups.com
On Thu, Aug 06, 2009 at 08:57:11PM +0200, Stig Lau wrote:
> I have now created the
> maven-repository<http://code.google.com/p/ontopia/source/browse/#svn/maven-repository>folder

> in SVN which is the basis for distribution with Maven2 and Ant Ivy.
> It contains the Ontopia- as well as 3rd party-artifacts not found in
> external repositories.
> The repository can drastically improve ease of use and adoption for
> developers using Ontopia.
> I have attached a demo web application which uses Ontopia and an XTM Topic
> Map to show a result from a query in a web page.
> I believe this can make a big difference!

Great! Now the next step would be to automate the upload of the
artifact, as well as maintain the pom as part of the main project.

Could you check in the pom.xml somewhere, src/dist/maven2 maybe?

Does google provide some sort of "upload" feature, or do we have to
upload by commiting it to the SVN-repo?

/Baard

Stig Lau

unread,
Aug 7, 2009, 3:33:10 PM8/7/09
to ont...@googlegroups.com
On Fri, Aug 7, 2009 at 2:58 PM, Baard H. Rehn Johansen <ba...@rehn.no> wrote:

Great! Now the next step would be to automate the upload of the
 artifact

The Maven Release plugin automates packaging, uploading to repository, tagging in SVN, increasing version and all that stuff. 
 
, as well as maintain the pom as part of the main project.
Could you check in the pom.xml somewhere, src/dist/maven2 maybe?

The pom in the maven repo, and the resulting transitive dependencies it pulls down should be carefully examined. As it is now, it is not really production ready because of the potentially rouge artifacts that tag along. When it's finished, it should be placed with the ontopia-engine module, and the Ontopia artifacts modularized.

Does google provide some sort of "upload" feature, or do we have to
upload by commiting it to the SVN-repo?

Release plugin can even use Subversion or ssh to upload artifacts. But it requires some testing flicking to get right, and SVN uploading should work well enough now.

-Stig,-
Reply all
Reply to author
Forward
0 new messages