Skip to content

Commit 833ec9d

Browse files
author
Ace Nassri
authored
GCF file split (munge): imagemagick (GoogleCloudPlatform#2664)
1 parent effb326 commit 833ec9d

File tree

6 files changed

+12
-98
lines changed

6 files changed

+12
-98
lines changed

functions/imagemagick/pom.xml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<modelVersion>4.0.0</modelVersion>
2323

2424
<groupId>com.example.cloud.functions</groupId>
25-
<artifactId>functions-snippets-imagemagick</artifactId>
25+
<artifactId>functions-imagemagick</artifactId>
2626

2727
<parent>
2828
<groupId>com.google.cloud.samples</groupId>
@@ -31,7 +31,6 @@
3131
</parent>
3232

3333
<properties>
34-
<powermock.version>2.0.7</powermock.version>
3534
<maven.compiler.target>11</maven.compiler.target>
3635
<maven.compiler.source>11</maven.compiler.source>
3736
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -58,14 +57,6 @@
5857
<groupId>com.google.cloud</groupId>
5958
<artifactId>google-cloud-vision</artifactId>
6059
</dependency>
61-
<dependency>
62-
<groupId>com.google.cloud</groupId>
63-
<artifactId>google-cloud-translate</artifactId>
64-
</dependency>
65-
<dependency>
66-
<groupId>com.google.cloud</groupId>
67-
<artifactId>google-cloud-pubsub</artifactId>
68-
</dependency>
6960

7061
<!-- Required for Function primitives -->
7162
<dependency>
@@ -91,24 +82,6 @@
9182
<version>29.0-jre</version>
9283
<scope>test</scope>
9384
</dependency>
94-
<dependency>
95-
<groupId>org.powermock</groupId>
96-
<artifactId>powermock-core</artifactId>
97-
<version>${powermock.version}</version>
98-
<scope>test</scope>
99-
</dependency>
100-
<dependency>
101-
<groupId>org.powermock</groupId>
102-
<artifactId>powermock-module-junit4</artifactId>
103-
<version>${powermock.version}</version>
104-
<scope>test</scope>
105-
</dependency>
106-
<dependency>
107-
<groupId>org.powermock</groupId>
108-
<artifactId>powermock-api-mockito2</artifactId>
109-
<version>${powermock.version}</version>
110-
<scope>test</scope>
111-
</dependency>
11285
</dependencies>
11386

11487
<!-- Disable tests during GCF builds (from parent POM) -->
@@ -144,6 +117,9 @@
144117
<groupId>com.google.cloud.functions</groupId>
145118
<artifactId>function-maven-plugin</artifactId>
146119
<version>0.9.1</version>
120+
<configuration>
121+
<functionTarget>functions.ImageMagick</functionTarget>
122+
</configuration>
147123
</plugin>
148124
<plugin>
149125
<groupId>org.apache.maven.plugins</groupId>

functions/imagemagick/src/main/java/com/example/functions/imagemagick/eventpojos/PubSubMessage.java

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.functions.imagemagick;
17+
package functions;
1818

1919
// [START functions_imagemagick_setup]
20-
import com.example.functions.imagemagick.eventpojos.GcsEvent;
20+
2121
import com.google.cloud.functions.BackgroundFunction;
2222
import com.google.cloud.functions.Context;
2323
import com.google.cloud.storage.Blob;
@@ -34,6 +34,7 @@
3434
import com.google.cloud.vision.v1.ImageAnnotatorClient;
3535
import com.google.cloud.vision.v1.ImageSource;
3636
import com.google.cloud.vision.v1.SafeSearchAnnotation;
37+
import functions.eventpojos.GcsEvent;
3738
import java.io.IOException;
3839
import java.nio.file.Files;
3940
import java.nio.file.Path;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.functions.imagemagick.eventpojos;
17+
package functions.eventpojos;
1818

1919
import java.util.Date;
2020

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.functions.imagemagick;
17+
package functions;
1818

1919
import static com.google.common.truth.Truth.assertThat;
2020

21-
import com.example.functions.imagemagick.eventpojos.GcsEvent;
22-
import com.example.functions.imagemagick.eventpojos.MockContext;
2321
import com.google.common.testing.TestLogHandler;
22+
import functions.eventpojos.GcsEvent;
23+
import functions.eventpojos.MockContext;
2424
import java.util.List;
2525
import java.util.logging.LogRecord;
2626
import java.util.logging.Logger;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.functions.imagemagick.eventpojos;
17+
package functions.eventpojos;
1818

1919
import com.google.cloud.functions.Context;
2020

0 commit comments

Comments
 (0)