Skip to content

Commit

Permalink
Added virtuoso examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Aklakan committed Mar 1, 2024
1 parent dd85e8c commit e0d0572
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 94 deletions.
65 changes: 8 additions & 57 deletions examples/virtuoso/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
<docker.showLogs>true</docker.showLogs>
<!-- <docker.user>raven</docker.user> -->

<data.port>8895</data.port>
<data.port>8894</data.port>

<!-- If data.serve is not empty then the virtuoso will not be terminated after loading -->
<data.serve></data.serve>
</properties>

<dependencies>
<dependency>
<groupId>org.coypu.data.disasters</groupId>
<groupId>dcat.org.coypu.data.disasters</groupId>
<artifactId>disasters</artifactId>
<version>0.20240228.1245</version>
<type>nt.bz2</type>
<version>0.20240227.2324-1</version>
<classifier>dcat</classifier>
<type>ttl.bz2</type>
</dependency>
</dependencies>

Expand Down Expand Up @@ -209,58 +212,6 @@ echo 'if [ ! -z "$SERVE" ]; then exec virtuoso-t +wait +foreground; fi' >> /virt
</plugins>
</build>
</profile>


<!-- Activating this profile sets the incremental version of this pom.xml to the current timestamp (minute granularity) -->
<profile>
<id>increment-version</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>version-timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<configuration>
<!-- format the timestamp such that the components fit into integers -->
<name>versionTimestamp</name>
<pattern>yyyyMMdd.HHmm</pattern>
<locale>en_US</locale>
<timeZone>UTC</timeZone>
</configuration>
</execution>
<execution>
<id>parse-version</id>
<goals>
<goal>parse-version</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>set</goal>
</goals>
<configuration>
<!-- build helper can only parse integers. A timestamp of minute granularity such as -->
<!-- yyyyMMddHHmm is literally too *long* (pun intended) -->
<newVersion>${parsedVersion.majorVersion}.${versionTimestamp}-SNAPSHOT</newVersion>
<!-- <newVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${versionTimestamp}-SNAPSHOT</newVersion> -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

88 changes: 51 additions & 37 deletions examples/virtuoso/serve/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.aksw.maven4data.examples</groupId>
<groupId>org.aksw.maven4data.examples.virtuoso</groupId>
<artifactId>virtuoso-serve</artifactId>
<version>0.0.1-SNAPSHOT</version>

Expand All @@ -16,19 +16,23 @@

<!-- Usage: -->
<!-- Start the container: mvn process-resources -->
<!-- Endpoint URL is http://localhost:8895/sparql -->
<!-- Override port with "mvn -D data.port=8890 process-resources -->
<!-- Stop the container: mvn docker:stop -->
<!-- "mvn clean" also stops the container but also removes all generated files -->

<properties>
<!-- Port under which to expose the Virtuoso service wrapped in this POM file -->
<data.port>8895</data.port>

<!-- Timeout after which docker execution will be terminated (in millis) -->
<!-- 1800000 = 30 minutes -->
<timeout>1800000</timeout>
<!-- 3600000 = 60 minutes -->
<timeout>3600000</timeout>

<!-- Show docker output during build -->
<docker.showLogs>true</docker.showLogs>
<docker.user>raven</docker.user>

<data.port>8895</data.port>
<data.serve></data.serve>
<docker.user>raven</docker.user>
</properties>


Expand All @@ -43,36 +47,46 @@
</dependencies>
-->

<build>
<plugins>
<profiles>
<profile>
<id>serve</id>
<activation>
<property>
<name>serve.skip</name>
<value>!true</value>
</property>
</activation>

<build>
<plugins>
<!-- Copy all dependencies with an RDF type to the toLoad folder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.aksw.maven4data.examples.data.virtuoso</groupId>
<artifactId>disasters</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>virtuoso.db</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/data</outputDirectory>
<destFileName>virtuoso.db</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>copy</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.aksw.maven4data.examples.data.virtuoso</groupId>
<artifactId>disasters</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>virtuoso.db</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/data</outputDirectory>
<destFileName>virtuoso.db</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.fabric8</groupId>
Expand All @@ -87,7 +101,6 @@
<port>${data.port}:8890</port>
</ports>
<env>
<SERVE>${data.serve}</SERVE>
<SPARQL_UPDATE>false</SPARQL_UPDATE>
<!-- <DEFAULT_GRAPH>http://dbpedia.org</DEFAULT_GRAPH> -->
<VIRT_Parameters_NumberOfBuffers>2720000</VIRT_Parameters_NumberOfBuffers>
Expand Down Expand Up @@ -130,6 +143,7 @@
</plugin>
</plugins>
</build>

</profile>
</profiles>
</project>

0 comments on commit e0d0572

Please sign in to comment.