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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The NOAA/NGDC ncISO team and the Unidata THREDDS team work closely (and with the

| netCDF-Java / TDS Version | threddsISO | threddsISO Tag |
|:--------------------------|:---------------|:---------------|
| 5.8.0 / 5.7-SNAPSHOT | 2.4.8-SNAPSHOT | |
| 5.9.0 / 5.7-SNAPSHOT | 2.4.8-SNAPSHOT | |
| 5.7.0 / 5.6 | 2.4.7 | **v2.4.7** |
| 5.6.0 / 5.5 | 2.4.6 | **v2.4.6** |
| 5.5.3 / 5.4 | 2.4.5 | **v2.4.5** |
Expand Down
53 changes: 17 additions & 36 deletions tds-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,56 +92,37 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>${skipTests}</skip>
<excludedGroups>thredds.server.metadata.Integration</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<excludes>
<!-- exclude logging config from jar -->
<exclude>**/logback.xml</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<skip>${skipTests}</skip>
<includes>
<include>**/*</include>
</includes>
<groups>thredds.server.metadata.Integration</groups>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>checksum</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="generate_checksum">
<property name="file" value="${project.build.directory}/${project.build.finalName}-jar-with-dependencies.jar"/>
<checksum algorithm="md5" file="${file}"/>
<checksum algorithm="sha1" file="${file}"/>
<checksum algorithm="sha-256" fileext=".sha256" file="${file}"/>
</target>
</configuration>
</execution>
</executions>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<!-- exclude logging config from jar -->
<exclude>**/logback.xml</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* Copyright (c) 2025 University Corporation for Atmospheric Research/Unidata
* See LICENSE for license information.
*/

package thredds.server.metadata;

public interface Integration { }
26 changes: 20 additions & 6 deletions tds-plugin/src/test/java/thredds/server/metadata/NcIsoIT.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2023-2025 University Corporation for Atmospheric Research/Unidata
* See LICENSE for license information.
*/

package thredds.server.metadata;

import static com.google.common.truth.Truth.assertThat;
Expand All @@ -13,6 +18,7 @@
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.utility.DockerImageName;
import org.testcontainers.utility.MountableFile;
Expand All @@ -27,6 +33,7 @@
import ucar.httpservices.HTTPMethod;
import ucar.httpservices.HTTPSession;

@Category(Integration.class)
public class NcIsoIT {
private static final DockerImageName dockerImageName =
DockerImageName.parse("unidata/thredds-docker:" + getTdsVersion());
Expand All @@ -39,14 +46,21 @@ public class NcIsoIT {
"/usr/local/tomcat/content/thredds/catalog.xml")
.withCopyFileToContainer(MountableFile.forClasspathResource("/thredds/testgrid1.nc"),
"/usr/local/tomcat/content/thredds/public/testdata/testgrid1.nc")
.withCopyFileToContainer(MountableFile.forHostPath(getJarPath()),
"/usr/local/tomcat/webapps/thredds/WEB-INF/lib/tds-plugin-jar-with-dependencies.jar");
// copy local tds-plugin jar
.withCopyFileToContainer(MountableFile.forHostPath(getJarPath("tds-plugin")),
"/usr/local/tomcat/webapps/thredds/WEB-INF/lib/1-tds-plugin.jar")
// make sure local nciso-common shows up before bundled nciso-common jar by
// prefixing it with 1-
.withCopyFileToContainer(MountableFile.forHostPath(getJarPath("../../nciso-common/target/nciso-common")),
"/usr/local/tomcat/webapps/thredds/WEB-INF/lib/1-nciso-common.jar");

@BeforeClass
public static void setUp() {
public static void setUp() throws IOException, InterruptedException {
final String address = tds.getHost();
final Integer port = tds.getFirstMappedPort();
basePath = "http://" + address + ":" + port + "/thredds/";
// remove bundled tds-plugin classes from the classpath
tds.execInContainer("rm", "-rf", "/usr/local/tomcat/webapps/thredds/WEB-INF/classes/thredds/server/metadata");
}

@Test
Expand Down Expand Up @@ -118,11 +132,11 @@ private static String getTdsVersion() {
return getPropertyValue("tds_version");
}

private static Path getJarPath() {
private static Path getJarPath(String name) {
try {
final Path targetPath = Paths.get(ClassLoader.getSystemClassLoader().getResource("").toURI()).getParent();
return Paths.get(targetPath.toString(), "tds-plugin-" + getVersion() + "-jar-with-dependencies.jar");
} catch (URISyntaxException e) {
return Paths.get(targetPath.toRealPath().toString(), name + "-" + getVersion() + ".jar");
} catch (URISyntaxException | IOException e) {
throw new RuntimeException(e);
}
}
Expand Down