99 <artifactId >net.sf.eclipsecs.checkstyle</artifactId >
1010 <packaging >eclipse-plugin</packaging >
1111 <name >Checkstyle Core Library Plugin</name >
12-
12+
1313 <properties >
14- <checkstyle .version>8.35</checkstyle .version>
14+ <checkstyle .version>8.36</checkstyle .version>
15+ <!-- -Dcheckstyle.downloadFile=checkstyle-8.36.zip -->
16+ <checkstyle .downloadFile>checkstyle-${checkstyle.version} .zip</checkstyle .downloadFile>
17+ <checkstyle .srcUrl>https://github.com/checkstyle/checkstyle/archive/${checkstyle.downloadFile} </checkstyle .srcUrl>
1518 </properties >
19+ <dependencies >
20+ <dependency >
21+ <groupId >com.puppycrawl.tools</groupId >
22+ <artifactId >checkstyle</artifactId >
23+ <version >${checkstyle.version} </version >
24+ </dependency >
25+ </dependencies >
1626 <build >
1727 <plugins >
18- <plugin >
19- <groupId >com.googlecode.maven-download-plugin</groupId >
20- <artifactId >download-maven-plugin</artifactId >
21- <executions >
22- <execution >
23- <id >download-checkstyle-src</id >
24- <phase >initialize</phase >
25- <goals >
26- <goal >wget</goal >
27- </goals >
28- <configuration >
29- <outputDirectory >.</outputDirectory >
30- <url >https://github.com/checkstyle/checkstyle/archive/checkstyle-${checkstyle.version} .zip</url >
31- <outputFileName >checkstyle-checkstyle-${checkstyle.version} .zip</outputFileName >
32- </configuration >
33- </execution >
34- </executions >
35- </plugin >
3628 <plugin >
3729 <artifactId >maven-antrun-plugin</artifactId >
3830 <executions >
3931 <execution >
4032 <phase >prepare-package</phase >
33+ <id >unpack-checkstyle-src</id >
4134 <configuration >
4235 <target >
4336 <delete dir =" ${project.build.directory}/checkstyle-src-unpack" />
4437 <delete dir =" ${project.build.directory}/checkstyle-src" />
45- <first id =" cssrc" >
46- <fileset dir =" ." includes =" checkstyle-checkstyle-*.zip" />
47- </first >
48- <unzip src =" ${toString:cssrc}" dest =" ${project.build.directory}/checkstyle-src-unpack" >
38+ <unzip src =" ${basedir}/checkstyle-${checkstyle.downloadFile}"
39+ dest =" ${project.build.directory}/checkstyle-src-unpack" >
4940 <patternset >
5041 <include name =" **/src/main/java/**" />
5142 <include name =" **/src/main/resources/**" />
8778 </plugin >
8879 </plugins >
8980 </build >
90- </project >
81+ <profiles >
82+ <profile >
83+ <id >download-checkstyle-src</id >
84+ <activation >
85+ <file >
86+ <missing >${basedir} /checkstyle-checkstyle-8.36.zip</missing ><!-- change this when checkstyle.version changed -->
87+ </file >
88+ </activation >
89+ <build >
90+ <plugins >
91+ <plugin >
92+ <groupId >com.googlecode.maven-download-plugin</groupId >
93+ <artifactId >download-maven-plugin</artifactId >
94+ <executions >
95+ <execution >
96+ <id >download-checkstyle-src</id >
97+ <phase >initialize</phase >
98+ <goals >
99+ <goal >wget</goal >
100+ </goals >
101+ <configuration >
102+ <outputDirectory >.</outputDirectory >
103+ <url >${checkstyle.srcUrl} </url >
104+ <outputFileName >checkstyle-${checkstyle.downloadFile} </outputFileName >
105+ </configuration >
106+ </execution >
107+ </executions >
108+ </plugin >
109+ </plugins >
110+ </build >
111+ </profile >
112+ <profile >
113+ <id >pack-fat-checkstyle</id >
114+ <activation >
115+ <file >
116+ <missing >${basedir} /checkstyle-all-8.36.jar</missing ><!-- change this when checkstyle.version changed -->
117+ </file >
118+ </activation >
119+ <build >
120+ <plugins >
121+ <plugin >
122+ <groupId >org.apache.maven.plugins</groupId >
123+ <artifactId >maven-dependency-plugin</artifactId >
124+ <version >3.1.2</version >
125+ <executions >
126+ <execution >
127+ <id >unpack</id >
128+ <phase >initialize</phase >
129+ <goals >
130+ <goal >unpack</goal >
131+ </goals >
132+ <configuration >
133+ <artifactItems >
134+ <artifactItem >
135+ <groupId >com.puppycrawl.tools</groupId >
136+ <artifactId >checkstyle</artifactId >
137+ <version >${checkstyle.version} </version >
138+ <outputDirectory >${project.build.directory} </outputDirectory >
139+ <includes >META-INF/MANIFEST.MF</includes >
140+ </artifactItem >
141+ </artifactItems >
142+ </configuration >
143+ </execution >
144+ </executions >
145+ </plugin >
146+ <plugin >
147+ <groupId >org.apache.maven.plugins</groupId >
148+ <artifactId >maven-assembly-plugin</artifactId >
149+ <version >3.3.0</version >
150+ <configuration >
151+ <descriptorRefs >
152+ <descriptorRef >jar-with-dependencies</descriptorRef >
153+ </descriptorRefs >
154+ <outputDirectory >${basedir} </outputDirectory >
155+ <finalName >checkstyle-all-${checkstyle.version} </finalName >
156+ <appendAssemblyId >false</appendAssemblyId >
157+ <formats >
158+ <format >jar</format >
159+ </formats >
160+ <overrideGroupName >com.puppycrawl.tools</overrideGroupName >
161+ <archive >
162+ <manifestFile >${project.build.directory} /META-INF/MANIFEST.MF</manifestFile >
163+ </archive >
164+ </configuration >
165+ <executions >
166+ <execution >
167+ <id >make-assembly</id >
168+ <phase >initialize</phase >
169+ <goals >
170+ <goal >single</goal >
171+ </goals >
172+ </execution >
173+ </executions >
174+ </plugin >
175+ <plugin >
176+ <artifactId >maven-antrun-plugin</artifactId >
177+ <executions >
178+ <execution >
179+ <phase >generate-sources</phase >
180+ <id >copy-heckstyle-all-jar</id >
181+ <configuration >
182+ <target >
183+ <delete file =" ${basedir}/checkstyle-all.jar" failonerror =" false" />
184+ <copy file =" ${basedir}/checkstyle-all-${checkstyle.version}.jar"
185+ tofile =" ${basedir}/checkstyle-all.jar" overwrite =" true" />
186+ </target >
187+ </configuration >
188+ <goals >
189+ <goal >run</goal >
190+ </goals >
191+ </execution >
192+ </executions >
193+ </plugin >
194+ </plugins >
195+ </build >
196+ </profile >
197+ </profiles >
198+ </project >
0 commit comments