Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved error handling, reporting, and resuming from a failed module #7

Open
Lambeaux opened this issue Sep 14, 2020 · 1 comment
Open

Comments

@Lambeaux
Copy link

There might be multiple issues here but we can decompose if needed. Often times I'll need to retry a build due to an artifact failure or some other glitch. Here's an example output.

[ERROR] Failed to execute goal on project lambeaux-app: Could not resolve dependencies for project net.lambeaux.project.distribution:lambeaux-app:pom:15.15.1-SNAPSHOT: The following artifacts could not be resolved: ddf.jaxb:catalog-transformer-xml-binding:jar:1.0.1, ddf.security.servlet:security-servlet-logout:jar:2.19.11, ddf.catalog.transformer:catalog-transformer-html:jar:2.19.11, ddf.catalog.rest:catalog-rest-endpoint:jar:2.19.11: Could not transfer artifact ddf.jaxb:catalog-transformer-xml-binding:jar:1.0.1 from/to m2-mirror (http://localhost:52697): Socket closed -> [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/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :lambeaux-app
(node:36522) UnhandledPromiseRejectionWarning: undefined
(node:36522) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:36522) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It would be helpful if cx printed the maven command it last used. I suspect it would look something like this.

mvn -s settings.xml clean install -DskipTests=true -DskipStatic=true ... < etc >

Issue is the m2 proxy server is down so troubleshooting outside of the cx command becomes challenging for these cases.

@Lambeaux
Copy link
Author

Was able to work-around the m2 proxy server being down by doing:

python -m SimpleHTTPServer 54805

which works quite well. But based upon how maven mirrors work, changing the mirror or the settings.xml will trigger a re-download of all dependencies, even versioned ones.

There appears to be metadata linking the artifacts with their origin. It seems maven invalidates the artifact when the origin changes. There are some settings for <update-strategy> that we can play with to see if they make any difference but I haven't tried that yet.

Short of that working, I think the real solution is to use a lightweight repository manager.
https://github.com/dzikoysk/reposilite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant