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

Enable checkstyle verification during build #310

Merged
merged 1 commit into from
Aug 15, 2022
Merged
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
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,15 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/codehaus/mojo/flatten/CleanMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@
* @author Joerg Hohwiller (hohwille at users.sourceforge.net)
* @since 1.0.0-beta-2
*/
//CHECKSTYLE_OFF: LineLength
@Mojo( name = "clean", requiresProject = true, requiresDirectInvocation = false, executionStrategy = "once-per-session", threadSafe = true )
//CHECKSTYLE_ON: LineLength
@Mojo( name = "clean", requiresProject = true, requiresDirectInvocation = false, executionStrategy = "once-per-session",
threadSafe = true )
public class CleanMojo
extends AbstractFlattenMojo
{
Expand Down
384 changes: 222 additions & 162 deletions src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java

Large diffs are not rendered by default.

442 changes: 223 additions & 219 deletions src/main/java/org/codehaus/mojo/flatten/KeepCommentsInPom.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@
import org.eclipse.sisu.Nullable;

/**
* Works around thread safety issues when modifying the global singleton {@link org.apache.maven.model.building.DefaultModelBuilder DefaultModelBuilder}
* with custom {@link ProfileInjector} and {@link ProfileSelector}. Instead of modifying the global {@code DefaultModelBuilder}, this class
* creates a new {@code DefaultModelBuilder} and equips it with the currently active components like {@link ModelProcessor}, {@link ModelValidator} etc.
* which might have been modified/provided by other Maven extensions.
*
* Works around thread safety issues when modifying the global singleton
* {@link org.apache.maven.model.building.DefaultModelBuilder DefaultModelBuilder}
* with custom {@link ProfileInjector} and {@link ProfileSelector}. Instead of modifying the global
* {@code DefaultModelBuilder}, this class
* creates a new {@code DefaultModelBuilder} and equips it with the currently active components like
* {@link ModelProcessor}, {@link ModelValidator} etc.
* which might have been modified/provided by other Maven extensions.
*
* @author Falko Modler
* @since 1.2.3
*/
Expand Down Expand Up @@ -104,7 +107,8 @@ public class ModelBuilderThreadSafetyWorkaround
@Inject
private ReportingConverter reportingConverter;

public ModelBuildingResult build( ModelBuildingRequest buildingRequest, ProfileInjector customInjector, ProfileSelector customSelector )
public ModelBuildingResult build( ModelBuildingRequest buildingRequest, ProfileInjector customInjector,
ProfileSelector customSelector )
throws ModelBuildingException
{
// note: there is neither DefaultModelBuilder.get*(), nor DefaultModelBuilder.clone()
Expand Down
Loading