Skip to content

Commit 6380360

Browse files
committed
Feature/dependency upgrades (#326)
Dump low risk dependencies * maven plugins * aws, commons, guava, jopt, gson, etc. Also gives new test environment a work out
1 parent e47b250 commit 6380360

File tree

34 files changed

+376
-377
lines changed

34 files changed

+376
-377
lines changed

.travis.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ cache:
1111
services:
1212
- docker
1313

14-
# encryption used for documentation key
14+
# encryption used for documentation key, pull containers before since Docker Hub can timeout and it should not break a long build
1515
before_install:
16-
- docker pull seqware/seqware_test_environment:1.2
17-
- openssl aes-256-cbc -K $encrypted_b1a0a7dd1d17_key -iv $encrypted_b1a0a7dd1d17_iv -in seqware_jenkins.id_rsa.enc -out seqware_jenkins.id_rsa -d
16+
- sudo rm /etc/mavenrc
17+
- echo "MAVEN_OPTS='-Xmx4g -XX:MaxPermSize=1024m'" > ~/.mavenrc
18+
- docker pull quay.io/seqware/seqware_test_environment:1.3
19+
#- docker pull seqware/documentation_builder:1.3
20+
#- openssl aes-256-cbc -K $encrypted_b1a0a7dd1d17_key -iv $encrypted_b1a0a7dd1d17_iv -in seqware_jenkins.id_rsa.enc -out seqware_jenkins.id_rsa -d
1821

1922
script:
20-
- docker run -h master -ti --rm -v $HOME/.m2:/home/seqware/.m2 -v $TRAVIS_BUILD_DIR:/home/seqware/gitroot/seqware seqware/seqware_test_environment:1.2 /test-start.sh "cd /home/seqware && sudo chown -R seqware:seqware . && cd /home/seqware/gitroot/seqware && cp .travis/settings ~/.seqware && export MAVEN_OPTS=\"-Xmx2048m -XX:MaxPermSize=1024m\" && mvn -B clean install -DskipITs=false && cp seqware-pipeline/target/seqware ~/bin && mvn -B clean install -pl seqware-ext-testing -DskipITs=false -P 'extITs,embeddedTomcat'"
23+
- docker run -h master -ti --rm -v $HOME/.m2:/home/seqware/.m2 -v $TRAVIS_BUILD_DIR:/home/seqware/gitroot/seqware quay.io/seqware/seqware_test_environment:1.3 /test-start.sh "cd /home/seqware && sudo chown -R seqware:seqware . && cd /home/seqware/gitroot/seqware && cp .travis/settings ~/.seqware && export MAVEN_OPTS=\"-Xmx4096m -XX:MaxPermSize=1024m\" && mvn -B clean install -DskipITs=false && cp seqware-pipeline/target/seqware ~/bin && mvn -B clean install -pl seqware-ext-testing -DskipITs=false -P 'extITs,embeddedTomcat'"
2124

22-
after_success:
23-
- docker pull seqware/documentation_builder:1.2
24-
- docker run -v $TRAVIS_BUILD_DIR/seqware_jenkins.id_rsa:/root/.ssh/private_key.pem seqware/documentation_builder:1.2 sh -c 'chown -R root $TRAVIS_BUILD_DIR && chown root /root/.ssh/private_key.pem && chmod -R 600 /root/.ssh/private_key.pem && eval `ssh-agent -s` && ssh-add /root/.ssh/private_key.pem && locale && export LC_ALL="en_US.UTF-8" && export LANG="en_US.UTF-8" && locale && mvn site-deploy'
25+
#after_success:
26+
#- docker run -v $HOME/.m2:/root/.m2 -v $TRAVIS_BUILD_DIR/seqware_jenkins.id_rsa:/root/.ssh/private_key.pem seqware/documentation_builder:1.3 sh -c 'chown -R root . && chown root /root/.ssh/private_key.pem && chmod -R 600 /root/.ssh/private_key.pem && eval `ssh-agent -s` && ssh-add /root/.ssh/private_key.pem && locale && export LC_ALL="en_US.UTF-8" && export LANG="en_US.UTF-8" && locale && export MAVEN_OPTS=\"-Xmx4096m -XX:MaxPermSize=1024m\" && mvn site-deploy'
2527

2628
# sudo required for docker based testing
2729
sudo: required

pom.xml

+83-123
Large diffs are not rendered by default.

seqware-admin-webservice/pom.xml

+10-3
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,14 @@
129129

130130
<build>
131131
<plugins>
132+
<plugin>
133+
<groupId>org.apache.maven.plugins</groupId>
134+
<artifactId>maven-checkstyle-plugin</artifactId>
135+
<configuration>
136+
<!-- generated code -->
137+
<skip>true</skip>
138+
</configuration>
139+
</plugin>
132140
<plugin>
133141
<groupId>org.glassfish.embedded</groupId>
134142
<artifactId>maven-embedded-glassfish-plugin</artifactId>
@@ -140,7 +148,7 @@
140148
<dbVendorName>postgresql</dbVendorName>
141149
<libraries>${project.build.directory}/lib/postgresql-${postgresql.version}.jar</libraries>
142150
<autoDelete>true</autoDelete>
143-
<goalPrefix>embedded-glassfish</goalPrefix>
151+
<!-- <goalPrefix>embedded-glassfish</goalPrefix> -->
144152
</configuration>
145153
</plugin>
146154
<plugin>
@@ -168,7 +176,6 @@
168176
<plugin>
169177
<groupId>org.apache.maven.plugins</groupId>
170178
<artifactId>maven-compiler-plugin</artifactId>
171-
<version>2.3.2</version>
172179
<configuration>
173180
<source>1.7</source>
174181
<target>1.7</target>
@@ -268,7 +275,7 @@
268275
</executions>
269276

270277
<configuration>
271-
<argLine>${argLine} -Xms512m -Xmx512m</argLine>
278+
<!-- <argLine>${argLine} -Xms512m -Xmx512m</argLine> -->
272279
<forkMode>pertest</forkMode>
273280
</configuration>
274281
</plugin>

seqware-archetypes/seqware-archetype-decider/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
<plugins>
3434
<plugin>
3535
<artifactId>maven-archetype-plugin</artifactId>
36-
<version>2.2</version>
36+
<version>2.4</version>
3737
</plugin>
3838

3939
<plugin>
4040
<groupId>org.apache.maven.plugins</groupId>
4141
<artifactId>maven-resources-plugin</artifactId>
42-
<version>2.6</version>
42+
<version>2.7</version>
4343
<configuration>
4444
<includeEmptyDirs>true</includeEmptyDirs>
4545
</configuration>

seqware-archetypes/seqware-archetype-java-workflow/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
<plugins>
3434
<plugin>
3535
<artifactId>maven-archetype-plugin</artifactId>
36-
<version>2.2</version>
36+
<version>2.4</version>
3737
</plugin>
3838

3939
<plugin>
4040
<groupId>org.apache.maven.plugins</groupId>
4141
<artifactId>maven-resources-plugin</artifactId>
42-
<version>2.6</version>
42+
<version>2.7</version>
4343
<configuration>
4444
<includeEmptyDirs>true</includeEmptyDirs>
4545
</configuration>

seqware-archetypes/seqware-archetype-module/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<plugins>
2929
<plugin>
3030
<artifactId>maven-archetype-plugin</artifactId>
31-
<version>2.2</version>
31+
<version>2.4</version>
3232
</plugin>
3333
</plugins>
3434
</pluginManagement>

seqware-distribution/pom.xml

-9
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@
2020

2121
<build>
2222
<plugins>
23-
24-
<plugin>
25-
<groupId>org.jacoco</groupId>
26-
<artifactId>jacoco-maven-plugin</artifactId>
27-
<configuration>
28-
<skip>true</skip>
29-
</configuration>
30-
</plugin>
3123
<plugin>
3224
<groupId>org.codehaus.mojo</groupId>
3325
<artifactId>exec-maven-plugin</artifactId>
34-
<version>1.2.1</version>
3526
<executions>
3627
<execution>
3728
<id>generate_markdown</id>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../findbugs-exclude.xml

seqware-ext-admin-testing/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
<port>38080</port>
117117
<dbVendorName>postgresql</dbVendorName>
118118
<libraries>${project.parent.basedir}/seqware-admin-webservice/target/lib/postgresql-${postgresql.version}.jar</libraries>
119-
<goalPrefix>embedded-glassfish</goalPrefix>
119+
<!-- <goalPrefix>embedded-glassfish</goalPrefix> -->
120120
</configuration>
121121
<executions>
122122
<execution>

seqware-ext-admin-testing/src/main/java/net/sourceforge/seqware/pipeline/plugins/ITUtility.java

+9-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
package net.sourceforge.seqware.pipeline.plugins;
1818

1919
import com.google.common.io.Files;
20-
import java.io.File;
21-
import java.io.IOException;
22-
import java.util.Map;
23-
import java.util.regex.Matcher;
24-
import java.util.regex.Pattern;
2520
import joptsimple.OptionParser;
2621
import joptsimple.OptionSet;
2722
import net.sourceforge.seqware.common.util.Log;
@@ -31,7 +26,12 @@
3126
import org.apache.commons.exec.ExecuteException;
3227
import org.apache.commons.exec.PumpStreamHandler;
3328
import org.apache.commons.io.output.ByteArrayOutputStream;
34-
import org.junit.Assert;
29+
30+
import java.io.File;
31+
import java.io.IOException;
32+
import java.util.Map;
33+
import java.util.regex.Matcher;
34+
import java.util.regex.Pattern;
3535

3636
/**
3737
*
@@ -180,8 +180,9 @@ public static String runArbitraryCommand(String line, int expectedReturnValue, F
180180
exec.setExitValue(expectedReturnValue);
181181
try {
182182
int exitValue = exec.execute(commandline, environment);
183-
Assert.assertTrue("exit value for full jar with no params should be " + expectedReturnValue + " was " + exitValue,
184-
exitValue == expectedReturnValue);
183+
if (exitValue != expectedReturnValue){
184+
throw new RuntimeException("exit value for full jar with no params should be " + expectedReturnValue + " was " + exitValue);
185+
}
185186
String output = outputStream.toString();
186187
return output;
187188
} catch (ExecuteException e) {

seqware-ext-testing/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@
149149
<dependency>
150150
<groupId>com.github.stefanbirkner</groupId>
151151
<artifactId>system-rules</artifactId>
152-
<version>1.8.0</version>
153152
</dependency>
154153
</dependencies>
155154

@@ -245,6 +244,7 @@
245244
<plugin>
246245
<groupId>org.apache.tomcat.maven</groupId>
247246
<artifactId>tomcat7-maven-plugin</artifactId>
247+
<version>2.2</version>
248248
<configuration>
249249
<useNaming>true</useNaming>
250250
<contextFile>../seqware-webservice/target/seqware-webservice-${project.version}/META-INF/context.xml</contextFile>

seqware-ext-testing/src/test/java/net/sourceforge/seqware/pipeline/plugins/GenericMetadataSaverET.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717
package net.sourceforge.seqware.pipeline.plugins;
1818

1919
import com.google.common.io.Files;
20-
import java.io.File;
21-
import java.io.IOException;
22-
import java.util.Random;
2320
import net.sourceforge.seqware.common.module.ReturnValue;
2421
import net.sourceforge.seqware.common.util.Log;
2522
import org.apache.commons.io.FileUtils;
2623
import org.junit.BeforeClass;
2724
import org.junit.Test;
2825

26+
import java.io.File;
27+
import java.io.IOException;
28+
import java.nio.charset.StandardCharsets;
29+
import java.util.Random;
30+
2931
/**
3032
* These tests support command-line tools found in the SeqWare User Tutorial, in this case, GenericMetadataSaver
3133
*
@@ -53,7 +55,7 @@ public String saveGenericMetadataFileForSample(String sampleAccession, boolean c
5355
// create a random new file and check that the file we want to save metadata about exists
5456
File inputFile = File.createTempFile("input", "out");
5557
final String content = "This is a funky funky test file";
56-
FileUtils.write(inputFile, content);
58+
FileUtils.write(inputFile, content, StandardCharsets.UTF_8);
5759

5860
Random generator = new Random();
5961
String random = String.valueOf(generator.nextInt());

seqware-ext-testing/src/test/java/net/sourceforge/seqware/pipeline/plugins/WorkflowRunReporterET.java

+11-9
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,19 @@
1717
package net.sourceforge.seqware.pipeline.plugins;
1818

1919
import com.google.common.io.Files;
20-
import java.io.File;
21-
import java.io.IOException;
22-
import java.util.List;
23-
import java.util.UUID;
2420
import net.sourceforge.seqware.common.module.ReturnValue;
2521
import net.sourceforge.seqware.common.util.Log;
2622
import org.apache.commons.io.FileUtils;
2723
import org.junit.Assert;
2824
import org.junit.BeforeClass;
2925
import org.junit.Test;
3026

27+
import java.io.File;
28+
import java.io.IOException;
29+
import java.nio.charset.StandardCharsets;
30+
import java.util.List;
31+
import java.util.UUID;
32+
3133
/**
3234
* These tests support command-line tools found in the SeqWare User Tutorial, in this case, WorkflowRunReporter
3335
*
@@ -51,7 +53,7 @@ public void runWorkflowRunReporter() throws IOException {
5153
Log.info(listOutput);
5254
File retrievedFile = new File(createTempDir, testOutFile.getName());
5355
Assert.assertTrue("output file does not exist", retrievedFile.exists());
54-
List<String> readLines = FileUtils.readLines(testOutFile);
56+
List<String> readLines = FileUtils.readLines(testOutFile, StandardCharsets.UTF_8);
5557
Assert.assertTrue("incorrect number of lines", readLines.size() == 2);
5658
long checksumCRC32 = FileUtils.checksumCRC32(testOutFile);
5759
Assert.assertTrue("incorrect output checksum" + checksumCRC32, checksumCRC32 == 255117433L);
@@ -85,11 +87,11 @@ public void runFirstDate() throws IOException {
8587
Log.info(listOutput);
8688
File retrievedFile = new File(createTempDir, testOutFile.getName());
8789
Assert.assertTrue("output file does not exist", retrievedFile.exists());
88-
List<String> readLines = FileUtils.readLines(testOutFile);
90+
List<String> readLines = FileUtils.readLines(testOutFile,StandardCharsets.UTF_8);
8991
Assert.assertTrue("incorrect number of lines ", readLines.size() == 7);
9092
long checksumCRC32 = FileUtils.checksumCRC32(testOutFile);
9193
// former is for Java 7, latter is for Java 8, Looks like we didn't solve the sorting problem
92-
Assert.assertTrue("incorrect output checksum " + checksumCRC32 + " " + FileUtils.readFileToString(retrievedFile),
94+
Assert.assertTrue("incorrect output checksum " + checksumCRC32 + " " + FileUtils.readFileToString(retrievedFile,StandardCharsets.UTF_8),
9395
checksumCRC32 == 3873030870L || checksumCRC32 == 2196935470L || checksumCRC32 == 3273287955L);
9496
}
9597

@@ -104,11 +106,11 @@ public void runBothDates() throws IOException {
104106
Log.info(listOutput);
105107
File retrievedFile = new File(createTempDir, testOutFile.getName());
106108
Assert.assertTrue("output file does not exist", retrievedFile.exists());
107-
List<String> readLines = FileUtils.readLines(testOutFile);
109+
List<String> readLines = FileUtils.readLines(testOutFile,StandardCharsets.UTF_8);
108110
Assert.assertTrue("incorrect number of lines ", readLines.size() == 4);
109111
long checksumCRC32 = FileUtils.checksumCRC32(testOutFile);
110112
// former is for Java 7, latter is for Java 8, Looks like we didn't solve the sorting problem
111-
Assert.assertTrue("incorrect output checksum " + checksumCRC32 + " " + FileUtils.readFileToString(retrievedFile),
113+
Assert.assertTrue("incorrect output checksum " + checksumCRC32 + " " + FileUtils.readFileToString(retrievedFile,StandardCharsets.UTF_8),
112114
checksumCRC32 == 562223107L || checksumCRC32 == 4072825873L);
113115
}
114116

seqware-ext-testing/src/test/java/net/sourceforge/seqware/pipeline/tutorial/DeveloperPhase1.java

+7-5
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
*/
1717
package net.sourceforge.seqware.pipeline.tutorial;
1818

19-
import java.io.File;
20-
import java.io.IOException;
21-
import java.util.ArrayList;
22-
import java.util.List;
2319
import net.sourceforge.seqware.common.util.Log;
2420
import net.sourceforge.seqware.pipeline.plugins.ITUtility;
2521
import net.sourceforge.seqware.pipeline.plugins.PluginRunnerET;
@@ -29,6 +25,12 @@
2925
import org.junit.BeforeClass;
3026
import org.junit.Test;
3127

28+
import java.io.File;
29+
import java.io.IOException;
30+
import java.nio.charset.StandardCharsets;
31+
import java.util.ArrayList;
32+
import java.util.List;
33+
3234
/**
3335
* Build and install a bundle, used by both the User tutorial and the Developer tutorial
3436
*
@@ -94,7 +96,7 @@ public static File findTargetBundleDir(File projectDir) {
9496
@Test
9597
public void testModifyingTheWorkflow() throws IOException {
9698
Log.info("Editing java client at " + JavaClient.getAbsolutePath());
97-
List<String> readLines = FileUtils.readLines(JavaClient);
99+
List<String> readLines = FileUtils.readLines(JavaClient, StandardCharsets.UTF_8);
98100
// edit lines to match tutorial changes
99101
boolean linesAdded = false;
100102
for (int i = 0; i < readLines.size(); i++) {

seqware-ext-testing/src/test/java/net/sourceforge/seqware/pipeline/tutorial/UserPhase6.java

+6-4
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
package net.sourceforge.seqware.pipeline.tutorial;
1818

1919
import com.google.common.io.Files;
20-
import java.io.File;
21-
import java.io.IOException;
22-
import java.util.Collection;
2320
import net.sourceforge.seqware.common.module.ReturnValue;
2421
import net.sourceforge.seqware.pipeline.plugins.ITUtility;
2522
import net.sourceforge.seqware.pipeline.plugins.PluginRunnerET;
@@ -29,6 +26,11 @@
2926
import org.junit.Assert;
3027
import org.junit.Test;
3128

29+
import java.io.File;
30+
import java.io.IOException;
31+
import java.nio.charset.StandardCharsets;
32+
import java.util.Collection;
33+
3234
/**
3335
* Tests downloading results in the tutorial
3436
*
@@ -95,7 +97,7 @@ private String monitorAndReturnWorkflowRun() throws IOException {
9597
// check that we have at least one run in the output
9698
boolean runFound = false;
9799
String workflowRunSWID = null;
98-
for (String line : FileUtils.readLines(foundFile)) {
100+
for (String line : FileUtils.readLines(foundFile, StandardCharsets.UTF_8)) {
99101
if (line.contains("seqwarearchetypejavaworkflow")) {
100102
runFound = true;
101103
String[] parts = line.split("\t");

seqware-pipeline/pom.xml

+3-4
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
<dependency>
124124
<groupId>org.mockito</groupId>
125125
<artifactId>mockito-core</artifactId>
126-
<version>1.10.5</version>
127126
<scope>test</scope>
128127
<exclusions>
129128
<exclusion>
@@ -135,13 +134,13 @@
135134
<dependency>
136135
<groupId>org.powermock</groupId>
137136
<artifactId>powermock-module-junit4</artifactId>
138-
<version>1.5.6</version>
137+
<version>${powermock.version}</version>
139138
<scope>test</scope>
140139
</dependency>
141140
<dependency>
142141
<groupId>org.powermock</groupId>
143142
<artifactId>powermock-api-mockito</artifactId>
144-
<version>1.5.6</version>
143+
<version>${powermock.version}</version>
145144
<scope>test</scope>
146145
</dependency>
147146
<dependency>
@@ -342,7 +341,7 @@
342341
<artifactId>powermock-core</artifactId>
343342
<groupId>org.powermock</groupId>
344343
<type>jar</type>
345-
<version>1.5.6</version>
344+
<version>${powermock.version}</version>
346345
<scope>test</scope>
347346
<exclusions>
348347
<exclusion>

0 commit comments

Comments
 (0)