GMaven (OLD... DO NOT USE)

Expose ExecuteMojo in script's execution context

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-beta-3
  • Fix Version/s: 1.0-rc-1
  • Component/s: execute
  • Labels:
    None
  • Number of attachments :
    0

Description

I'm facing a big problem - need to determine the path to the m2 repo used at runtime (e.g. get an artifact and scan it's file path). However, there's nothing like that accessible in the ExecuteMojo. I think adding the ['mojo', this] map would help, executed scripts could then peek into maven api.

Activity

Hide
Jason Dillon added a comment -

Um, I've not actually tried, but IIRC you should be able to inject the location of the local m2 repo via properties.

Show
Jason Dillon added a comment - Um, I've not actually tried, but IIRC you should be able to inject the location of the local m2 repo via properties.
Hide
Andrew Perepelytsya added a comment -

Jason, I don't think there's any property for this. Moreover, it's a runtime one, which changes after maven start, so no static value will work - maven interpolates defaults + user settings.xml + global maven settings.xml

Show
Andrew Perepelytsya added a comment - Jason, I don't think there's any property for this. Moreover, it's a runtime one, which changes after maven start, so no static value will work - maven interpolates defaults + user settings.xml + global maven settings.xml
Hide
Jason Dillon added a comment -

Perhaps you are better off using a Groovy Mojo then and injecting ${settings}. I'm not sure how injecting this will help, but I suppose I could inject {{settings}}

Show
Jason Dillon added a comment - Perhaps you are better off using a Groovy Mojo then and injecting ${settings}. I'm not sure how injecting this will help, but I suppose I could inject {{settings}}
Hide
Jason Dillon added a comment -

I've added settings and session to the execute mojo's default namespace.

Show
Jason Dillon added a comment - I've added settings and session to the execute mojo's default namespace.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: