Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jar with dependencies and get resource as a stream #62

Merged
merged 4 commits into from
Oct 20, 2023
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
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven-assembly-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -165,7 +170,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.versoin}</version>
<version>${maven-shade-plugin.version}</version>
</plugin>
</plugins>
<resources>
Expand All @@ -187,11 +192,12 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!-- Plugins versions -->
<maven-shade-plugin.versoin>3.2.4</maven-shade-plugin.versoin>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
<maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
</properties>
</project>
20 changes: 19 additions & 1 deletion tds-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,24 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public abstract class AbstractMetadataController implements ServletContextAware,
protected String _servletPath = "";

protected ServletContext sc;
protected File xslFile;

public void setServletContext(ServletContext sc) {
this.sc = sc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
@RequestMapping("/iso/")
public class IsoController extends AbstractMetadataController {
private static org.slf4j.Logger _log = org.slf4j.LoggerFactory.getLogger(IsoController.class);
private static final String xslFile = "nciso/UnidataDD2MI.xsl";

@Autowired
private AllowedServices as;
Expand All @@ -82,8 +83,6 @@ public void init(ContextRefreshedEvent event) throws ServletException {
_servletPath = "/iso";
_logServerStartup.info("Metadata ISO - initialization start");
_logServerStartup.info("NCISO.isoAllow = " + _allow);
String ncIsoXslFilePath = super.sc.getRealPath("/WEB-INF/classes/resources/xsl/nciso") + "/UnidataDD2MI.xsl";
xslFile = new File(ncIsoXslFilePath);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import org.xml.sax.InputSource;
import thredds.client.catalog.Dataset;

import thredds.core.AllowedServices;
Expand All @@ -67,6 +68,7 @@
public class UddcController extends AbstractMetadataController {
private static org.slf4j.Logger _log = org.slf4j.LoggerFactory
.getLogger(UddcController.class);
private static final String xslFile = "nciso/UnidataDDCount-HTML.xsl";


@Autowired
Expand All @@ -84,8 +86,6 @@ public void init(ContextRefreshedEvent event) throws ServletException {
_servletPath ="/uddc";
_logServerStartup.info("Metadata UDDC - initialization start");
_logServerStartup.info("NCISO.uddcAllow = " + _allow);
String ncIsoXslFilePath = super.sc.getRealPath("/WEB-INF/classes/resources/xsl/nciso") + "/UnidataDDCount-HTML.xsl";
xslFile = new File(ncIsoXslFilePath);
}
}

Expand Down
Loading