[ https://issues.apache.org/jira/browse/SLING-7929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634016#comment-16634016 ]
ASF GitHub Bot commented on SLING-7929: --------------------------------------- simonetripodi opened a new pull request #3: SLING-7929 - Create a distribution package for the Feature Analyser URL: https://github.com/apache/sling-org-apache-sling-feature-analyser/pull/3 initial checkin ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Create a distribution package for the Feature Analyser > ------------------------------------------------------ > > Key: SLING-7929 > URL: https://issues.apache.org/jira/browse/SLING-7929 > Project: Sling > Issue Type: Improvement > Components: Feature Model, Tooling > Reporter: Simone Tripodi > Priority: Major > > Packaging matters even if software distribution, I am going to submit a > proposal where the Analyser package can be distributed as a "product" like if > it was Apache Tomcat or Apache Maven, users will be able to download a > {{.zip}} or a {{.tar.gz}} package including required artifacts and > multi-platform binaries, the README with instructions of installation and > usage and, of course, legal files including NOTICE and LICENSE with enlisted > dependencies. > {noformat} > $ unzip org.apache.sling.feature.analyser-0.1.3-SNAPSHOT.zip > Archive: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT.zip > creating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/ > creating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/bin/ > creating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/ > inflating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/README.md > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.sling.commons.johnzon-1.0.0.jar > > inflating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/LICENSE > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.sling.feature.analyser-0.1.3-SNAPSHOT.jar > > inflating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/NOTICE > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/geronimo-json_1.0_spec-1.0-alpha-1.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.felix.converter-1.0.0.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.felix.configurator-1.0.4.jar > > inflating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/bin/sfa.bat > inflating: org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/bin/sfa > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/osgi.core-6.0.0.jar > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/picocli-3.6.0.jar > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.osgi.annotation.versioning-1.0.0.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/slf4j-api-1.7.25.jar > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/slf4j-simple-1.7.25.jar > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.sling.feature-0.1.3-SNAPSHOT.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.sling.feature.io-0.1.3-SNAPSHOT.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.osgi.util.function-1.0.0.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/org.apache.felix.utils-1.11.0.jar > > inflating: > org.apache.sling.feature.analyser-0.1.3-SNAPSHOT/lib/commons-lang-2.6.jar > {noformat} > I am also enriching the CLI with few useful options (enable the debug log or > reducing it to errors-only, see the product version) and a shiny {{help}} > command that will simplify users usage, i.e. > Open the shell and type {{sfa --help}} to see the available commands: > {noformat} > $ ./bin/sfa --help > Usage: sfa [-hqvX] -f=<featureFile> [-p=<pluginClass>] > Apache Sling Application Analyser > -f, --feature-file=<featureFile> > Set feature file. > -h, --help Display the usage message. > -p, --plugin-class=<pluginClass> > Explicitly specify plugin class to run, if ommitted the > default > plugins are used > -q, --quiet Log errors only. > -v, --version Display version information. > -X, --verbose Produce execution debug output. > Copyright(c) 2018 The Apache Software Foundation. > {noformat} > And a sample execution (please note version print and debug enabled): > {noformat} > $ ./bin/sfa analyse -X -v -f /path/to/src/main/features/emptyApiRegions.json > [INFO] org.apache.sling.feature.analyser v0.1.3-SNAPSHOT (built on > 2018-09-15T10:28:55Z) > [INFO] Java version: 1.8.0_152, vendor: Oracle Corporation > [INFO] Java home: > /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre > [INFO] Default locale: en_CH, platform encoding: UTF-8 > [INFO] Default Time Zone: Coordinated Universal Time > [INFO] OS name: "Mac OS X", version: "10.13.6", arch: "x86_64", family: "mac" > [INFO] +-----------------------------------------------------+ > [INFO] Apache Sling Application Analyser > [INFO] > [INFO] Starting feature analyzer... > [DEBUG] Trying to get artifact for > mvn:org.apache.felix/org.apache.felix.converter/1.0.0 > [DEBUG] Querying repositories for > org/apache/felix/org.apache.felix.converter/1.0.0/org.apache.felix.converter-1.0.0.jar > [DEBUG] Checking DefaultArtifactHandler to get artifact from > file:///Users/stripodi/.m2/repository/org/apache/felix/org.apache.felix.converter/1.0.0/org.apache.felix.converter-1.0.0.jar > [DEBUG] Checking url to be local file > file:///Users/stripodi/.m2/repository/org/apache/felix/org.apache.felix.converter/1.0.0/org.apache.felix.converter-1.0.0.jar > [DEBUG] Found artifact > file:///Users/stripodi/.m2/repository/org/apache/felix/org.apache.felix.converter/1.0.0/org.apache.felix.converter-1.0.0.jar > [INFO] - Executing Bundle Import/Export Check... > [INFO] - Executing Bundle Initial Content Check... > [INFO] - Executing Bundle Resources Check... > [INFO] - Executing CheckRequirementsCapabilities... > [ERROR] Artifact org.apache.felix.converter:1.0.0 requires > [org.apache.felix.converter/1.0.0] osgi.ee; > filter:="(&(osgi.ee=JavaSE)(version=1.7))" in start level 0 but no artifact > is providing a matching capability in this start level. > [INFO] +-----------------------------------------------------+ > [INFO] Apache Sling Application Analyser FAILURE > [INFO] +-----------------------------------------------------+ > [ERROR] Unable to analyse feature > /Users/stripodi/Documents/cq-workspace/sling-slingfeature-maven-plugin/src/it/empty-api-regions/src/main/features/emptyApiRegions.json: > java.lang.Exception: Analyser detected errors. See log output for error > messages. > at org.apache.sling.feature.analyser.Analyser.analyse(Analyser.java:144) > at org.apache.sling.feature.analyser.Analyser.analyse(Analyser.java:87) > at org.apache.sling.feature.analyser.main.Main.run(Main.java:106) > at org.apache.sling.feature.analyser.main.Main.main(Main.java:188) > [INFO] > [INFO] +-----------------------------------------------------+ > [INFO] > [INFO] Total time: 144 milliseconds > [INFO] Finished at: Sat Sep 15 10:29:38 UTC 2018 > [INFO] Final Memory: 37M/245M > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)