GMaven

Impossible to set any compiler configuration (sourceEncoding etc.)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.3
  • Component/s: compile
  • Labels:
    None
  • Number of attachments :
    1

Description

None of AbstractCompileMojo's parameters (sourceEncoding etc.) is passed on to groovyc. This is because AbstractCompileMojo.process() (which fills the Configuration object) runs AFTER ClassCompilerFeature.ClassCompilerImpl constructor (which reads the Configuraton object).

Issue Links

Activity

Hide
Yuichi Ohneda added a comment -

I was just dealing with the issue right now.
I attach the patch I could solive this problem for gmaven-runtime-1.6.
It's very simple, set configuration just before compile, not in the constructor.

You surely don't need to use it if you have better solution.
I hope this is useful.

regards,

Show
Yuichi Ohneda added a comment - I was just dealing with the issue right now. I attach the patch I could solive this problem for gmaven-runtime-1.6. It's very simple, set configuration just before compile, not in the constructor. You surely don't need to use it if you have better solution. I hope this is useful. regards,
Hide
Ronny Løvtangen added a comment - - edited

I tried the patch, works perfect.

a simple test for testing sourceEncoding:

void testEncoding() {
		assert "ø" == "\u00F8"
	}
Show
Ronny Løvtangen added a comment - - edited I tried the patch, works perfect. a simple test for testing sourceEncoding:
void testEncoding() {
		assert "ø" == "\u00F8"
	}

People

Vote (3)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: