mvn2nix-maven-plugin
mvn2nix-maven-plugin copied to clipboard
Trouble with SHA-1 files
I'm trying to package the kframework project, which uses modules, and I'm seeing the following error:
[INFO] Reactor Summary:
[INFO]
[INFO] K Framework Tool Parent 1.0-SNAPSHOT ............... SUCCESS [ 54.947 s]
[INFO] K Framework KORE ................................... SUCCESS [ 0.013 s]
[INFO] K Framework Tool Kernel ............................ SUCCESS [ 0.017 s]
[INFO] K Framework KTree .................................. SUCCESS [ 0.017 s]
[INFO] K Framework Ocaml Backend .......................... SUCCESS [ 0.027 s]
[INFO] K Framework Java Backend ........................... SUCCESS [ 0.005 s]
[INFO] K Framework Tool Distribution ...................... SUCCESS [ 0.009 s]
[INFO] K Framework API 1.0-SNAPSHOT ....................... FAILURE [ 24.221 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:53 min
[INFO] Finished at: 2018-07-24T15:10:45+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.nixos.mvn2nix:mvn2nix-maven-plugin:1.2.0:mvn2nix (default-cli) on project api: Downloading SHA-1 for org.codehaus.plexus:plexus-utils:jar:2.0.4: File: https://s3.amazonaws.com/repo.runtime.verification/repository/internal/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar.sha1 , ReasonPhrase:Not Found. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :api
The pom.xml defines two custom repos:
<repositories>
<repository>
<id>runtime.verification</id>
<name>Runtime Verification Repository</name>
<url>https://s3.amazonaws.com/repo.runtime.verification/repository/internal</url>
<snapshots><enabled>false</enabled></snapshots>
<releases><enabled>true</enabled></releases>
</repository>
<repository>
<id>runtime.verification.snapshots</id>
<name>Runtime Verification Snapshot Repository</name>
<url>https://s3.amazonaws.com/repo.runtime.verification/repository/snapshots</url>
<snapshots><enabled>true</enabled></snapshots>
<releases><enabled>false</enabled></releases>
</repository>
</repositories>
I suppose that those repos don't include the .sha1 files, and that that is what's causing this tool to fail.
What are possible workarounds?
Are you expecting only k-framework-related artifacts to reside in those repos? The artifact it's failing on is a core maven artifact (org.codehaus.plexus:plexus-utils), which I'd usually expect to be obtained from maven central.
(Unless you're using a repo manager that does proxying, like nexus or artifactory, but given the S3 URLs I'm assuming that's not the case.)
@jerith666 you're correct in that it would be best practice to fetch it from maven central first, and that's what the solution ended up being.
If you think there's nothing to be done on this tool's end, then we might as well close this issue.
My reasoning for opening it though is that maven built fine, whereas this tool errored on the missing .sha1, so I thought there could be something to fix.
@asymmetric Were you ultimately able to get K to build?
@ttuegel No, because of the problem you outlined in https://github.com/NixOS/mvn2nix-maven-plugin/issues/5#issuecomment-407763904.
My reasoning for opening it though is that maven built fine, whereas this tool errored on the missing .sha1, so I thought there could be something to fix.
Yeah, I'm not familiar enough with the details of the maven repo format or this tool to say where the real problem was ... :-/