Skip to content

Commit

Permalink
Merge pull request #10910 from aloubyansky/enforce-jar-packaging
Browse files Browse the repository at this point in the history
Enforce jar packaging by default in BuildMojo
  • Loading branch information
gastaldi authored Jul 23, 2020
2 parents 99c531d + df925cf commit 4d45a66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,18 @@ public BuildMojo() {
@Override
public void execute() throws MojoExecutionException {

if (skip) {
getLog().info("Skipping Quarkus build");
return;
}
if (project.getPackaging().equals("pom")) {
getLog().info("Type of the artifact is POM, skipping build goal");
return;
}
if (skip) {
getLog().info("Skipping Quarkus build");
return;
if (!project.getArtifact().getArtifactHandler().getExtension().equals("jar")) {
throw new MojoExecutionException(
"The project artifact's extension is '" + project.getArtifact().getArtifactHandler().getExtension()
+ "' while this goal expects it be 'jar'");
}

boolean clear = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.5.2</version>
<version>3.6.0</version>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 4d45a66

Please sign in to comment.