diff --git a/auth/webac/src/main/java/module-info.java b/auth/webac/src/main/java/module-info.java index e7598e915..e6e8340a8 100644 --- a/auth/webac/src/main/java/module-info.java +++ b/auth/webac/src/main/java/module-info.java @@ -32,4 +32,6 @@ uses org.trellisldp.api.ResourceService; uses org.trellisldp.api.IOService; + + opens org.trellisldp.webac; } diff --git a/components/file/src/main/java/module-info.java b/components/file/src/main/java/module-info.java index 656609428..be258bc6f 100644 --- a/components/file/src/main/java/module-info.java +++ b/components/file/src/main/java/module-info.java @@ -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 diff --git a/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java b/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java index bb1eaf6a4..6551e1a5a 100644 --- a/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java +++ b/components/file/src/main/java/org/trellisldp/file/FileNamespaceService.java @@ -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)); diff --git a/components/jdbc/src/main/java/module-info.java b/components/jdbc/src/main/java/module-info.java index e028f4e9f..48f028fba 100644 --- a/components/jdbc/src/main/java/module-info.java +++ b/components/jdbc/src/main/java/module-info.java @@ -38,4 +38,6 @@ uses org.trellisldp.api.IdentifierService; uses org.trellisldp.api.MementoService; + + opens org.trellisldp.jdbc; } diff --git a/components/jdbc/src/main/resources/initial_namespaces.csv b/components/jdbc/src/main/resources/org/trellisldp/jdbc/initial_namespaces.csv similarity index 100% rename from components/jdbc/src/main/resources/initial_namespaces.csv rename to components/jdbc/src/main/resources/org/trellisldp/jdbc/initial_namespaces.csv diff --git a/components/jdbc/src/main/resources/initial_resource.csv b/components/jdbc/src/main/resources/org/trellisldp/jdbc/initial_resource.csv similarity index 100% rename from components/jdbc/src/main/resources/initial_resource.csv rename to components/jdbc/src/main/resources/org/trellisldp/jdbc/initial_resource.csv diff --git a/components/jdbc/src/main/resources/initial_resource_mysql.csv b/components/jdbc/src/main/resources/org/trellisldp/jdbc/initial_resource_mysql.csv similarity index 100% rename from components/jdbc/src/main/resources/initial_resource_mysql.csv rename to components/jdbc/src/main/resources/org/trellisldp/jdbc/initial_resource_mysql.csv diff --git a/components/jdbc/src/main/resources/migrations.yml b/components/jdbc/src/main/resources/org/trellisldp/jdbc/migrations.yml similarity index 99% rename from components/jdbc/src/main/resources/migrations.yml rename to components/jdbc/src/main/resources/org/trellisldp/jdbc/migrations.yml index 0d483f435..b40dfe552 100644 --- a/components/jdbc/src/main/resources/migrations.yml +++ b/components/jdbc/src/main/resources/org/trellisldp/jdbc/migrations.yml @@ -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 @@ -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 diff --git a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBNamespaceServiceTest.java b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBNamespaceServiceTest.java index aa91aef48..1174d6a34 100644 --- a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBNamespaceServiceTest.java +++ b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBNamespaceServiceTest.java @@ -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; diff --git a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBResourceTest.java b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBResourceTest.java index 9d61bd95f..19bd6ca21 100644 --- a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBResourceTest.java +++ b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBResourceTest.java @@ -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; diff --git a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBTestUtils.java b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBTestUtils.java index ef8bceb8a..8339c3a9b 100644 --- a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBTestUtils.java +++ b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBTestUtils.java @@ -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; diff --git a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBWrappedMementoServiceTest.java b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBWrappedMementoServiceTest.java index 33f2a88f4..c8e547cec 100644 --- a/components/jdbc/src/test/java/org/trellisldp/jdbc/DBWrappedMementoServiceTest.java +++ b/components/jdbc/src/test/java/org/trellisldp/jdbc/DBWrappedMementoServiceTest.java @@ -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; diff --git a/components/test/src/main/java/module-info.java b/components/test/src/main/java/module-info.java index d1e70b627..4cc90c258 100644 --- a/components/test/src/main/java/module-info.java +++ b/components/test/src/main/java/module-info.java @@ -35,4 +35,6 @@ requires java.ws.rs; requires java.xml.bind; requires jakarta.inject; + + opens org.trellisldp.test; } diff --git a/platform/dropwizard/src/main/java/org/trellisldp/dropwizard/app/TrellisApplication.java b/platform/dropwizard/src/main/java/org/trellisldp/dropwizard/app/TrellisApplication.java index 96f90c989..fb9a95004 100644 --- a/platform/dropwizard/src/main/java/org/trellisldp/dropwizard/app/TrellisApplication.java +++ b/platform/dropwizard/src/main/java/org/trellisldp/dropwizard/app/TrellisApplication.java @@ -64,7 +64,7 @@ public DataSourceFactory getDataSourceFactory(final AppConfiguration config) { } @Override public String getMigrationsFileName() { - return "migrations.yml"; + return "org/trellisldp/jdbc/migrations.yml"; } }); }