Missing mavenInstall in 4.1.2 and 4.1.3?

0 views
Skip to first unread message

phe...@mulesoft.com

unread,
Aug 9, 2016, 6:06:33 PM8/9/16
to Stardog
Hey guys,

I've been trying to use the groovy library to interface with Stardog, but have not been able to get it running. I'm currently using 4.1.2. First and foremost, I've had to modify my maven pom file in order to get it to successfully build, can someone verify I haven't broken something in the process?

<dependency>

            <groupId>com.complexible.stardog</groupId>

            <artifactId>stardog-groovy</artifactId>

            <version>4.1</version>

                <exclusions>

                    <exclusion>

                        <groupId>com.complexible.stardog</groupId>

                        <artifactId>client-snarl</artifactId>

                    </exclusion>

                    <exclusion>

                        <groupId>com.complexible.stardog</groupId>

                        <artifactId>client-http</artifactId>

                    </exclusion>

                </exclusions>

        </dependency>

        <dependency>

            <groupId>com.complexible.stardog.utils</groupId>

            <artifactId>stardog-utils-common</artifactId>

            <version>4.1.2</version>

        </dependency>

        <dependency>

            <groupId>com.complexible.stardog</groupId>

            <artifactId>server</artifactId>

            <version>4.1.2</version>

            <type>pom</type>

        </dependency>

        <dependency>

            <groupId>com.complexible.stardog</groupId>

            <artifactId>client-snarl</artifactId>

            <version>4.1.2</version>

            <type>pom</type>

        </dependency>

        <dependency>

            <groupId>com.complexible.stardog</groupId>

            <artifactId>client-http</artifactId>

            <version>4.1.2</version>

            <type>pom</type>

            <exclusions>

                <exclusion>

                    <groupId>org.openrdf.sesame</groupId>

                    <artifactId>sesame-rio</artifactId>

                </exclusion>

            </exclusions>

        </dependency>

<dependency>

    <groupId>org.openrdf.sesame</groupId>

    <artifactId>sesame-rio-api</artifactId>

    <version>4.1.2</version>

</dependency>


It won't build if I don't exclude the client-http and client-snarl from the groovy dependency and load them separately.


Secondly, when I run an app and attempt to connect to the database I get the following exception: "com.complexible.stardog.StardogException: No driver was found which supports the connection string: 'localhost:5820/testdb', please double-check the URL and verify the protocol is correct and try again."


A lot of your forum posts mention a mavenInstall script, which I assume loads the core dependencies, but I no longer see that in the distribution. Am I missing something?


Cheers,


--Paul

Al Baker

unread,
Aug 9, 2016, 8:14:07 PM8/9/16
to sta...@clarkparsia.com
Hi Paul,

The README on the stardog-groovy github repo is outdated and I will correct it.  In the interim, you need only specify the dependency and add the stardog maven repo to your repositories definition per the Stardog official docs [1].

If you want to use Groovy for building the application, I’ve created a fully working POM for you that works with the groovy-maven-eclipse compiler and uses Spring boot for general lightweight containerization.


Depending on how you want to structure your POMs, I often like to put the client-snarl and client-http dependencies at the top where I can manage versions explicitly.  Otherwise, the stardog-groovy version will pull them in.

I also noticed that you included the server dependency in your example below.  That is only required if you want to run the Stardog server co-resident with your application in the same JVM.  If you go down this route, it does require you to manage the server lifecycle on your own.  Stardog-groovy doesn’t provide a means to do so.  Here is an example from the stardog-spring project that manages an embedded server as part of its test suite:


Let me know if you have any questions.

Cheers,
Al Baker




--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en
Reply all
Reply to author
Forward
0 new messages