History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: MGROOVY-105
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jason Dillon
Reporter: Andrew Perepelytsya
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
GMaven

Expose ExecuteMojo in script's execution context

Created: 17/Dec/07 01:17 PM   Updated: 01/Apr/08 06:32 AM
Component/s: execute
Affects Version/s: 1.0-beta-3
Fix Version/s: 1.0-rc-1

Time Tracking:
Not Specified


 Description  « Hide
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.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Jason Dillon - 18/Jan/08 04:43 PM
Um, I've not actually tried, but IIRC you should be able to inject the location of the local m2 repo via properties.

Andrew Perepelytsya - 18/Jan/08 04:48 PM
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

Jason Dillon - 18/Jan/08 04:56 PM
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}}

Jason Dillon - 01/Apr/08 06:32 AM
I've added settings and session to the execute mojo's default namespace.