|
29 | 29 | <properties>
|
30 | 30 | <module.name>org.mybatis.spring.boot.sample.groovy</module.name>
|
31 | 31 | <groovy.version>4.0.27</groovy.version>
|
| 32 | + <sourceDirectory>${project.basedir}/src/main/groovy</sourceDirectory> |
| 33 | + <testSourceDirectory>${project.basedir}/src/test/groovy</testSourceDirectory> |
32 | 34 | </properties>
|
| 35 | + |
| 36 | + <dependencyManagement> |
| 37 | + <dependencies> |
| 38 | + <!-- Ensure we use latest version regardless of spotbugs version --> |
| 39 | + <dependency> |
| 40 | + <groupId>org.apache.groovy</groupId> |
| 41 | + <artifactId>groovy-bom</artifactId> |
| 42 | + <version>${groovy.version}</version> |
| 43 | + <type>pom</type> |
| 44 | + <scope>import</scope> |
| 45 | + </dependency> |
| 46 | + </dependencies> |
| 47 | + </dependencyManagement> |
| 48 | + |
33 | 49 | <dependencies>
|
34 | 50 | <dependency>
|
35 | 51 | <groupId>org.mybatis.spring.boot</groupId>
|
|
43 | 59 | <dependency>
|
44 | 60 | <groupId>org.apache.groovy</groupId>
|
45 | 61 | <artifactId>groovy</artifactId>
|
46 |
| - <version>${groovy.version}</version> |
| 62 | + </dependency> |
| 63 | + <dependency> |
| 64 | + <groupId>org.apache.groovy</groupId> |
| 65 | + <artifactId>groovy-groovydoc</artifactId> |
| 66 | + <optional>true</optional> |
| 67 | + </dependency> |
| 68 | + <dependency> |
| 69 | + <groupId>org.apache.groovy</groupId> |
| 70 | + <artifactId>groovy-docgenerator</artifactId> |
| 71 | + <optional>true</optional> |
47 | 72 | </dependency>
|
48 | 73 | <!-- test dependencies -->
|
49 | 74 | <dependency>
|
|
88 | 113 | <groupId>org.codehaus.gmavenplus</groupId>
|
89 | 114 | <artifactId>gmavenplus-plugin</artifactId>
|
90 | 115 | <version>4.2.1</version>
|
| 116 | + <configuration> |
| 117 | + <attachGroovyDocAnnotation>true</attachGroovyDocAnnotation> |
| 118 | + <docTitle>${project.name} Groovy Documentation</docTitle> |
| 119 | + <groovyDocOutputDirectory>${project.reporting.outputDirectory}/gapidocs</groovyDocOutputDirectory> |
| 120 | + <footer>${project.name} Groovy Documentation</footer> |
| 121 | + <header>${project.name} Groovy Documentation</header> |
| 122 | + </configuration> |
91 | 123 | <executions>
|
92 | 124 | <execution>
|
93 | 125 | <goals>
|
|
104 | 136 | </executions>
|
105 | 137 | </plugin>
|
106 | 138 | </plugins>
|
107 |
| - <sourceDirectory>${project.basedir}/src/main/groovy</sourceDirectory> |
108 |
| - <testSourceDirectory>${project.basedir}/src/test/groovy</testSourceDirectory> |
109 | 139 | </build>
|
| 140 | + |
| 141 | + <profiles> |
| 142 | + <profile> |
| 143 | + <id>release</id> |
| 144 | + <build> |
| 145 | + <plugins> |
| 146 | + <plugin> |
| 147 | + <groupId>org.codehaus.gmavenplus</groupId> |
| 148 | + <artifactId>gmavenplus-plugin</artifactId> |
| 149 | + <executions> |
| 150 | + <execution> |
| 151 | + <id>groovydocs</id> |
| 152 | + <goals> |
| 153 | + <goal>generateStubs</goal> |
| 154 | + <goal>generateTestStubs</goal> |
| 155 | + <goal>groovydoc</goal> |
| 156 | + </goals> |
| 157 | + </execution> |
| 158 | + </executions> |
| 159 | + </plugin> |
| 160 | + <plugin> |
| 161 | + <groupId>org.apache.maven.plugins</groupId> |
| 162 | + <artifactId>maven-jar-plugin</artifactId> |
| 163 | + <executions> |
| 164 | + <execution> |
| 165 | + <id>groovydoc-jar</id> |
| 166 | + <goals> |
| 167 | + <goal>jar</goal> |
| 168 | + </goals> |
| 169 | + <phase>package</phase> |
| 170 | + <configuration> |
| 171 | + <classifier>javadoc</classifier> |
| 172 | + <classesDirectory>${project.reporting.outputDirectory}/gapidocs</classesDirectory> |
| 173 | + </configuration> |
| 174 | + </execution> |
| 175 | + </executions> |
| 176 | + </plugin> |
| 177 | + </plugins> |
| 178 | + </build> |
| 179 | + </profile> |
| 180 | + </profiles> |
| 181 | + |
110 | 182 | </project>
|
0 commit comments