Skip to content

Commit 70341df

Browse files
nathanmittlerejona86
authored andcommitted
Fixing Maven build for gRPC Java.
------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81456318
1 parent 56e307f commit 70341df

4 files changed

Lines changed: 46 additions & 10 deletions

File tree

all/pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,24 @@
213213
<locale>en_US</locale>
214214
</configuration>
215215
</plugin>
216+
217+
<!-- Skip the sniffer plugin. -->
218+
<plugin>
219+
<groupId>org.codehaus.mojo</groupId>
220+
<artifactId>animal-sniffer-maven-plugin</artifactId>
221+
<executions>
222+
<execution>
223+
<id>check-java-version</id>
224+
<phase>verify</phase>
225+
<goals>
226+
<goal>check</goal>
227+
</goals>
228+
<configuration>
229+
<skip>true</skip>
230+
</configuration>
231+
</execution>
232+
</executions>
233+
</plugin>
216234
</plugins>
217235
</build>
218236
</project>

integration-testing/src/main/java/com/google/net/stubby/testing/integration/AbstractTransportTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -487,8 +487,8 @@ public void exchangeContextUnaryCall() throws Exception {
487487
fixedHeaders.put(METADATA_KEY, contextValue);
488488
stub = MetadataUtils.attachHeaders(stub, fixedHeaders);
489489
// .. and expect it to be echoed back in trailers
490-
AtomicReference<Metadata.Trailers> trailersCapture = new AtomicReference<>();
491-
AtomicReference<Metadata.Headers> headersCapture = new AtomicReference<>();
490+
AtomicReference<Metadata.Trailers> trailersCapture = new AtomicReference<Metadata.Trailers>();
491+
AtomicReference<Metadata.Headers> headersCapture = new AtomicReference<Metadata.Headers>();
492492
stub = MetadataUtils.captureMetadata(stub, headersCapture, trailersCapture);
493493

494494
Assert.assertNotNull(stub.unaryCall(unaryRequest()));
@@ -513,8 +513,8 @@ public void exchangeContextStreamingCall() throws Exception {
513513
fixedHeaders.put(METADATA_KEY, contextValue);
514514
stub = MetadataUtils.attachHeaders(stub, fixedHeaders);
515515
// .. and expect it to be echoed back in trailers
516-
AtomicReference<Metadata.Trailers> trailersCapture = new AtomicReference<>();
517-
AtomicReference<Metadata.Headers> headersCapture = new AtomicReference<>();
516+
AtomicReference<Metadata.Trailers> trailersCapture = new AtomicReference<Metadata.Trailers>();
517+
AtomicReference<Metadata.Headers> headersCapture = new AtomicReference<Metadata.Headers>();
518518
stub = MetadataUtils.captureMetadata(stub, headersCapture, trailersCapture);
519519

520520
List<Integer> responseSizes = Arrays.asList(50, 100, 150, 200);
@@ -564,7 +564,7 @@ protected SimpleRequest unaryRequest() {
564564

565565
protected static void assertSuccess(StreamRecorder<?> recorder) {
566566
if (recorder.getError() != null) {
567-
throw new AssertionError("Error in stream", recorder.getError());
567+
throw new AssertionError(recorder.getError());
568568
}
569569
}
570570
}

integration-testing/src/main/java/com/google/net/stubby/testing/integration/Util.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,7 @@ public static void assertEquals(List<? extends MessageLite> expected,
8686
Assert.assertEquals(expected, actual);
8787
} else {
8888
for (int i = 0; i < expected.size(); i++) {
89-
try {
90-
assertEquals(expected.get(i), actual.get(i));
91-
} catch (Error e) {
92-
throw new AssertionError("At index " + i, e);
93-
}
89+
assertEquals(expected.get(i), actual.get(i));
9490
}
9591
}
9692
}

netty/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,26 @@
5252
<scope>test</scope>
5353
</dependency>
5454
</dependencies>
55+
56+
<build>
57+
<plugins>
58+
<!-- Skip the sniffer plugin for Netty. -->
59+
<plugin>
60+
<groupId>org.codehaus.mojo</groupId>
61+
<artifactId>animal-sniffer-maven-plugin</artifactId>
62+
<executions>
63+
<execution>
64+
<id>check-java-version</id>
65+
<phase>verify</phase>
66+
<goals>
67+
<goal>check</goal>
68+
</goals>
69+
<configuration>
70+
<skip>true</skip>
71+
</configuration>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
</plugins>
76+
</build>
5577
</project>

0 commit comments

Comments
 (0)