sameer
sameer

Reputation: 447

Error:Failed to execute goal com.mycila.maven-license-plugin:1.9.0

with reference of Cas Server source code project imported and configured POM.xml file as below there is no error in POM.xml file from command source project path with mvn clean install entered command then below error I can see :

Failed to execute goal com.mycila.maven-license-plugin:1.9.0 check (default)on project cas-server-webapp:Resource ${project.parent.basedir}/project_name/src/licensing/header.txt not found in file system .

I have created manually to class Path header.txt and header-definitions.xml class path mentioned in POM.xml file properties.

failed:Error creating XMLDoc .Please verify that input source.

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

Upvotes: 3

Views: 5159

Answers (2)

rupweb
rupweb

Reputation: 3328

Copy the license-plugin-definition.xml file from parent directory to relevant directory.

Upvotes: 0

user5329403
user5329403

Reputation: 157

you can use the flag to skip header check:

mvn install -Dlicense.skip=true

Upvotes: 3

Related Questions