【问题标题】:Error:Failed to execute goal com.mycila.maven-license-plugin:1.9.0错误:无法执行目标 com.mycila.maven-license-plugin:1.9.0
【发布时间】:2017-11-01 07:02:25
【问题描述】:

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

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

我已经手动创建了 POM.xml 文件属性中提到的 class 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>

【问题讨论】:

    标签: java maven pom.xml cas


    【解决方案1】:

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

    mvn install -Dlicense.skip=true

    【讨论】:

      猜你喜欢
      • 2016-05-28
      • 2013-09-07
      • 1970-01-01
      • 2019-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-13
      相关资源
      最近更新 更多