This repository has been archived by the owner on Feb 12, 2018. It is now read-only.
forked from dtrott/maven-protoc-plugin
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#38 Added an integration test for test-compile-javanano mojo
- Loading branch information
1 parent
ca50e1b
commit 5e991ee
Showing
4 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# An optional description for this build job to be included in the build reports. | ||
invoker.description = Verifies that javanano generation works for test protos | ||
|
||
# A comma or space separated list of goals/phases to execute, may | ||
# specify an empty list to execute the default goal of the IT project | ||
invoker.goals = clean generate-test-sources |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.google.protobuf.tools.maven-protoc-plugin.its</groupId> | ||
<artifactId>it-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>TEST-27</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
|
||
<name>Integration Test 27</name> | ||
|
||
<properties> | ||
<protobufVersion>3.0.0-alpha-3</protobufVersion> | ||
</properties> | ||
|
||
<build> | ||
<extensions> | ||
<extension> | ||
<groupId>kr.motd.maven</groupId> | ||
<artifactId>os-maven-plugin</artifactId> | ||
<version>1.3.0.Final</version> | ||
</extension> | ||
</extensions> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>com.google.protobuf.tools</groupId> | ||
<artifactId>maven-protoc-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>test-compile-javanano</goal> | ||
</goals> | ||
<configuration> | ||
<protocArtifact>com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier} | ||
</protocArtifact> | ||
<javaNanoOptions>parcelable_messages=true</javaNanoOptions> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
syntax = "proto3"; | ||
|
||
option java_package = "test"; | ||
option java_outer_classname = "TestProtos"; | ||
|
||
message TestMessage { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
outputDirectory = new File(basedir, 'target/generated-test-sources/protobuf/javanano'); | ||
assert outputDirectory.exists(); | ||
assert outputDirectory.isDirectory(); | ||
|
||
generatedJavaFile = new File(outputDirectory, 'test/TestProtos.java'); | ||
assert generatedJavaFile.exists(); | ||
assert generatedJavaFile.isFile(); | ||
|
||
content = generatedJavaFile.text; | ||
assert content.contains('package test'); | ||
assert content.contains('class Test'); | ||
assert content.contains('class TestMessage'); | ||
|
||
return true; |