Execution project artifacts are always empty, so dependencies are never included

Description

always returns an empty array. The logic at:
https://github.com/hibernate/hibernate-orm/blob/5.2.5/tooling/hibernate-enhance-maven-plugin/src/main/java/org/hibernate/orm/tooling/maven/MavenEnhancePlugin.java#L170
appears to be incorrect (at least, it is in my testing - I'm using maven 3.3.9).

I couldn't find any documentation for what an execution project is supposed to be. Based on what I can glean from https://issues.apache.org/jira/browse/MNG-3941, it sounds like it's not appropriate in this use case.

Therefore, I'm attaching a PR that remove the use of executionProject and makes work as intended:
https://github.com/hibernate/hibernate-orm/pull/1657

Activity

Show:

Former user March 15, 2017 at 12:21 AM

Fixed in 5.1 branch as well.

Vlad Mihalcea December 12, 2016 at 2:45 PM

Applied PR upstream.

Craig Andrews December 8, 2016 at 3:54 PM
Edited

, I don't see any harm in making the change you've suggested, but I also don't think it's necessary. I see you were using 5.2.5 - can you please try again using 5.2.6-SNAPSHOT? The changes made in (included in 5.2.6-SNAPSHOT) impact this issue as well.

Vlad Mihalcea December 8, 2016 at 9:25 AM

I've run a test onthis GitHub repository of mine.

First, I added the Enhance plugin dependency so that I can debug it:

Now, while debugging the 5.2.5 version, This is what I get when I inspect executionProject.getArtifacts()

However, when calling project.getArtifacts(). I get an empty collection.

Maybe we should change it like this:

Craig Andrews November 30, 2016 at 4:22 AM

Note that dependencies aren't included as intended in until both this issue and are fixed.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created November 30, 2016 at 4:15 AM
Updated March 15, 2017 at 12:34 AM
Resolved March 15, 2017 at 12:21 AM