Closed emmerich closed 11 years ago
This sounds like an issue with the plugin. The intent is for errors to fail the build. Are you using the bundled version of r.js or an external version? If it's external, what version are you using?
We're using an external version, at 2.1.1. If I get some free time I'll try to get a minimum test case sorted to look into it (never debugged Maven plugins before)
I'm unable to reproduce a basic case where this occurs, but we see it when we run our build through continuous integration (using Continuum). I'll leave it for now, if I get any more information as to why it's happening I'll post.
I believe I've seen this as well recently. I will try to clear away some time to take a closer look soon. We've got a new baby at home so that's (happily) cutting into my time for other things.
Fair enough. The error occurred when I had a requirement on a module that existed, but the casing was incorrect. I tested it on the following platforms:
Windows 8 - worked fine, the build broke the maven cycle Linux Mint - worked fine, the build broke the maven cycle Continuum's server (running CentOS) - errors were detected, but it didn't break the Maven build
Hope this helps, let me know if there's any more information I can provide
It looks like the exception thrown due to a non-zero exit status from r.js was somehow getting swallowed by Rhino. I think I've fixed the issue in the latest snapshot release here: https://oss.sonatype.org/content/repositories/snapshots/com/github/mcheely/requirejs-maven-plugin/
Can you give it a try and let me know if it resolves the problem for you?
Unfortunately I don't have the ability to use snapshots of plugins in our CI environment (where I'd be able to test it breaks). I'll watch this issue, if you could post when you release 1.0.5, I can test it properly then.
I just released version 1.1.0. It contains the fix for this issue, and also changes the plugin's behavior to create filtered build config files in the project's build directory to make it easier to see what the filtered profile looks like.
I released it on sonatype, so it may be a day or so before you see it in maven central. Let me know how it works.
Sorry for the delay. We finally got a chance to put this in and pleased to say that our builds are breaking properly when we have incorrect casing in RequireJS dependencies. Thanks!
If you run the Maven project and have errors in your dependencies - such as referencing a dependency where the file doesn't exist - the plugin reports errors to the console, but doesn't halt the Maven build. In areas like continuous integration where you might not be monitoring the build output, this can cause builds to succeed when they really shouldn't.
Is this an issue with the plugin not picking up errors in RequireJS and reporting them to the Maven cycle, or an issue with my configuration?