Add Maven profile to skip Javadoc generation for local builds (#1878)

* #1877 Add Maven profile to skip Javadoc generation for local builds

* Make it nicer
This commit is contained in:
ljacqu 2019-08-06 01:12:01 +02:00 committed by Gabriele C
parent 7bede2528f
commit ae68667f5e
5 changed files with 27 additions and 20 deletions

26
pom.xml
View File

@ -105,6 +105,21 @@
<project.skipExtendedHashTests>true</project.skipExtendedHashTests>
</properties>
</profile>
<!-- Skip javadoc generation for faster local build -->
<profile>
<id>skipJavadocGeneration</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
@ -131,6 +146,16 @@
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- Enforce build environment -->
<plugin>
@ -222,7 +247,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<finalName>${project.finalNameBase}</finalName>
<!-- In sync with the source/target properties of the maven-compiler-plugin -->

View File

@ -1,6 +0,0 @@
: Analyze the project with Sonar (requires you install SonarQube)
if "%jarfile%" == "" (
call setvars.bat
)
mvn clean verify sonar:sonar -f "%pomfile%"

View File

@ -3,4 +3,4 @@ if "%jarfile%" == "" (
call setvars.bat
)
mvn install -o -f "%pomfile%" -Dmaven.test.skip
mvn install -o -f "%pomfile%" -Dmaven.test.skip -PskipJavadocGeneration

View File

@ -1,11 +0,0 @@
#!/bin/sh
#
# Usage: ./analyze_project.sh
#
if [ -z $jarfile ];
then
./setvars.sh
fi
mvn clean verify sonar:sonar -f $pomfile

View File

@ -8,4 +8,4 @@ if [ -z $jarfile ];
./setvars.sh
fi
mvn install -f $pomfile -Dmaven.test.skip
mvn install -f $pomfile -Dmaven.test.skip -PskipJavadocGeneration