Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: epimorphics/github-actions/maven-build@v21
with:
java-version: 11
aws-access-key-id: ${{ secrets.DEPLOY_MAVEN_PRIVATE_S3_USERNAME }}
aws-secret-access-key: ${{ secrets.DEPLOY_MAVEN_PRIVATE_S3_PASSWORD }}
13 changes: 13 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Publish
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: epimorphics/github-actions/maven-publish@v21
with:
java-version: 8
aws-access-key-id: ${{ secrets.DEPLOY_MAVEN_PRIVATE_S3_USERNAME }}
aws-secret-access-key: ${{ secrets.DEPLOY_MAVEN_PRIVATE_S3_PASSWORD }}
163 changes: 121 additions & 42 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<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>com.epimorphics.lr</groupId>
<version>4.0.0</version>
<version>4.0.1-SNAPSHOT</version>

<scm>
<developerConnection>scm:git:ssh://git@github.com/epimorphics/ppd-text-index.git</developerConnection>
<tag>HEAD</tag>
</scm>

<properties>
<jdk.version>1.8</jdk.version>
<jdk.version>11</jdk.version>
<targetJdk>${jdk.version}</targetJdk>
<ver.wagon>2.2</ver.wagon>
<jena.version>4.5.0</jena.version>
<ver.wagon>2.10</ver.wagon>
<jena.version>4.6.1</jena.version>
</properties>

<dependencies>
Expand All @@ -26,71 +31,125 @@
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.12.2</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.21</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.15.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.3</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.25.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.18.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.2</version>
</dependency>
</dependencies>
</dependencyManagement>

<distributionManagement>
<repository>
<id>epi-public-repo</id>
<url>ftp://repository.epimorphics.com</url>
<id>epi-public-s3-release</id>
<name>Epimorphics S3 release repository</name>
<url>s3://epi-repository/release</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>

<snapshotRepository>
<id>epi-public-s3-snapshot</id>
<name>Epimorphics S3 snapshot repository</name>
<url>s3://epi-repository/snapshot</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</snapshotRepository>
</distributionManagement>

<repositories>

<repository>
<id>epi-public-repo</id>
<name>Epimorphics Public Repository</name>
<url>http://repository.epimorphics.com</url>
<layout>default</layout>
<id>epi-public-s3-release</id>
<name>Epimorphics S3 release repository</name>
<url>https://epi-repository.s3-eu-west-1.amazonaws.com/release</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>false</enabled></snapshots>
</repository>

<repository>
<id>epi-public-s3-snapshot</id>
<name>Epimorphics S3 snapshot repository</name>
<url>https://epi-repository.s3-eu-west-1.amazonaws.com/snapshot</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>

<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>true</enabled>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>

</repositories>


<artifactId>ppd-text-index</artifactId>
<build>
<pluginManagement>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
</configuration>
</plugin>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.4</version>
<configuration>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -114,6 +173,21 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<connectionType>developerConnection</connectionType>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.3.0</version>
</plugin>

</plugins>

</pluginManagement>
Expand All @@ -124,8 +198,13 @@
<artifactId>wagon-ftp</artifactId>
<version>${ver.wagon}</version>
</extension>
<extension>
<groupId>org.springframework.build</groupId>
<artifactId>aws-maven</artifactId>
<version>5.0.0.RELEASE</version>
</extension>
</extensions>


</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
// Imports
///////////////

import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.*;

import org.apache.jena.query.text.EntityDefinition;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -74,16 +74,16 @@ public void testExtendedEntityEntityDefinitionNodeNode() {
assertEquals( "http://test.com/g", xe.getGraph() );
}

@Test (expected=NotSuitableForIndexingException.class)
@Test
public void testExtendedEntityEntityDefinitionNodeNodeNodeNode_1() {
// resource o is not suitable for indexing
new ExtendedEntity( ed_withG, Mode.NONE, g, s, p, o );
assertThrows(NotSuitableForIndexingException.class, () -> new ExtendedEntity(ed_withG, Mode.NONE, g, s, p, o));
}

@Test (expected=NotSuitableForIndexingException.class)
@Test
public void testExtendedEntityEntityDefinitionNodeNodeNodeNode_2() {
// no field for l
new ExtendedEntity( ed_withG, Mode.NONE, g, s, p, l );
assertThrows(NotSuitableForIndexingException.class, () -> new ExtendedEntity( ed_withG, Mode.NONE, g, s, p, l ));
}

@Test
Expand All @@ -93,16 +93,18 @@ public void testExtendedEntityEntityDefinitionNodeNodeNodeNode_3() {
assertEquals( "foo", xe.get( "foo_field" ));
}

@Test (expected=NotSuitableForIndexingException.class)
@Test
public void testExtendedEntityEntityDefinitionQuad_1() {
Quad q = new Quad( g, s, p, o );
new ExtendedEntity( ed_withG, Mode.NONE, q );
Quad q = new Quad(g, s, p, o);
assertThrows(NotSuitableForIndexingException.class,
() -> new ExtendedEntity(ed_withG, Mode.NONE, q));
}

@Test (expected=NotSuitableForIndexingException.class)
@Test
public void testExtendedEntityEntityDefinitionQuad_2() {
Quad q = new Quad( g, s, p, l );
new ExtendedEntity( ed_withG, Mode.NONE, q );
assertThrows(NotSuitableForIndexingException.class,
() -> new ExtendedEntity( ed_withG, Mode.NONE, q ));
}

@Test
Expand All @@ -129,4 +131,3 @@ public void testAddProperty() {
assertEquals( "foo", xe.get( "foo_field" ));
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
import org.apache.commons.io.FileUtils;
import org.apache.jena.query.text.TextQuery;
import org.apache.jena.riot.RDFDataMgr;
import org.junit.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -41,13 +44,13 @@ public class FunctionalTest extends SharedIndexTestSupport {
/***********************************/

/** Ensure assembler initialized. */
@BeforeClass
@BeforeAll
public static void setupClass() {
TextQuery.init() ;
}

/** Reset the TDB dataset each time by deleting and reloading */
@Before
@BeforeEach
public void resetTDB() {
log.debug( "Reset TDB" );
StoreConnection.expel( Location.create(TDB_TEST_ROOT), true );
Expand All @@ -74,7 +77,7 @@ public void resetTDB() {
ds = loadDataset( ASSEMBLER_CONFIG, PPD_BASE_TEST_DATA );
}

@After
@AfterEach
public void closeDataset() {
ds.close();
}
Expand Down
Loading
Loading