如何编译成功cas最新maven项目

从官网 github上下载 https://github.com/Jasig/cas/releases  cas的最新版本 4.1.2下来
cd E:\zqb\cas\cas-4.1.2

mvn clean install -Dmaven.test.skip
发现会报一大堆错
首先 是 findbugs插件
然后是checkstyle-plugin 不知道是不是 版本太新国内下载被墙了

网上也没找到解决方案 直接 把它注释就解决了 打开主pom.xml
把这个  <!-- <maven-checkstyle-plugin.version>2.15</maven-checkstyle-plugin.version>-->

注释了
把这两个也注释了
<!--
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${maven-findbugs-plugin.version}</version>
                <configuration>
                    <plugins>
                        <plugin>
                            <groupId>com.mebigfatguy.fb-contrib</groupId>
                            <artifactId>fb-contrib</artifactId>
                            <version>${maven-findbugs-contrib-plugin.version}</version>
                        </plugin>
                        <plugin>
                            <groupId>com.h3xstream.findsecbugs</groupId>
                            <artifactId>findsecbugs-plugin</artifactId>
                            <version>${maven-findbugs-security-plugin.version}</version>
                        </plugin>
                    </plugins>
                    <includeFilterFile>${cs.dir}/findbugs-rules.xml</includeFilterFile>
                    <effort>Max</effort>
                    <failOnError>true</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>findbugs-check</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>-->
			<!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven-checkstyle-plugin.version}</version>
                <configuration>
                    <consoleOutput>true</consoleOutput>
                    <configLocation>${cs.dir}/checkstyle-rules.xml</configLocation>
                    <suppressionsLocation>${cs.dir}/checkstyle-suppressions.xml</suppressionsLocation>
                    <failsOnError>true</failsOnError>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                        <phase>compile</phase>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>-->




把这也注释了
 <!--
				<plugin>
                	<groupId>org.eclipse.m2e</groupId>
                	<artifactId>lifecycle-mapping</artifactId>
                	<version>1.0.0</version>
                	<configuration>
                		<lifecycleMappingMetadata>
                			<pluginExecutions>
                				<pluginExecution>
                					<pluginExecutionFilter>
                						<groupId>
                							org.codehaus.mojo
                						</groupId>
                						<artifactId>
                							findbugs-maven-plugin
                						</artifactId>
                						<versionRange>
                							[3.0.1,)
                						</versionRange>
                						<goals>
                							<goal>check</goal>
                						</goals>
                					</pluginExecutionFilter>
                					<action>
                						<ignore></ignore>
                					</action>
                				</pluginExecution>
                				<pluginExecution>
                					<pluginExecutionFilter>
                						<groupId>
                							org.codehaus.mojo
                						</groupId>
                						<artifactId>
                							buildnumber-maven-plugin
                						</artifactId>
                						<versionRange>
                							[1.3,)
                						</versionRange>
                						<goals>
                							<goal>
                								create-timestamp
                							</goal>
                						</goals>
                					</pluginExecutionFilter>
                					<action>
                						<ignore></ignore>
                					</action>
                				</pluginExecution>
                			</pluginExecutions>
                		</lifecycleMappingMetadata>
                	</configuration>
                </plugin>-->


就可以BUILD SUCCESS了
并且提供 可以再tomcat成功跑起来 的 cas_server4.1.2
示例程序下载地址:http://download.csdn.net/detail/koproblem/9365185

你可能感兴趣的:(maven,cas)