Skip to content

Commit

Permalink
Fix build errors caused by dependency updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
dzlier committed Mar 26, 2018
1 parent c881816 commit 51ae203
Show file tree
Hide file tree
Showing 9 changed files with 131 additions and 45 deletions.
1 change: 0 additions & 1 deletion .kokoro/presubmit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/java-docs-samples/.kokoro/tests/diff_tests.sh"
}

4 changes: 2 additions & 2 deletions appengine-java8/bigtable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ limitations under the License.
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<bigtable.projectID>YOUR_PROJECT_ID</bigtable.projectID>
<bigtable.instanceID>YOUR_INSTANCE_ID</bigtable.instanceID>
<bigtable.projectID>java-docs-samples-testing</bigtable.projectID>
<bigtable.instanceID>instance</bigtable.instanceID>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>

Expand Down
89 changes: 89 additions & 0 deletions appengine/datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,93 @@
<module>indexes-perfect</module>
</modules>

<dependencies>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>1.5.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId> <!-- @Nullable annotations -->
<version>3.0.2</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>

<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.63</version>
</dependency>

<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>1.9.59</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>1.9.59</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-tools-sdk</artifactId>
<version>1.9.59</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.37</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<!-- Parent POM defines ${appengine.sdk.version} (updates frequently). -->
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.9.59</version>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@
import com.google.containeranalysis.v1alpha1.Occurrence;
import com.google.containeranalysis.v1alpha1.VulnerabilityType;
import com.google.containeranalysis.v1alpha1.VulnerabilityType.VulnerabilityDetails;
import com.google.pubsub.v1.PubsubMessage;
import com.google.pubsub.v1.PushConfig;
import com.google.pubsub.v1.Subscription;
import com.google.pubsub.v1.SubscriptionName;
import com.google.pubsub.v1.TopicName;
import com.google.pubsub.v1.*;

/**
* API usage samples
Expand Down Expand Up @@ -292,7 +288,7 @@ public static int pubSub(String subscriptionId, int timeout, String projectId) t

try {
// subscribe to the requested pubsub channel
SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(projectId, subscriptionId);
subscriber = Subscriber.newBuilder(subscriptionName, receiver).build();
subscriber.startAsync().awaitRunning();
// listen to messages for 'listenTimeout' seconds
Expand Down Expand Up @@ -339,8 +335,8 @@ public static Subscription createOccurrenceSubscription(String subscriptionId, S
String topicId = "resource-notes-occurrences-v1alpha1";
try (SubscriptionAdminClient client = SubscriptionAdminClient.create()) {
PushConfig config = PushConfig.getDefaultInstance();
TopicName topicName = TopicName.of(projectId, topicId);
SubscriptionName subscriptionName = SubscriptionName.of(projectId, subscriptionId);
ProjectTopicName topicName = ProjectTopicName.of(projectId, topicId);
ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(projectId, subscriptionId);
Subscription sub = client.createSubscription(subscriptionName, topicName, config, 0);
return sub;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.google.containeranalysis.v1alpha1.Note;
import com.google.containeranalysis.v1alpha1.Occurrence;
import com.google.containeranalysis.v1alpha1.VulnerabilityType.VulnerabilityDetails;
import com.google.pubsub.v1.SubscriptionName;
import com.google.pubsub.v1.ProjectSubscriptionName;
import java.util.Date;
import org.junit.After;
import org.junit.Before;
Expand Down Expand Up @@ -194,7 +194,7 @@ public void testPubSub() throws Exception {
int newCount;
int tries;
String subscriptionId = "drydockOccurrences";
SubscriptionName subscriptionName = SubscriptionName.of(PROJECT_ID, subscriptionId);
ProjectSubscriptionName subscriptionName = ProjectSubscriptionName.of(PROJECT_ID, subscriptionId);

Samples.createOccurrenceSubscription(subscriptionId, PROJECT_ID);
Subscriber subscriber = null;
Expand Down
4 changes: 4 additions & 0 deletions dataflow/spanner-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-common-protos</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static void main(String[] args) throws Exception {

// Google Cloud Platform Project ID
String projectId = (args.length > 0) ? args[0] : ServiceOptions.getDefaultProjectId();
ProjectName projectName = ProjectName.create(projectId);
ProjectName projectName = ProjectName.of(projectId);

// Instantiate an Error Reporting Client
try (ReportErrorsServiceClient reportErrorsServiceClient = ReportErrorsServiceClient.create()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void main(String... args) throws Exception {
List<Point> pointList = new ArrayList<>();
pointList.add(point);

ProjectName name = ProjectName.create(projectId);
ProjectName name = ProjectName.of(projectId);

// Prepares the metric descriptor
Map<String, String> metricLabels = new HashMap<String, String>();
Expand Down Expand Up @@ -93,7 +93,7 @@ public static void main(String... args) throws Exception {
timeSeriesList.add(timeSeries);

CreateTimeSeriesRequest request = CreateTimeSeriesRequest.newBuilder()
.setNameWithProjectName(name)
.setName(name.toString())
.addAllTimeSeries(timeSeriesList)
.build();

Expand Down
Loading

0 comments on commit 51ae203

Please sign in to comment.