Uploaded image for project: 'HTrace'
  1. HTrace
  2. HTRACE-246

HTrace WebApp not properly defined and therefore not packaged into .war

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 4.0
    • 4.1, 4.0.1
    • build, ui
    • None
    • Patch, Important

    Description

      Right now when I build HTrace from source (master branch) I the following

      lmcgibbn@LMC-032857 /usr/local/incubator-htrace/htrace-webapp(HTRACE-241) $ mvn package
      [INFO] Scanning for projects...
      [WARNING]
      [WARNING] Some problems were encountered while building the effective model for org.apache.htrace:htrace-webapp:war:4.1.0-incubating-SNAPSHOT
      [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ org.apache.htrace:htrace-webapp:[unknown-version], /usr/local/incubator-htrace/htrace-webapp/pom.xml, line 31, column 15
      [WARNING]
      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
      [WARNING]
      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
      [WARNING]
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building htrace-webapp 4.1.0-incubating-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      Downloading: http://repository.apache.org/snapshots/org/apache/htrace/htrace-core/4.1.0-incubating-SNAPSHOT/maven-metadata.xml
      Downloading: http://repository.apache.org/snapshots/org/apache/htrace/htrace/4.1.0-incubating-SNAPSHOT/maven-metadata.xml
      [INFO]
      [INFO] --- maven-war-plugin:2.2:war (default-cli) @ htrace-webapp ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [htrace-webapp] in [/usr/local/incubator-htrace/htrace-webapp/target/htrace-webapp-4.1.0-incubating-SNAPSHOT]
      [INFO] Processing war project
      [INFO] Webapp assembled in [26 msecs]
      [INFO] Building war: /usr/local/incubator-htrace/htrace-webapp/target/htrace-webapp-4.1.0-incubating-SNAPSHOT.war
      [INFO] WEB-INF/web.xml already added, skipping
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.611 s
      [INFO] Finished at: 2015-09-14T21:34:39-07:00
      [INFO] Final Memory: 10M/245M
      [INFO] ------------------------------------------------------------------------
      

      This is not OK as the webapp directory structure does NOT follow the Maven war plugin artifact structure of convention over configuration.
      Currently the structure in webapp directory nesting in htrace is as follows.

      lmcgibbn@LMC-032857 /usr/local/incubator-htrace/htrace-webapp/src(HTRACE-241) $ tree
      .
      └── main
          └── web
              ├── WEB-INF
              │   └── ...
      9 directories, 38 files
      

      Instead of

      lmcgibbn@LMC-032857 /usr/local/incubator-htrace/htrace-webapp/src(HTRACE-241) $ tree
      .
      └── main
          └── webapp
              ├── WEB-INF
              │   └── ...
      9 directories, 38 files
      

      Notice the difference in web Vs. webapp
      I've got a patch (which i will upload in a minute) which fixes this. This then results in the following build output.

      lmcgibbn@LMC-032857 /usr/local/incubator-htrace/htrace-webapp(HTRACE-241) $ mvn package
      [INFO] Scanning for projects...
      [WARNING]
      [WARNING] Some problems were encountered while building the effective model for org.apache.htrace:htrace-webapp:war:4.1.0-incubating-SNAPSHOT
      [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ org.apache.htrace:htrace-webapp:[unknown-version], /usr/local/incubator-htrace/htrace-webapp/pom.xml, line 31, column 15
      [WARNING]
      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
      [WARNING]
      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
      [WARNING]
      [INFO]
      [INFO] ------------------------------------------------------------------------
      [INFO] Building htrace-webapp 4.1.0-incubating-SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-remote-resources-plugin:1.4:process (default) @ htrace-webapp ---
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ htrace-webapp ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /usr/local/incubator-htrace/htrace-webapp/src/main/resources
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ htrace-webapp ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ htrace-webapp ---
      [INFO] Using 'UTF-8' encoding to copy filtered resources.
      [INFO] skip non existing resourceDirectory /usr/local/incubator-htrace/htrace-webapp/src/test/resources
      [INFO] Copying 3 resources
      [INFO]
      [INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ htrace-webapp ---
      [INFO] No sources to compile
      [INFO]
      [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ htrace-webapp ---
      [INFO]
      [INFO] --- maven-war-plugin:2.2:war (default-war) @ htrace-webapp ---
      [INFO] Packaging webapp
      [INFO] Assembling webapp [htrace-webapp] in [/usr/local/incubator-htrace/htrace-webapp/target/htrace-webapp-4.1.0-incubating-SNAPSHOT]
      [INFO] Processing war project
      [INFO] Copying webapp resources [/usr/local/incubator-htrace/htrace-webapp/src/main/webapp]
      [INFO] Webapp assembled in [61 msecs]
      [INFO] Building war: /usr/local/incubator-htrace/htrace-webapp/target/htrace-webapp-4.1.0-incubating-SNAPSHOT.war
      [INFO] WEB-INF/web.xml already added, skipping
      [INFO]
      [INFO] --- maven-source-plugin:2.1.2:jar-no-fork (attach-sources) @ htrace-webapp ---
      [INFO] META-INF already added, skipping
      [INFO] META-INF/DEPENDENCIES already added, skipping
      [INFO] META-INF/LICENSE already added, skipping
      [INFO] META-INF/NOTICE already added, skipping
      [INFO] Building jar: /usr/local/incubator-htrace/htrace-webapp/target/htrace-webapp-4.1.0-incubating-SNAPSHOT-sources.jar
      [INFO] META-INF already added, skipping
      [INFO] META-INF/DEPENDENCIES already added, skipping
      [INFO] META-INF/LICENSE already added, skipping
      [INFO] META-INF/NOTICE already added, skipping
      [INFO]
      [INFO] --- maven-javadoc-plugin:2.8.1:jar (attach-javadocs) @ htrace-webapp ---
      [INFO] Building jar: /usr/local/incubator-htrace/htrace-webapp/target/htrace-webapp-4.1.0-incubating-SNAPSHOT-javadoc.jar
      [INFO]
      [INFO] --- apache-rat-plugin:0.11:check (default) @ htrace-webapp ---
      [INFO] 51 implicit excludes (use -debug for more details).
      [INFO] Exclude: **/.settings/**
      [INFO] Exclude: **/dependency-reduced-pom.xml
      [INFO] Exclude: **/generated/**
      [INFO] Exclude: */.settings/*
      [INFO] Exclude: */generated/*
      [INFO] Exclude: .git/**
      [INFO] Exclude: **/README.md
      [INFO] Exclude: **/go/bin/*
      [INFO] Exclude: **/go/pkg/*
      [INFO] Exclude: style.txt
      [INFO] Exclude: **/bootstrap-3.3.1/**
      [INFO] Exclude: **/web/lib/**
      [INFO] Exclude: **/*.min.js
      [INFO] Exclude: **/d3.min.js
      [INFO] Exclude: **/backbone-*.js
      [INFO] Exclude: **/jquery-*.js
      [INFO] Exclude: **/moment-*.js
      [INFO] Exclude: **/underscore-*.js
      [INFO] Exclude: **/build/src/**
      [INFO] Exclude: **/build/pkg/**
      [INFO] Exclude: **/Godeps/**
      [INFO] 26 resources included (use -debug for more details)
      Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      Compiler warnings:
        WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
      Warning:  org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
      Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
      Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
      [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 25 licence.
      [INFO]
      [INFO] --- maven-site-plugin:3.4:attach-descriptor (attach-descriptor) @ htrace-webapp ---
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 4.176 s
      [INFO] Finished at: 2015-09-14T21:36:49-07:00
      [INFO] Final Memory: 26M/447M
      [INFO] ------------------------------------------------------------------------
      

      When I deploy the new artifact into Apache Tomcat I can now see the UI. There are issues with the UI which I am going to log in a separate issue.

      Attachments

        1. HTRACE-246.patch
          3.68 MB
          Lewis John McGibbney
        2. HTRACE-246.addendum.001.patch
          0.6 kB
          Masatake Iwasaki

        Activity

          People

            lewismc Lewis John McGibbney
            lewismc Lewis John McGibbney
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: