Skip to content

Commit 1d8fd5e

Browse files
committed
fixed README and pom
1 parent c3c48ce commit 1d8fd5e

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

translate/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ We can then run the assembled JAR file with the `java` command. The variable
3434
$COMMAND takes two values `detect` and `translate'.
3535

3636
```
37-
MAIN_CLASS=com.google.cloud.translate.samples.TranslateText
3837
JAR_FILE=target/translate-1.0-SNAPSHOT-jar-with-dependencies.jar
39-
java -cp $JAR_FILE $MAIN_CLASS <detect|translate|langsupport> <text>
38+
java -jar $JAR_FILE <detect|translate|langsupport> <text>
4039
<optional_source> <optional_target>
4140
```
4241

@@ -52,16 +51,16 @@ Translate API Features:
5251

5352
* List the languages supported by the API
5453
```
55-
java -cp $JAR_FILE $MAIN_CLASS langsupport
54+
java -jar $JAR_FILE langsupport
5655
```
5756

5857
* Detect input text language
5958
```
60-
java -cp $JAR_FILE $MAIN_CLASS detect "$INPUT"
59+
java -jar $JAR_FILE detect "$INPUT"
6160
```
6261

6362
* Translate input text (with options)
6463
```
65-
java -cp $JAR_FILE $MAIN_CLASS translate "$INPUT"
66-
java -cp $JAR_FILE $MAIN_CLASS translate "$INPUT" $SOURCE_LANG $TARGET_LANG
64+
java -jar $JAR_FILE translate "$INPUT"
65+
java -jar $JAR_FILE translate "$INPUT" $SOURCE_LANG $TARGET_LANG
6766
```

translate/pom.xml

+2-9
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ limitations under the License.
2121
<name>translate</name>
2222
<url>http://maven.apache.org</url>
2323
<properties>
24+
<maven.compiler.target>1.8</maven.compiler.target>
25+
<maven.compiler.source>1.8</maven.compiler.source>
2426
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2527
</properties>
2628
<parent>
@@ -62,15 +64,6 @@ limitations under the License.
6264
</descriptorRefs>
6365
</configuration>
6466
</plugin>
65-
<plugin>
66-
<groupId>org.apache.maven.plugins</groupId>
67-
<version>3.3</version>
68-
<artifactId>maven-compiler-plugin</artifactId>
69-
<configuration>
70-
<source>1.8</source>
71-
<target>1.8</target>
72-
</configuration>
73-
</plugin>
7467
</plugins>
7568
</build>
7669
</project>

0 commit comments

Comments
 (0)