Permalink
Browse files

maven fixes

tdsMonitor: keep same http session
  • Loading branch information...
1 parent ccbeae5 commit ae6a49c678892f3aa2e583666dc9cda96b9348a5 @JohnLCaron JohnLCaron committed Apr 11, 2012
View
@@ -95,7 +95,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skip>false</skip>
+ <skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
<includes>
<include>ucar/nc2/iosp/bufr/Test*.java</include>
View
@@ -38,7 +38,7 @@
<dependency>
<groupId>edu.ucar</groupId>
- <artifactId>visad</artifactId>
+ <artifactId>visadCdm</artifactId>
</dependency>
<dependency>
View
@@ -196,12 +196,12 @@
<name>Oracle Maven repository</name>
<url>http://download.oracle.com/maven</url>
</repository>
- <!-- Temporary repository for edu.wisc.visad -->
+ <!-- Temporary repository for edu.wisc.visad
<repository>
<id>geotoolkit</id>
<name>Geotoolkit binaries</name>
<url>http://maven.geotoolkit.org/</url>
- </repository>
+ </repository -->
</repositories>
<build>
@@ -227,7 +227,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skip>false</skip>
+ <skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
@@ -210,7 +210,7 @@ public boolean replaceMemberVariable( Variable newVar) {
for (int i = 0; i < members.size(); i++) {
Variable v = members.get(i);
if (v.getShortName() == null)
- System.out.println("BAD null short name");
+ System.out.println("BAD null short name"); // E:/work/ghansham/iasi_20110513_045057_metopa_23676_eps_o.l1_bufr
if (v.getShortName().equals( newVar.getShortName())) {
members.set( i, newVar);
found = true;
@@ -47,7 +47,7 @@
import java.io.*;
/**
- * Write StationObsDataset in Unidata Station Obs COnvention.
+ * Write StationObsDataset in Unidata Station Obs Convention.
*
* @author caron
* @version $Revision$ $Date$
@@ -46,7 +46,7 @@
import java.io.IOException;
/**
- * Write a CF "Discrete Sample" point file.
+ * Write a CF 1.6 "Discrete Sample" point file.
*
* @author caron
* @since Nov 23, 2010
@@ -0,0 +1,10 @@
+package ucar.nc2.ft.point;
+
+/**
+ * Describe
+ *
+ * @author caron
+ * @since 4/10/12
+ */
+public class TestPointWriter {
+}
@@ -105,7 +105,7 @@
<li>if the generating process type is 6 or 7 (error)</li>
<li>the GDS hashcode</li>
</ul>
-<p>The GRIB-2 variable names is:</p>
+<p>The GRIB-2 variable name is:</p>
<blockquote>
<pre>%paramName[_error][_%level][_layer][_%interval][_%statName][_%ensDerivedType][_probability_%probName]
View
@@ -111,7 +111,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skip>false</skip>
+ <skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
@@ -9,16 +9,13 @@
<sourceFolder url="file://$MODULE_DIR$/../../cdm/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../cdm-test/target/generated-sources/test-annotations" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/../../cdm-test/src/test/java" isTestSource="true" />
- <excludeFolder url="file://$MODULE_DIR$/../../cdm-test/target/classes" />
- <excludeFolder url="file://$MODULE_DIR$/../../cdm-test/target/test" />
- <excludeFolder url="file://$MODULE_DIR$/../../cdm-test/target/test-classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="netcdf" />
<orderEntry type="module" module-name="udunits" />
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
- <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+ <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.2" level="project" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.6.4" level="project" />
View
@@ -69,7 +69,7 @@
<dependency>
<groupId>edu.ucar</groupId>
- <artifactId>visad</artifactId>
+ <artifactId>visadCdm</artifactId>
</dependency>
<dependency>
View
@@ -120,7 +120,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skip>false</skip>
+ <skip>true</skip>
<testFailureIgnore>true</testFailureIgnore>
<includes>
<include>opendap/test/Test*.java</include>
View
@@ -252,11 +252,11 @@
<version>${org.slf4j.version}</version>
<scope>runtime</scope>
</dependency>
- <dependency> <!-- not needed? -->
+ <!-- dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging.version}</version>
- </dependency>
+ </dependency -->
<dependency>
<!-- jsoup HTML parser library @ http://jsoup.org/ -->
@@ -335,7 +335,7 @@
<dependency>
<groupId>edu.wisc</groupId>
<artifactId>visad</artifactId>
- <version>${edu.wisc.version}</version>
+ <version>${visad.version}</version>
</dependency>
<!-- UI -->
@@ -460,7 +460,7 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>visad</artifactId>
+ <artifactId>visadCdm</artifactId>
<version>${project.version}</version>
</dependency>
View
@@ -141,8 +141,12 @@
<artifactId>opendap</artifactId>
</dependency>
<dependency>
- <artifactId>visad</artifactId>
- <groupId>edu.wisc</groupId>
+ <groupId>edu.ucar</groupId>
+ <artifactId>udunits</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>edu.ucar</groupId>
+ <artifactId>visadCdm</artifactId>
<scope>runtime</scope>
</dependency>
@@ -194,6 +198,11 @@
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -356,6 +365,11 @@
<!-- version>2.1.1</version-->
<configuration>
<attachClasses>true</attachClasses>
+ <packagingExcludes>
+ WEB-INF/lib/commons-logging*.jar,
+ WEB-INF/lib/jdom-1.0.jar,
+ WEB-INF/lib/visad-*.jar
+ </packagingExcludes>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
@@ -58,7 +58,7 @@
/**
* CdmrFeature subsetting for station data.
- * thread safety: new object for each rquest
+ * thread safety: new object for each request
*
* @author caron
* @since Aug 19, 2009
@@ -10,11 +10,11 @@
<catalogRef xlink:href="idd/modelsNcep.xml" xlink:title="NCEP Model Data" name="" />
<catalogRef xlink:href="idd/modelsFnmoc.xml" xlink:title="FNMOC Model Data" name="" />
<catalogRef xlink:href="idd/modelsOther.xml" xlink:title="Other Model Data" name="" />
- <!-- catalogRef xlink:href="idd/fnmoc.xml" xlink:title="FNMOC Model Data" name="" />
+ <!-- catalogRef xlink:href="idd/fnmoc.xml" xlink:title="FNMOC Model Data" name="" / -->
<catalogRef xlink:href="idd/radars.xml" xlink:title="Radar Data" name="" />
<catalogRef xlink:href="idd/obsData.xml" xlink:title="Station Data" name="" />
<catalogRef xlink:href="idd/newPointObs.xml" xlink:title="Point Feature Collections" name="" />
- <catalogRef xlink:href="idd/satellite.xml" xlink:title="Satellite Data" name="" / -->
+ <catalogRef xlink:href="idd/satellite.xml" xlink:title="Satellite Data" name="" />
</dataset>
<!-- dataset name="Other Unidata Data">
<catalogRef xlink:href="idd/rtmodel.xml" xlink:title="Unidata Real-time Regional Model" name="" />
@@ -122,6 +122,7 @@ public SendRequestTask call() throws Exception {
total_expected_time.getAndAdd((long) log.msecs);
} catch (Throwable t) {
+ t.printStackTrace();
failed = true;
failMessage = t.getMessage();
}
@@ -134,7 +135,8 @@ void send() throws IOException {
HTTPMethod method = null;
try {
String unescapedForm = EscapeStrings.unescapeURL(log.path); // make sure its unescaped
- String urlencoded = server + URLnaming.escapeQuery(unescapedForm);
+ String urlencoded = server + unescapedForm;
+ // String urlencoded = server + URLnaming.escapeQuery(unescapedForm);
httpClient = new HTTPSession(urlencoded);
method = HTTPMethod.Get(httpClient); // escape the query part
//out2.format("send %s %n", method.getPath());
@@ -420,10 +422,10 @@ void sendRequests(String filename, int max) throws IOException {
continue;
}
- /* if (log.path.indexOf("dodsC") < 0) { // only dods
+ if (log.path.indexOf("/dts/") > 0) { // skip dts
skip++;
continue;
- } */
+ }
/* if (log.path.indexOf("fmrc") > 0) { // exclude fmrc
// System.out.println(" *** skip fmrc " + log);
View
@@ -40,7 +40,7 @@
</dependency>
<dependency>
<groupId>edu.ucar</groupId>
- <artifactId>visad</artifactId>
+ <artifactId>visadCdm</artifactId>
</dependency>
<dependency>
<groupId>com.sleepycat</groupId>
@@ -82,10 +82,10 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
</dependency>
- <dependency>
+ <!-- dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
- </dependency>
+ </dependency -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
@@ -128,6 +128,13 @@
<version>1.5</version>
<configuration>
<finalName>toolsUI</finalName>
+ <artifactSet>
+ <excludes>
+ <exclude>commons-logging:commons-logging</exclude>
+ <exclude>edu.wisc:visad</exclude>
+ </excludes>
+ </artifactSet>
+
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>ucar.nc2.ui.ToolsUI</mainClass>
@@ -33,7 +33,6 @@
package thredds.ui.monitor;
-import org.apache.commons.httpclient.auth.CredentialsProvider;
import ucar.nc2.util.net.HTTPException;
import ucar.nc2.util.net.HTTPSession;
import ucar.nc2.util.CancelTask;
@@ -62,13 +61,15 @@
private File localDir;
private JTextArea ta;
private CancelTask cancel;
+ private HTTPSession session;
TdsDownloader(JTextArea ta, ManageForm.Data config, Type type) throws IOException {
this.ta = ta;
this.config = config;
this.type = type;
HTTPSession.setGlobalUserAgent("TdsMonitor");
+ session = new HTTPSession(config.getServerPrefix());
localDir = LogLocalManager.getDirectory(config.server, type.toString());
if (!localDir.exists() && !localDir.mkdirs()) {
@@ -86,7 +87,7 @@ public void getRemoteFiles(final CancelTask _cancel) {
final String contents;
try {
- contents = HttpClientManager.getContentAsString(null, urls);
+ contents = HttpClientManager.getContentAsString(session, urls);
if ((contents == null) || (contents.length() == 0)) {
ta.append(String.format("Failed to get logs at URL = %s%n%n", urls));
return;
@@ -159,14 +160,14 @@ public void done() {
void read() throws HTTPException {
String urls = config.getServerPrefix() + "/thredds/admin/log/"+type+"/" + name;
ta.append(String.format(" reading %s to %s%n", urls, localFile.getPath()));
- HttpClientManager.copyUrlContentsToFile(null, urls, localFile);
+ HttpClientManager.copyUrlContentsToFile(session, urls, localFile);
}
void append() throws HTTPException {
String urls = config.getServerPrefix() + "/thredds/admin/log/"+type+"/" + name;
long start = localFile.length();
long want = size - start;
- long got = HttpClientManager.appendUrlContentsToFile(null, urls, localFile, start, size);
+ long got = HttpClientManager.appendUrlContentsToFile(session, urls, localFile, start, size);
if (want == got)
ta.append(String.format(" append %d bytes to %s %n", got, localFile.getPath()));
else
View
@@ -11,7 +11,7 @@
</parent>
<!-- groupId>edu.ucar</groupId -->
- <artifactId>visad</artifactId>
+ <artifactId>visadCdm</artifactId>
<packaging>jar</packaging>
<name>VisAD-based IOSPs</name>
<description>
@@ -53,8 +53,42 @@
</dependencies>
<build>
- <finalName>visadCdm</finalName>
+ <!-- finalName>visadCdm</finalName -->
<!--testSourceDirectory>void</testSourceDirectory-->
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <minimizeJar>true</minimizeJar>
+ <artifactSet>
+ <includes>
+ <include>edu.wisc:visad</include>
+ </includes>
+ </artifactSet>
+
+ <!-- filters>
+ <filter>
+ <artifact>edu.wisc:visad</artifact>
+ <! excludes>
+ <exclude>org/junit/experimental/**</exclude>
+ <exclude>org/junit/runners/**</exclude>
+ </excludes>
+ </filter>
+ </filters -->
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>

0 comments on commit ae6a49c

Please sign in to comment.