Justin Leet created METRON-2324:
-----------------------------------

             Summary: verify_licenses.sh and list_dependencies.sh don't 
properly handle maven failures
                 Key: METRON-2324
                 URL: https://issues.apache.org/jira/browse/METRON-2324
             Project: Metron
          Issue Type: Bug
            Reporter: Justin Leet


It produces different results for me on Travis than locally and implies I need 
to readd a dep (because seems right: e.g. JUnit is a correct dependency of our 
compiled source: specifically metron-integration-test).

The difference between local and Travis seems to be that our shell scripts are 
faulty. They try to exit if an error occurs, but exit during a pipe chain 
doesn't stop the chain, so it ends up passing along to builtins that exit with 
0 (because for grep, sort, etc, nothing went wrong). Note that mvn 
dependency:list should pretty much always fail midway because we don't have the 
Metron artifacts built, so we can't run a build all the way through (because it 
can't find intermodule deps). Locally, they tend to always be built for the 
devs, so it succeeds.

To see this sort of thing in action:
{code:java}
{ echo "test" && exit 1 } | grep t
echo $?
{code}
This will still run the grep on test, and because the grep succeeds, the return 
code is 0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to