jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven 2.x Compiler Plugin
  • Maven 2.x Compiler Plugin
  • MCOMPILER-160

javac error but build SUCCESS

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.3.2
  • Fix Version/s: 3.0
  • Labels:
    None
  • Environment:
    Java 1.6.0_25
  • Number of attachments :
    0

Description

Using javac as the (default)compiler for my source files no classes are generated, but the Maven Build says build "SUCCESS".
Using "tycho-compiler-jdt" as the compiler, the class files are generated correctly.
reproducible = always.

Using -X show's the javac compiler commandline, but it is to long (108376 char's) to execute it from the cmd on windows.
Can I provide more information?

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MCOMPILER-184 use last plexus-compiler 2.0 api

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Robert Scholte added a comment - 20/Sep/11 1:32 PM

Please attach a sample project to reproduce this issue.

Show
Robert Scholte added a comment - 20/Sep/11 1:32 PM Please attach a sample project to reproduce this issue.
Hide
Permalink
Jochen Stiepel added a comment - 26/Sep/11 10:35 AM

Sorry, that is not so easy, because I don't get any error. So I don't know the reason why it is failing. Can I provided more information? should I debug it? Can you point me to sourcecode where to debug?

Show
Jochen Stiepel added a comment - 26/Sep/11 10:35 AM Sorry, that is not so easy, because I don't get any error. So I don't know the reason why it is failing. Can I provided more information? should I debug it? Can you point me to sourcecode where to debug?
Hide
Permalink
Robert Scholte added a comment - 26/Sep/11 12:25 PM

Here you can find examples of integration tests. These are just mini-project to reproduce it (you said you can reproduce it always). That would be a start. Next we'll have to write a verify-script. Your expectation is "generated classes", which is something we can check.
Right now I have no idea what your project looks like (folder-structure, files), how you configured the m-compiler-p, so it's impossible to reproduce it.

Show
Robert Scholte added a comment - 26/Sep/11 12:25 PM Here you can find examples of integration tests. These are just mini-project to reproduce it (you said you can reproduce it always). That would be a start. Next we'll have to write a verify-script. Your expectation is "generated classes", which is something we can check. Right now I have no idea what your project looks like (folder-structure, files), how you configured the m-compiler-p, so it's impossible to reproduce it.
Hide
Permalink
Anders Hammar added a comment - 08/Oct/12 7:03 AM

Unfortunately I've run into this one as well. Not sure what the problem is. The project with the problem includes code in src/main/java as well as generated source code.
@Jochen: Is that similar to your problematic project?

Show
Anders Hammar added a comment - 08/Oct/12 7:03 AM Unfortunately I've run into this one as well. Not sure what the problem is. The project with the problem includes code in src/main/java as well as generated source code. @Jochen: Is that similar to your problematic project?
Hide
Permalink
Anders Hammar added a comment - 09/Oct/12 5:24 AM

Due to MCOMPILER-81 it's very hard to find the root cause. After creating a patched plexus-compiler-javac so that I would get all debug info, I see that the problem is that the following message from the compiler isn't catched as an error:
"An exception has occurred in the compiler (1.6.0_24). Please file a bug at..."

Show
Anders Hammar added a comment - 09/Oct/12 5:24 AM Due to MCOMPILER-81 it's very hard to find the root cause. After creating a patched plexus-compiler-javac so that I would get all debug info, I see that the problem is that the following message from the compiler isn't catched as an error: "An exception has occurred in the compiler (1.6.0_24). Please file a bug at..."
Hide
Permalink
Anders Hammar added a comment - 09/Oct/12 7:10 AM

Just sent a pull request on plexus-compiler (https://github.com/sonatype/plexus-compiler/pull/7) that contains a fix of the existing band-aid catching mechanism of unparseable errors. This ensure that the scenario described in this ticket shouldn't happen I believe (at least it solves the scenario I ran into).
plexus-compiler-javac should handle this better (logging wise) but this will at least prevent m-compiler-p from incorrectly reporting compilation as successful.

Could someone with commit rights for plexus-compiler take a look please?

Show
Anders Hammar added a comment - 09/Oct/12 7:10 AM Just sent a pull request on plexus-compiler ( https://github.com/sonatype/plexus-compiler/pull/7 ) that contains a fix of the existing band-aid catching mechanism of unparseable errors. This ensure that the scenario described in this ticket shouldn't happen I believe (at least it solves the scenario I ran into). plexus-compiler-javac should handle this better (logging wise) but this will at least prevent m-compiler-p from incorrectly reporting compilation as successful. Could someone with commit rights for plexus-compiler take a look please?
Hide
Permalink
Anders Hammar added a comment - 10/Oct/12 3:01 AM

For the record, I can't figure out how to write an integration test for this one as the root cause is an error message which can't be parsed correctly (for example an exception/bug in the compiler) in combination with some warning messages which are parsed correctly.
Don't know how to force an exception in the compiler which would be compiler and compiler version neutral (as well as platform neutral).

Show
Anders Hammar added a comment - 10/Oct/12 3:01 AM For the record, I can't figure out how to write an integration test for this one as the root cause is an error message which can't be parsed correctly (for example an exception/bug in the compiler) in combination with some warning messages which are parsed correctly. Don't know how to force an exception in the compiler which would be compiler and compiler version neutral (as well as platform neutral).
Hide
Permalink
Anders Hammar added a comment - 18/Oct/12 8:25 AM

Waiting for a new release of plexus-compiler.

Show
Anders Hammar added a comment - 18/Oct/12 8:25 AM Waiting for a new release of plexus-compiler.
Hide
Permalink
Anders Hammar added a comment - 08/Nov/12 2:48 PM - edited

The rework in the upcoming plexus-compiler:2.0 should solve this as there is now a separate success flag returned which is based on the actual return code from the compiler.

@Jochen: Could you please test 3.0-SNAPSHOT of maven-compiler-plugin on a problematic project?

Show
Anders Hammar added a comment - 08/Nov/12 2:48 PM - edited The rework in the upcoming plexus-compiler:2.0 should solve this as there is now a separate success flag returned which is based on the actual return code from the compiler. @Jochen: Could you please test 3.0-SNAPSHOT of maven-compiler-plugin on a problematic project?
Hide
Permalink
Jochen Stiepel added a comment - 09/Nov/12 3:14 AM

I'm sorry to say, that I don't have access to that source code anymore and so I'm not able to test this new version. Thank's a lot for your work anyway! I'm sure that will help in the future.

Show
Jochen Stiepel added a comment - 09/Nov/12 3:14 AM I'm sorry to say, that I don't have access to that source code anymore and so I'm not able to test this new version. Thank's a lot for your work anyway! I'm sure that will help in the future.
Hide
Permalink
Anders Hammar added a comment - 12/Nov/12 5:08 AM

Closing as fixed based on code analysis. Unfortunately I'm not able to verify a Snapshot version on the project I've seen a similar issue.

Show
Anders Hammar added a comment - 12/Nov/12 5:08 AM Closing as fixed based on code analysis. Unfortunately I'm not able to verify a Snapshot version on the project I've seen a similar issue.
Hide
Permalink
Anders Hammar added a comment - 19/Nov/12 6:36 AM

Just to report back that m-compiler-p 3.0 now correctly fails my problematic build and prints "An exception has occurred in the compiler (1.6.0_24). Please file a bug at..." to the console.

Show
Anders Hammar added a comment - 19/Nov/12 6:36 AM Just to report back that m-compiler-p 3.0 now correctly fails my problematic build and prints "An exception has occurred in the compiler (1.6.0_24). Please file a bug at..." to the console.

People

  • Assignee:
    Anders Hammar
    Reporter:
    Jochen Stiepel
Vote (0)
Watch (3)

Dates

  • Created:
    07/Sep/11 6:54 AM
    Updated:
    19/Nov/12 6:36 AM
    Resolved:
    12/Nov/12 5:08 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.