|
73 | 73 | <version>1.7.1</version> |
74 | 74 | </extension> |
75 | 75 | </extensions> |
76 | | - <plugins> |
77 | | - <plugin> |
78 | | - <groupId>org.apache.thrift</groupId> |
79 | | - <artifactId>thrift-maven-plugin</artifactId> |
80 | | - <version>0.10.0</version> |
81 | | - <configuration> |
82 | | - <thriftExecutable>thrift</thriftExecutable> |
83 | | - <thriftSourceRoot>${project.basedir}/src/main/thrift</thriftSourceRoot> |
84 | | - <outputDirectory>${project.basedir}/src/main/java</outputDirectory> |
85 | | - <generator>java</generator> |
86 | | - |
87 | | - </configuration> |
88 | | - <executions> |
89 | | - <execution> |
90 | | - <id>thrift-sources</id> |
91 | | - <phase>generate-sources</phase> |
92 | | - <goals> |
93 | | - <goal>compile</goal> |
94 | | - </goals> |
95 | | - </execution> |
96 | | - </executions> |
97 | | - </plugin> |
98 | | - <!-- Add Spring Boot Maven plugin --> |
99 | | - <plugin> |
100 | | - <groupId>org.springframework.boot</groupId> |
101 | | - <artifactId>spring-boot-maven-plugin</artifactId> |
102 | | - </plugin> |
103 | | - </plugins> |
104 | 76 | </build> |
| 77 | + |
| 78 | + <profiles> |
| 79 | + <profile> |
| 80 | + <id>skip-thrift</id> |
| 81 | + <activation> |
| 82 | + <property> |
| 83 | + <name>skipThrift</name> |
| 84 | + <value>true</value> |
| 85 | + </property> |
| 86 | + </activation> |
| 87 | + <build> |
| 88 | + <plugins> |
| 89 | + <plugin> |
| 90 | + <groupId>org.apache.thrift</groupId> |
| 91 | + <artifactId>thrift-maven-plugin</artifactId> |
| 92 | + <version>0.10.0</version> |
| 93 | + <!-- no executions = skip --> |
| 94 | + </plugin> |
| 95 | + </plugins> |
| 96 | + </build> |
| 97 | + </profile> |
| 98 | + |
| 99 | + <profile> |
| 100 | + <id>with-thrift</id> |
| 101 | + <activation> |
| 102 | + <activeByDefault>true</activeByDefault> |
| 103 | + </activation> |
| 104 | + <build> |
| 105 | + <plugins> |
| 106 | + <plugin> |
| 107 | + <groupId>org.apache.thrift</groupId> |
| 108 | + <artifactId>thrift-maven-plugin</artifactId> |
| 109 | + <version>0.10.0</version> |
| 110 | + <configuration> |
| 111 | + <thriftExecutable>thrift</thriftExecutable> |
| 112 | + <thriftSourceRoot>${project.basedir}/src/main/thrift</thriftSourceRoot> |
| 113 | + <outputDirectory>${project.basedir}/src/main/java</outputDirectory> |
| 114 | + <generator>java</generator> |
| 115 | + </configuration> |
| 116 | + <executions> |
| 117 | + <execution> |
| 118 | + <id>thrift-sources</id> |
| 119 | + <phase>generate-sources</phase> |
| 120 | + <goals> |
| 121 | + <goal>compile</goal> |
| 122 | + </goals> |
| 123 | + </execution> |
| 124 | + </executions> |
| 125 | + </plugin> |
| 126 | + </plugins> |
| 127 | + </build> |
| 128 | + </profile> |
| 129 | + </profiles> |
105 | 130 | </project> |
0 commit comments