错误:无法执行目标com.mycila.maven-license-plugin:1.9.0

时间:2017-11-01 07:02:26

标签: java maven pom.xml cas

参考Cas Server 源代码项目导入并配置POM.xml文件,如下所示POM.xml文件中没有错误来自命令源项目路径mvn clean install输入命令然后下面的错误我可以看到:

  

无法执行目标com.mycila.maven-license-plugin:1.9.0检查   (默认)项目cas-server-webapp:资源   $ {project.parent.basedir} /project_name/src/licensing/header.txt没有   在文件系统中找到。

我手动创建了POM.xml文件属性中提到的Path header.txt和header-definitions.xml类路径。

失败:创建XMLDoc时出错。请验证输入源。

的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.jasig.cas</groupId>
    <artifactId>cas-server</artifactId>
    <version>4.0.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>cas-server-webapp</artifactId>
  <packaging>war</packaging>
  <name>Jasig CAS Web Application</name>
  <dependencies>
    <dependency>
      <groupId>org.jasig.cas</groupId>
      <artifactId>cas-server-webapp-support</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-expression</artifactId>
      <version>${spring.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jstl</artifactId>
      <version>1.1.2</version>
      <type>jar</type>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
      <type>jar</type>
      <scope>runtime</scope>
    </dependency>
    <dependency>
   <groupId>com.sun</groupId>
   <artifactId>tools</artifactId>
   <version>1.8</version>
   <scope>system</scope>
   <systemPath>C:\Program Files\Java\jdk1.8.0_112\lib\tools.jar</systemPath>
 </dependency>
 <dependency>
  <groupId>com.puppycrawl.tools</groupId>
  <artifactId>checkstyle</artifactId>
  <version>6.9</version>
  </dependency>
  <dependency>
     <groupId>com.mycila.maven-license-plugin</groupId>
     <artifactId>maven-license-plugin</artifactId>
     <version>1.9.0</version>
  </dependency>
  </dependencies>
  <build>
       <plugins>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-war-plugin</artifactId>
          <configuration>
         <warName>cas</warName>
          <failOnMissingWebXml>false</failOnMissingWebXml> 
          <webResources>
            <resource>
              <directory>${basedir}/src/main/webapp/WEB-INF</directory>
              <filtering>true</filtering>
              <targetPath>WEB-INF</targetPath>
              <includes>
                <include>**/web.xml</include>
              </includes>
            </resource>
          </webResources>
          </configuration>
       </plugin>  
       <plugin>
       <artifactId>maven-checkstyle-plugin</artifactId>
       <configuration>
        <skip>true</skip>
       </configuration>
       </plugin>
</plugins>

  </build>  
  <properties>
      <classPathEntry.location>C:/Users/sameer/Downloads/sso-shiro-cas-master/sso-shiro-cas-master/cas/META-INF/maven/org.jasig.cas/cas-server-webapp/src/licensing/header.txt </classPathEntry.location>

  <classPathEntry.location>C:/Users/sameer/Downloads/sso-shiro-cas-master/sso-shiro-cas-master/cas/META-INF/maven/org.jasig.cas/cas-server-webapp/src/licensing/header-definitions.xml</classPathEntry.location>


  </properties>
</project>

Maven POM.xml file dependencies

1 个答案:

答案 0 :(得分:0)

您可以使用该标志跳过标题检查:

mvn install -Dlicense.skip=true