Maven 2 & 3

Toolchain doesn't match Toolchain extensions

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 2.0.9
  • Fix Version/s: 2.0.9
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

Toolchain uses null key within storing toolchains in Maven Session, which causes extensions not to match.

Specifically, this problem occurs in the DefaultToolchainManager.storeToolchainToBuildContext method. When storing into context

context.put( getStorageKey( toolchain.getType() ), toolchain.getModel() );

toolchain.getType() always returns null. Using toolchain.getModel().getType() will return the correct type and fix the problem.

Activity

Hide
Milos Kleint added a comment -

the factory should use this constructor
protected DefaultToolchain( ToolchainModel model, String type, Logger logger )
for some reason the incomplete
protected DefaultToolchain( ToolchainModel model, Logger logger )
constructor is also present.

What about I keep both constructors supported and the getType() method does this:
return type != null ? type : model.getType();

Show
Milos Kleint added a comment - the factory should use this constructor protected DefaultToolchain( ToolchainModel model, String type, Logger logger ) for some reason the incomplete protected DefaultToolchain( ToolchainModel model, Logger logger ) constructor is also present. What about I keep both constructors supported and the getType() method does this: return type != null ? type : model.getType();
Show
Milos Kleint added a comment - done: http://svn.apache.org/viewvc?rev=635690&view=rev
Hide
Paul Benedict added a comment -

"Affects version" is 2.0.9 – should Fix Version also be 2.0.9 not 2.0.x?

Show
Paul Benedict added a comment - "Affects version" is 2.0.9 – should Fix Version also be 2.0.9 not 2.0.x?
Hide
Milos Kleint added a comment -

well, possibly, but 2.0.9 was not released yet anyway..

Show
Milos Kleint added a comment - well, possibly, but 2.0.9 was not released yet anyway..

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: