apache / apache/maven-shade-plugin
[MSHADE-145] Site not generated correctly when overriding dependencyReducedPomLocation with relocation
- Dominant language
- Java
- Stars
- 188
- Forks
- 103
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 4
Description
**[Anthony Whitford](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=awhitford)** opened **[MSHADE-145](https://issues.apache.org/jira/browse/MSHADE-145?redirect=false)** and commented
My release failed because the project uses the `maven-shade-plugin` and it generated a `dependency-reduced-pom.xml` in the `basedir`, so the release plugin complains that there are local, uncommitted modifications.
To get my release working, I overrode the `dependencyReducedPomLocation` configuration parameter to place it in `project.build.directory`:
```xml
${project.build.directory}/dependency-reduced-pom.xml
...
```
My release worked, but then I noticed that this had a nasty side effect: my site was not generated properly!
The project has `src\site` with a `site.xml` and APT pages. Those were no longer generated... I have no idea how one thing is connected to the other, but I did prove it by creating a sample application that illustrates the problem.
Note that the problem seems to a combination of at least 2 things:
* `dependencyReducedPomLocation`
* `relocations`
In other words, if you comment out the `dependencyReducedPomLocation` or the `relocations`, you can see the site being generated correctly. But if you have these, then the site will NOT generate properly.
To be clear, the site generation is incorrect if you don't see the menu layout like:
* About
* Introduction
* Usage
* Project Documentation
* Project Information
A broken site, you will notice that the About menu and Usage page do not exist, for example.
---
**Affects:** 2.0
**Attachments:**
- [shade-site-bug.zip](https://issues.apache.org/jira/secure/attachment/12718925/shade-site-bug.zip) (_4.57 kB_)
**Issue Links:**
- [MSHADE-124](https://issues.apache.org/jira/browse/MSHADE-124) Need better plan for getting dependency-reduced-pom.xml out of basedir
- [MRELEASE-878](https://issues.apache.org/jira/browse/MRELEASE-878) Exclude generated dependency-reduced-pom.xml and flattened-pom.xml
- [MRELEASE-798](https://issues.apache.org/jira/browse/MRELEASE-798) Commit additional files with release plugin
1 votes, 6 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the attached shade-site-bug.zip and reproduce site generation using both dependencyReducedPomLocation and relocations. Inspect the sample project's src/site/site.xml and APT pages, then compare output with either setting disabled. Done means the generated site includes the About menu with Introduction and Usage, Project Documentation, and Project Information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100