Open sandrobonazzola opened 2 years ago
even changing:
maven:
MAVEN_OPTS="${MAVEN_OPTS} "'$(BUILD_JAVA_OPTS_MAVEN)' \
xmvn --offline \
- $(BUILD_FLAGS) \
+ $(DEV_BUILD_FLAGS) \
the rendered command becomes:
xmvn --offline \
-P brand-source-maps -Danimal.sniffer.skip -Dcheckstyle.skip \
install
but checkstyle is not skipped.
SKIP_CHECKS was introduced by @gregsheremeta perhaps he can spend some time helping on this :-)
Oh my ... I flushed this cache page from my brain so long ago :)
Is the goal to always skip checks because they'll never work in CentOS stream? If so, perhaps perma-disabling it in the pom would work per https://stackoverflow.com/a/54533408/994243
If not, I think we'd have to figure out why the variable is being ignored.
The goal is to be able to run the checks as developer but skip them at RPM build time
Hi, my name is Koshik and I am a student at UT Austin. I'd like to work on this issue as part of my virtualization class assignment.
Welcome aboard @kmahapatra530 ! assigned this issue to you.
I tried a few things on my redhat machine:
Changed SKIP_CHECKS=1 temporarily in the Makefile even if I could change from command line.
Made the following changes to Makefile to test the answer quoted from stackoverflow above:
-DEV_EXTRA_BUILD_FLAGS:=$(DEV_EXTRA_BUILD_FLAGS) -Danimal.sniffer.skip -Dcheckstyle.skip +DEV_EXTRA_BUILD_FLAGS:=$(DEV_EXTRA_BUILD_FLAGS) -Danimal.sniffer.skip -Dcheckstyle.skip -Dskip.checkstyle -Dovirt-checkstyle-extension.skip -Dskip.ovirt-checkstyle-extension
The reason for trying both checkstyle.skip and skip.checkstyle is that people have reported different working combinations in stack overflow. I tried the same for ovirt-checkstyle-extension as well.
I keep getting the following error:
[INFO] oVirt Checkstyle Checks ............................ FAILURE [ 0.080 s]
Only warning I see here is:
[INFO] --- maven-jar-plugin:3.2.2:jar (default-jar) @ checkstyles --- [INFO] Building jar: ..../ovirt-engine/build-tools-root/checkstyles/target/checkstyles- 4.5.5-SNAPSHOT.jar [INFO] [INFO] --- ovirt-jboss-modules-maven-plugin:2.0.1:attach-modules (default) @ checkstyles --- [INFO] The modules source directory ".../ovirt-engine/build-tools-root/checkstyles/src /main/modules" doesn't exist, no modules artifacts will be attached. [INFO] [INFO] --- maven-jar-plugin:3.2.2:test-jar (test-jar) @ checkstyles --- [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] Building jar:.../ovirt-engine/build-tools-root/checkstyles/target/checkstyles- 4.5.5-SNAPSHOT-tests.jar
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on p roject ovirt-checkstyle-extension: Fatal error compiling: invalid flag: --release -> [Help 1]
I also tried modifying pom.xml directly to test if the skip configuration works:
Those errors are so hard to read :) The only one that matters is this:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project ovirt-checkstyle-extension: Fatal error compiling: invalid flag: --release
In other words, sending the release
parameter to maven-compiler-plugin is invalid.
Try removing this line: https://github.com/oVirt/ovirt-engine/blob/master/pom.xml#L846
Removing the release flag gives a complaint about other flags (target and source). If I remove them all, then it doesn’t build. I suspect no files are associated with the compilation and hence the problem.
I changed the Makefile:
but using
xmvn --local
instead ofmvn
still lead to:As
com.puppycrawl.tools:checkstyle
is not available in CentOS Stream and as it's used only during development we should be able to skip it during RPM build.