Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHADE-124] keep original basedir after set d-r-p location to build dir #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</distributionManagement>

<properties>
<mavenVersion>3.1.1</mavenVersion>
<mavenVersion>3.2.5</mavenVersion>
<javaVersion>8</javaVersion>
<sisu.version>0.3.5</sisu.version>
<currentVersion>${project.version}</currentVersion>
Expand Down
22 changes: 22 additions & 0 deletions src/it/projects/dep-reduced-pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,28 @@ under the License.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>enforce-basedir-is-not-changed</id>
<goals>
<goal>enforce</goal>
</goals>
<phase>package</phase>
<configuration>
<rules>
<requireProperty>
<property>basedir</property>
<regex><![CDATA[.*(?<!/target)$]]></regex>
</requireProperty>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,7 @@ public class ShadeMojo
private boolean createDependencyReducedPom;

/**
* Where to put the dependency reduced pom. Note: setting a value for this parameter with a directory other than
* ${basedir} will change the value of ${basedir} for all executions that come after the shade execution. This is
* often not what you want. This is considered an open issue with this plugin.
* Where to put the dependency reduced pom.
*
* @since 1.7
*/
Expand Down Expand Up @@ -1220,7 +1218,7 @@ private void rewriteDependencyReducedPomIfWeHaveReduction( List<Dependency> depe
modified = updateExcludesInDeps( result.getProject(), dependencies, transitiveDeps );
}

project.setFile( dependencyReducedPomLocation );
project.setPomFile( dependencyReducedPomLocation );
}
}

Expand Down