Uploaded image for project: 'Active and Available Inventory'
  1. Active and Available Inventory
  2. AAI-568

aai/logging-api build fails on license.txt not found when run outside of aai/logging-service dir - for root CI builds

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Done
    • Affects Version/s: Beijing Release
    • Fix Version/s: Beijing Release
    • Labels:

      Description

       Issue is build runs only if run in aai/logging-service and fails run at repo root or inside aai/logging-service/logging-api

      The license reference is hardcoded to be where the build is run 

      <!-- license plugin -->
      
      <plugin>
      
      <groupId>com.mycila</groupId>
      
      <artifactId>license-maven-plugin</artifactId>
      
      <version>3.0</version>
      
      <configuration>
      
      <header>License.txt</header>

      Fix is to duplicate the file in the logging-api subdir

       

       repro

      obrienbiometrics:wse_onap_sts391_repo michaelobrien$ mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true

      [*INFO*] Common Logging API ................................. FAILURE [  0.015 s]

       

      [*ERROR*] Failed to execute goal com.mycila:license-maven-plugin:3.0:format (default) on project logging-api: Execution default of goal com.mycila:license-maven-plugin:3.0:format failed: Cannot read header document License.txt. Cause: Resource License.txt not found in file system, classpath or URL: no protocol: License.txt -> [Help 1]

       

       Fix: so CI systems can run from above aai/logging-service

      obrienbiometrics:~ michaelobrien$ mkdir wse_onap_aai-568
      
      obrienbiometrics:logging-service michaelobrien$  mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
      
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] Reactor Summary:
      
      [INFO]
      
      [INFO] aai-logging-service ................................ SUCCESS [  3.184 s]
      
      [INFO] Common Logging API ................................. SUCCESS [  1.718 s]
      
      [INFO] EELF Logging Implementation ........................ SUCCESS [  1.740 s]
      
      [INFO] Common Logging Distribution ........................ SUCCESS [  0.318 s]
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] BUILD SUCCESS
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] Total time: 9.114 s
      
      [INFO] Finished at: 2017-12-27T20:20:21-05:00
      
      [INFO] Final Memory: 37M/431M
      
      [INFO] ------------------------------------------------------------------------
      
      
      obrienbiometrics:logging-service michaelobrien$ cd logging-api/
      
      obrienbiometrics:logging-api michaelobrien$ ls
      
      pom.xml	src	target
      
      obrienbiometrics:logging-api michaelobrien$  mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
      
      [INFO] Scanning for projects...
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo.maven.apache.org/maven2/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 1.9 kB/s)
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo.maven.apache.org/maven2/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo2.maven.org/maven2/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 8.3 kB/s)
      
      Downloading: https://nexus.onap.org/content/repositories/releases/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 5.1 kB/s)
      
      Downloading: https://nexus.onap.org/content/repositories/releases/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo2.maven.org/maven2/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 5.1 kB/s)
      
      [INFO] Inspecting build with total of 1 modules...
      
      [INFO] Installing Nexus Staging features:
      
      [INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
      
      [INFO]
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] Building Common Logging API 1.2.0-SNAPSHOT
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO]
      
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ logging-api ---
      
      [INFO] Deleting /Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target
      
      [INFO]
      
      [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-no-snapshots) @ logging-api ---
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (pre-unit-test) @ logging-api ---
      
      [INFO] surefireArgLine set to -javaagent:/Users/michaelobrien/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/code-coverage/jacoco-ut.exec,excludes=**/gen/**:**/generated-sources/**:**/yang-gen/**:**/pax/**,dumponexit=true
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (jacoco-initialize-unit-tests) @ logging-api ---
      
      [INFO] argLine set to -javaagent:/Users/michaelobrien/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/coverage-reports/jacoco.exec,excludes=**/gen/**:**/generated-sources/**:**/yang-gen/**:**/pax/**,dumponexit=true
      
      [INFO]
      
      [INFO] --- license-maven-plugin:3.0:format (default) @ logging-api ---
      
      [INFO] Updating license headers...
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] BUILD FAILURE
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] Total time: 2.893 s
      
      [INFO] Finished at: 2017-12-27T20:20:46-05:00
      
      [INFO] Final Memory: 20M/215M
      
      [INFO] ------------------------------------------------------------------------
      
      [ERROR] Failed to execute goal com.mycila:license-maven-plugin:3.0:format (default) on project logging-api: Execution default of goal com.mycila:license-maven-plugin:3.0:format failed: Cannot read header document License.txt. Cause: Resource License.txt not found in file system, classpath or URL: no protocol: License.txt -> [Help 1]
      
      [ERROR]
      
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      
      [ERROR]
      
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
      
      
      
      obrienbiometrics:logging-api michaelobrien$ cp ../License.txt .
      
      obrienbiometrics:logging-api michaelobrien$ ls
      
      License.txt	pom.xml	src
      
      obrienbiometrics:logging-api michaelobrien$  mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true
      
      [INFO] Scanning for projects...
      
      Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo.maven.apache.org/maven2/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 1.7 kB/s)
      
      Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo2.maven.org/maven2/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo.maven.apache.org/maven2/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 8.7 kB/s)
      
      Downloading: https://nexus.onap.org/content/repositories/releases/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 5.3 kB/s)
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/releases/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo2.maven.org/maven2/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/oparent/1.1.0-SNAPSHOT/maven-metadata.xml (600 B at 5.4 kB/s)
      
      [INFO] Inspecting build with total of 1 modules...
      
      [INFO] Installing Nexus Staging features:
      
      [INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
      
      [INFO]
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] Building Common Logging API 1.2.0-SNAPSHOT
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO]
      
      [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ logging-api ---
      
      [INFO]
      
      [INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-no-snapshots) @ logging-api ---
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (pre-unit-test) @ logging-api ---
      
      [INFO] surefireArgLine set to -javaagent:/Users/michaelobrien/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/code-coverage/jacoco-ut.exec,excludes=**/gen/**:**/generated-sources/**:**/yang-gen/**:**/pax/**,dumponexit=true
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (jacoco-initialize-unit-tests) @ logging-api ---
      
      [INFO] argLine set to -javaagent:/Users/michaelobrien/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/coverage-reports/jacoco.exec,excludes=**/gen/**:**/generated-sources/**:**/yang-gen/**:**/pax/**,dumponexit=true
      
      [INFO]
      
      [INFO] --- license-maven-plugin:3.0:format (default) @ logging-api ---
      
      [INFO] Updating license headers...
      
      [INFO]
      
      [INFO] --- maven-checkstyle-plugin:2.17:check (onap-license) @ logging-api ---
      
      Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo.maven.apache.org/maven2/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repo2.maven.org/maven2/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml (776 B at 11 kB/s)
      
      Downloading: https://nexus.onap.org/content/repositories/releases/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloading: http://repository.apache.org/snapshots/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml
      
      Downloaded: https://nexus.onap.org/content/repositories/snapshots/org/onap/oparent/checkstyle/1.1.0-SNAPSHOT/maven-metadata.xml (776 B at 6.9 kB/s)
      
      Downloading: http://repository.apache.org/snapshots/org/onap/oparent/version/1.1.0-SNAPSHOT/maven-metadata.xml
      
      [INFO] Starting audit...
      
      Audit done.
      
      [INFO]
      
      [INFO] --- maven-checkstyle-plugin:2.17:check (onap-java-style) @ logging-api ---
      
      [INFO] Starting audit...
      
      Audit done.
      
      [INFO]
      
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ logging-api ---
      
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      
      [INFO] skip non existing resourceDirectory /Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/src/main/resources
      
      [INFO]
      
      [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ logging-api ---
      
      [INFO] Changes detected - recompiling the module!
      
      [INFO] Compiling 6 source files to /Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/classes
      
      [INFO]
      
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ logging-api ---
      
      [INFO] Not copying test resources
      
      [INFO]
      
      [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ logging-api ---
      
      [INFO] Not compiling test sources
      
      [INFO]
      
      [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ logging-api ---
      
      [INFO] Tests are skipped.
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:report (post-unit-test) @ logging-api ---
      
      [INFO] Skipping JaCoCo execution due to missing execution data file.
      
      [INFO]
      
      [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ logging-api ---
      
      [INFO] Building jar: /Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/logging-api-1.2.0-SNAPSHOT.jar
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (pre-integration-test) @ logging-api ---
      
      [INFO] failsafeArgLine set to -javaagent:/Users/michaelobrien/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/code-coverage/jacoco-it.exec,excludes=**/gen/**:**/generated-sources/**:**/yang-gen/**:**/pax/**,dumponexit=true
      
      [INFO]
      
      [INFO] --- maven-failsafe-plugin:2.19.1:integration-test (integration-tests) @ logging-api ---
      
      [INFO] Tests are skipped.
      
      [INFO]
      
      [INFO] --- jacoco-maven-plugin:0.7.7.201606060606:report (post-integration-test) @ logging-api ---
      
      [INFO] Skipping JaCoCo execution due to missing execution data file.
      
      [INFO]
      
      [INFO] --- maven-failsafe-plugin:2.19.1:verify (integration-tests) @ logging-api ---
      
      [INFO] Tests are skipped.
      
      [INFO]
      
      [INFO] --- maven-install-plugin:2.4:install (default-install) @ logging-api ---
      
      [INFO] Installing /Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/target/logging-api-1.2.0-SNAPSHOT.jar to /Users/michaelobrien/.m2/repository/org/onap/aai/logging-service/logging-api/1.2.0-SNAPSHOT/logging-api-1.2.0-SNAPSHOT.jar
      
      [INFO] Installing /Users/michaelobrien/wse_onap_aai-568/logging-service/logging-api/pom.xml to /Users/michaelobrien/.m2/repository/org/onap/aai/logging-service/logging-api/1.2.0-SNAPSHOT/logging-api-1.2.0-SNAPSHOT.pom
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] BUILD SUCCESS
      
      [INFO] ------------------------------------------------------------------------
      
      [INFO] Total time: 6.282 s
      
      [INFO] Finished at: 2017-12-27T20:21:54-05:00
      
      [INFO] Final Memory: 35M/372M
      
      [INFO] ------------------------------------------------------------------------

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                michaelobrien Michael O'Brien
                Reporter:
                michaelobrien Michael O'Brien
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: