File tree Expand file tree Collapse file tree 3 files changed +47
-0
lines changed
Expand file tree Collapse file tree 3 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 3636 <maven .compiler.source>${java.version} </maven .compiler.source>
3737 <maven .compiler.target>${java.version} </maven .compiler.target>
3838 <maven-plugin-version >1.0.0</maven-plugin-version >
39+ <exec-maven-plugin .version>1.6.0</exec-maven-plugin .version>
3940 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
4041
4142 <javax .annotation.version>1.3.2</javax .annotation.version>
@@ -509,5 +510,51 @@ limitations under the License.
509510 </plugins >
510511 </build >
511512 </profile >
513+ <profile >
514+ <id >imports</id >
515+ <activation >
516+ <os >
517+ <family >!windows</family >
518+ </os >
519+ <file >
520+ <missing >.google</missing >
521+ </file >
522+ </activation >
523+ <build >
524+ <plugins >
525+ <plugin >
526+ <groupId >org.codehaus.mojo</groupId >
527+ <artifactId >exec-maven-plugin</artifactId >
528+ <version >${exec-maven-plugin.version} </version >
529+ <executions >
530+ <execution >
531+ <id >imports</id >
532+ <phase >process-sources</phase >
533+ <configuration >
534+ <executable >egrep</executable >
535+ <successCodes >
536+ <successCode >1</successCode >
537+ <successCode >2</successCode >
538+ </successCodes >
539+ <arguments >
540+ <argument >-rm</argument >
541+ <argument >1</argument >
542+ <!-- Forbidden Keywords -->
543+ <argument >^import com.google.common</argument >
544+ <!-- file patterns -->
545+ <argument >--include=*.java</argument >
546+ <!-- search path -->
547+ <argument >${project.build.sourceDirectory} </argument >
548+ </arguments >
549+ </configuration >
550+ <goals >
551+ <goal >exec</goal >
552+ </goals >
553+ </execution >
554+ </executions >
555+ </plugin >
556+ </plugins >
557+ </build >
558+ </profile >
512559 </profiles >
513560</project >
You can’t perform that action at this time.
0 commit comments