Cannot analyze maven project with "mvn build" #38

mesanjeeb opened this Issue Jun 12, 2015 · 12 comments


None yet

9 participants


This issue is similar to what was reported earlier - Cannot analyze maven project?

I have a single module maven project with following structure

  • src
  • test
  • conf
  • pom.xml

I ran "infer -- mvn build". It seems like a no-op. There is no ./infer-out folder as described on workflow. No other output whatsoever.

I have tried this on both java 6 and java 8

$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
$ javac -version
javac 1.6.0_65

$ java -version
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
$ javac -version
javac 1.8.0_25


We're having the same exact issue.


I see the same thing, but I do get some activity when I run:

infer -- mvn install

However I get an exception, I'm not sure if I should put this in a different issue.

I tried to clean up this error message to not include anything private to our project...

Fatal error: exception Sys_error("/Users/ericcobb/.m2/repository/com/google/http-client/google-http-client-jackson2/1.20.0/google-http-client-jackson2-1.20.0.jar: Too many open files")
[ERROR] Failure during frontend, original command was
.....(Very large original command here)

Traceback (most recent call last):
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/infer", line 142, in <module>
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/infer", line 119, in main
    capture_exitcode = imported_module.gen_instance(args, cmd).capture()
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/../lib/capture/", line 59, in capture
    return util.run_commands(cmds)
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/../lib/capture/", line 34, in run_commands
    if not cmd.start():
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/", line 632, in start
    if self.capture() == os.EX_OK:
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/", line 400, in capture
    return self.run_infer_frontend()
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/", line 391, in run_infer_frontend
  File "/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/", line 318, in run_command
    raise e
subprocess.CalledProcessError: Command '[u'/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/InferJava', u'-results_dir', u'/Users/ericcobb/Develop/project-name/infer-out', u'-verbose_out', '/var/folders/w1/0zldbv1x0x514z0nr7z9j1dh0000gn/T/javac_EXhHos.out', u'-models', u'/Users/ericcobb/Develop/tools/infer-osx-v0.1.0/infer/infer/bin/../lib/java/models.jar', u'-no-static_final']' returned non-zero exit status 2

java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

javac -version
javac 1.8.0_20

@irpap irpap added the java label Jun 15, 2015

I am also having the same problem, Is does anyone knows how to run android project build on Eclipse and not gradlew ?

java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

infer --version
Infer version v0.1.0
Copyright 2009 - present Facebook. All Rights Reserved.

clinejj commented Jun 17, 2015

The too many open files problem appears to be an issue with OSX and Linux, not anything with infer. See this stack overflow:

We had the same issue with our projects, and after adjusting the files as described here for OSX we didn't get the issue anymore.


I changed the settings from
kern.maxfiles: 12288
kern.maxfilesperproc: 10240
kern.maxfiles: 30000
kern.maxfilesperproc: 25000

Still nothing.

Mind sharing your configuration?

@irpap irpap removed the java label Jun 18, 2015

@mesanjeeb: Someone reported successful settings here.

Otherwise you may have some luck with trying java and javac version 1.7.


@jvillard I'm probably going to wait(or possibly contribute) until kinks are cleared out. Java 7 may not be an option for us at the moment.

Thanks for the conversation.

remagon commented Jun 24, 2015

same issue
got no output after run the commands
infer -- mvn clean
infer -- mvn package

java -version
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

infer --version
Infer version v0.1.1
Copyright 2009 - present Facebook. All Rights Reserved.

adagios commented Jun 24, 2015

I'm having the same issue, but only on some projects. Some projects work correctly and on others I get no output whatsoever.

remagon commented Jun 25, 2015

you are right
I tried to delete some maven plugin, It works

I think it's about this plugin and it's version is too low, with a new version it works also.

adagios commented Jun 25, 2015

@remagon you're right, I updated the maven-compiler-plugin version and it started working!


Feel free to re-open if the issue is still there with the latest version of Infer and if @remagon's suggestion is not enough.

@jvillard jvillard closed this Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment