anthemengineering / infer-maven-plugin Goto Github PK
View Code? Open in Web Editor NEWMaven Plugin for running Facebook Infer
License: Apache License 2.0
Maven Plugin for running Facebook Infer
License: Apache License 2.0
Environment:
I configured the plugins as
<plugin>
<groupId>com.anthemengineering.mojo</groupId>
<artifactId>infer-maven-plugin</artifactId>
<version>0.1.0</version>
</plugin>
then I ran
mvn infer:infer
and the result is
[INFO] --- infer-maven-plugin:0.1.0:infer (default-cli) @ uniserv-base ---
[INFO] Maven-infer-plugin is configured to download Infer. Downloading now.
[ERROR] Invalid URL: %s! Cannot continue Infer check.
java.io.FileNotFoundException: https://github.com/facebook/infer/releases/download/v0.1.0/infer-osx-v0.1.0.tar.xz
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1835)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at org.apache.commons.io.FileUtils.copyURLToFile(FileUtils.java:1489)
at com.anthemengineering.mojo.infer.InferMojo.downloadInfer(InferMojo.java:487)
at com.anthemengineering.mojo.infer.InferMojo.execute(InferMojo.java:166)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[...]
[ERROR] Failed to execute goal com.anthemengineering.mojo:infer-maven-plugin:0.1.0:infer (default-cli) on project uniserv-base: Invalid URL: %s! Cannot continue Infer check. https://github.com/facebook/infer/releases/download/v0.1.0/infer-osx-v0.1.0.tar.xz -> [Help 1]
Currently using 0.1.1 which is pretty old. Not sure how many features have been added to java analysis though.
I ran it using pure infer command outside this plugin and it is so far taking more than 7 minutes and reported one thing so far.
I don't think this plugin works with the latest infer.
Installed from source. No modifications.
[ERROR] Failed to execute goal com.anthemengineering.mojo:infer-maven-plugin:0.1.1-SNAPSHOT:infer (infer) on project checkstyle: Execution infer of goal com.anthemengineering.mojo:infer-maven-plugin:0.1.1-SNAPSHOT:infer failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.anthemengineering.mojo:infer-maven-plugin:0.1.1-SNAPSHOT:infer (infer) on project checkstyle: Execution infer of goal com.anthemengineering.mojo:infer-maven-plugin:0.1.1-SNAPSHOT:infer failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution infer of goal com.anthemengineering.mojo:infer-maven-plugin:0.1.1-SNAPSHOT:infer failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.NullPointerException
at com.anthemengineering.mojo.infer.InferMojo.downloadInfer(InferMojo.java:493)
at com.anthemengineering.mojo.infer.InferMojo.execute(InferMojo.java:171)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
Alternatively just stay with tar.xz
Hi,
Running infer plugin gives following error:
[ERROR] Failed to execute goal com.anthemengineering.mojo:infer-maven-plugin:0.1.0:infer (default-cli) on project cert-test-suite: Invalid URL: %s! Cannot continue Infer check.: https://github.com/facebook/infer/releases/download/v0.1.0/infer-linux64-v0.1.0.tar.xz -> [Help 1]
Maybe v0.1.0 should be changed to v0.17.0
I tried the plugin with the given sample configuration:
<plugin>
<groupId>com.anthemengineering.mojo</groupId>
<artifactId>infer-maven-plugin</artifactId>
<version>0.1.0-SNAPSHOT</version>
<configuration>
<consoleOut>false</consoleOut>
</configuration>
<executions>
<execution>
<phase>verify</phase>
<id>infer</id>
<goals>
<goal>infer</goal>
</goals>
</execution>
</executions>
</plugin>
But this worked only when I changed the given version 0.1.0-SNAPSHOT
to 0.1.0
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.