Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.1.1
-
Fix Version/s: 1.2
-
Labels:None
-
Number of attachments :
Description
I have an Idl that contains an error (bad type) see attached file "myIdl.idl"
when I execute maven using the attached pom.xml.
Then I can see an error form the idl compiler:
[ERROR] E:\temp\mvn-idlj-pb\src\main\idl\myIdl.idl (line 5):
UnknownReturnType is an undeclared type.
UnknownReturnType testFailed();
^
But maven says it is a success (BUILD SUCCESS)
I have tried with parameter failOnError to true but still the same behaviour
The issue comes from the idlj compiler from sun that doesn't return an error code.
But the idlj maven plugin can easily improve this bad behaviour in classe "org.codehaus.mojo.idlj.IdljTranslator" at the end of the method "invokeCompiler":
if ( isFailOnError() && ( exitCode != 0 || err.toString().contains( "Invalid argument" ) ) )
{
throw new MojoExecutionException( "IDL compilation failed" );
}
I think if the error stream contains information that's means there is at least one error (not sure if it can contains warnings...)
I have confirmed this behavior, and verified that testing for a non-empty error output appears to resolve it. I need to do more testing to check that it does not introduce new problems.