|
27 | 27 | <fbs.version>1.2.0-3f79e055</fbs.version> |
28 | 28 | <flatc.download.skip>false</flatc.download.skip> |
29 | 29 | <flatc.executable>${project.build.directory}/flatc-${os.detected.classifier}-${fbs.version}.exe</flatc.executable> |
| 30 | + <flatc.generated.files>${project.build.directory}/generated-sources/flatc</flatc.generated.files> |
30 | 31 | <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version> |
31 | 32 | <maven-dependency-plugin.version>2.10</maven-dependency-plugin.version> |
32 | 33 | <os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version> |
|
51 | 52 | </extensions> |
52 | 53 |
|
53 | 54 | <plugins> |
54 | | - <plugin> |
| 55 | + <plugin> <!-- download the flatbuffer compiler --> |
55 | 56 | <groupId>org.apache.maven.plugins</groupId> |
56 | 57 | <artifactId>maven-dependency-plugin</artifactId> |
57 | 58 | <version>${maven-dependency-plugin.version}</version> |
|
83 | 84 | <artifactId>exec-maven-plugin</artifactId> |
84 | 85 | <version>1.4.0</version> |
85 | 86 | <executions> |
86 | | - <execution> |
| 87 | + <execution> <!-- make the flatbuffer compiler executable --> |
87 | 88 | <id>script-chmod</id> |
88 | 89 | <goals> |
89 | 90 | <goal>exec</goal> |
|
98 | 99 | <skip>${flatc.download.skip}</skip> |
99 | 100 | </configuration> |
100 | 101 | </execution> |
101 | | - <execution> |
| 102 | + <execution> <!-- generate sources by executing the flatbuffer compiler --> |
102 | 103 | <goals> |
103 | 104 | <goal>exec</goal> |
104 | 105 | </goals> |
|
108 | 109 | <arguments> |
109 | 110 | <argument>-j</argument> |
110 | 111 | <argument>-o</argument> |
111 | | - <argument>target/generated-sources/flatc</argument> |
| 112 | + <argument>${flatc.generated.files}</argument> |
112 | 113 | <argument>../../format/Message.fbs</argument> |
113 | 114 | <argument>../../format/File.fbs</argument> |
114 | 115 | </arguments> |
115 | 116 | </configuration> |
116 | 117 | </execution> |
117 | 118 | </executions> |
118 | 119 | </plugin> |
119 | | - <plugin> |
| 120 | + <plugin> <!-- add the license header to the generated files --> |
120 | 121 | <groupId>com.mycila</groupId> |
121 | 122 | <artifactId>license-maven-plugin</artifactId> |
122 | 123 | <version>2.3</version> |
|
135 | 136 | </execution> |
136 | 137 | </executions> |
137 | 138 | </plugin> |
138 | | - <plugin> |
| 139 | + <plugin> <!-- add generated sources to classpath --> |
139 | 140 | <groupId>org.codehaus.mojo</groupId> |
140 | 141 | <artifactId>build-helper-maven-plugin</artifactId> |
141 | 142 | <version>1.9.1</version> |
142 | 143 | <executions> |
143 | 144 | <execution> |
144 | | - <id>add-sources-as-resources</id> |
| 145 | + <id>add-generated-sources-to-classpath</id> |
145 | 146 | <phase>generate-sources</phase> |
146 | 147 | <goals> |
147 | 148 | <goal>add-source</goal> |
148 | 149 | </goals> |
149 | 150 | <configuration> |
150 | 151 | <sources> |
151 | | - <source>${project.build.directory}/generated-sources</source> |
| 152 | + <source>${flatc.generated.files}</source> |
152 | 153 | </sources> |
153 | 154 | </configuration> |
154 | 155 | </execution> |
155 | 156 | </executions> |
156 | 157 | </plugin> |
157 | | - <plugin> |
| 158 | + <plugin> <!-- no checkstyle on the generated code --> |
158 | 159 | <groupId>org.apache.maven.plugins</groupId> |
159 | 160 | <artifactId>maven-checkstyle-plugin</artifactId> |
160 | 161 | <configuration> |
|
0 commit comments