Skip to content

Commit

Permalink
Adjust JPMS visibility for resources (#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
acoburn authored May 27, 2020
1 parent cfdd6b8 commit 9f5635e
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 8 deletions.
2 changes: 2 additions & 0 deletions auth/webac/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@

uses org.trellisldp.api.ResourceService;
uses org.trellisldp.api.IOService;

opens org.trellisldp.webac;
}
2 changes: 2 additions & 0 deletions components/file/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
requires org.apache.commons.codec;
requires org.apache.jena.core;

opens org.trellisldp.file;

provides org.trellisldp.api.BinaryService
with org.trellisldp.file.FileBinaryService;
provides org.trellisldp.api.MementoService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public boolean setPrefix(final String prefix, final String namespace) {

private void init() {
if (data.isEmpty()) {
data.putAll(read(getClass().getResource("/org/trellisldp/file/defaultNamespaces.json").getPath()));
data.putAll(read(Thread.currentThread().getContextClassLoader()
.getResource("org/trellisldp/file/defaultNamespaces.json").getPath()));
write(filePath, data);
}
data.forEach((k, v) -> dataRev.put(v, k));
Expand Down
2 changes: 2 additions & 0 deletions components/jdbc/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@

uses org.trellisldp.api.IdentifierService;
uses org.trellisldp.api.MementoService;

opens org.trellisldp.jdbc;
}
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ databaseChangeLog:
- column:
name: acl
type: BOOLEAN
file: initial_resource${csv}.csv
file: org/trellisldp/jdbc/initial_resource${csv}.csv
- changeSet:
id: 2
author: acoburn
Expand Down Expand Up @@ -422,7 +422,7 @@ databaseChangeLog:
- column:
name: namespace
type: STRING
file: initial_namespaces.csv
file: org/trellisldp/jdbc/initial_namespaces.csv
- changeSet:
id: 3
author: acoburn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class DBNamespaceServiceTest {

// Set up database migrations
try (final Connection c = pg.getPostgresDatabase().getConnection()) {
final Liquibase liquibase = new Liquibase("migrations.yml",
final Liquibase liquibase = new Liquibase("org/trellisldp/jdbc/migrations.yml",
new ClassLoaderResourceAccessor(),
new JdbcConnection(c));
final Contexts ctx = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class DBResourceTest {

// Set up database migrations
try (final Connection c = pg.getPostgresDatabase().getConnection()) {
final Liquibase liquibase = new Liquibase("migrations.yml",
final Liquibase liquibase = new Liquibase("org/trellisldp/jdbc/migrations.yml",
new ClassLoaderResourceAccessor(),
new JdbcConnection(c));
final Contexts ctx = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static EmbeddedPostgres setupDatabase(final String directory) {

// Set up database migrations
try (final Connection c = pg.getPostgresDatabase().getConnection()) {
final Liquibase liquibase = new Liquibase("migrations.yml",
final Liquibase liquibase = new Liquibase("org/trellisldp/jdbc/migrations.yml",
new ClassLoaderResourceAccessor(),
new JdbcConnection(c));
final Contexts ctx = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class DBWrappedMementoServiceTest {

// Set up database migrations
try (final Connection c = pg.getPostgresDatabase().getConnection()) {
final Liquibase liquibase = new Liquibase("migrations.yml",
final Liquibase liquibase = new Liquibase("org/trellisldp/jdbc/migrations.yml",
new ClassLoaderResourceAccessor(),
new JdbcConnection(c));
final Contexts ctx = null;
Expand Down
2 changes: 2 additions & 0 deletions components/test/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@
requires java.ws.rs;
requires java.xml.bind;
requires jakarta.inject;

opens org.trellisldp.test;
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public DataSourceFactory getDataSourceFactory(final AppConfiguration config) {
}
@Override
public String getMigrationsFileName() {
return "migrations.yml";
return "org/trellisldp/jdbc/migrations.yml";
}
});
}
Expand Down

0 comments on commit 9f5635e

Please sign in to comment.