anthemengineering / infer-maven-plugin

Maven Plugin for running Facebook Infer
Apache License 2.0
16 stars 4 forks source link

Error downloading infer-osx-v0.1.0.tar.xz #6

Open giacgbj opened 9 years ago

giacgbj commented 9 years ago

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]
alszeb commented 9 years ago

Thanks for posting this - fb Infer originally provided binaries of infer for download, so we had the plugin set up so it would just work. We are looking into another solution now (e.g., packaging the binaries ourselves).

As a workaround, you can:

  1. follow the install directions on https://github.com/facebook/infer/blob/master/INSTALL.md
  2. disable the download by setting the download property to false in the plugin's configuration
  3. make sure infer is either added to the PATH or setthe commandPath in the plugin's configuration to the full path to the infer script.

Currently try to finish a couple projects now so, hoping to work on this soon!

ramsrib commented 7 years ago

I'm also facing the same issue and just noticed that this issue exists more than 1 year.

I think this project is not maintained anymore and eventually dead.

alszeb commented 7 years ago

Thanks @ramsrib. This is fixed on the master branch and we are now hosting the binaries here: https://github.com/anthemengineering/infer-maven-plugin/releases. We have not pushed a release to maven central with this fix although we would be happy to do so. The above workaround may be an option if you wish to use it now.

alszeb commented 7 years ago

You might also check out https://github.com/uber-common/infer-plugin

danshome commented 1 month ago

@alszeb Are you planning to publish 0.1.1 to maven central?