Geoserver 2.22.0 installation problem. Images are visibly different - geoserver

I am trying to install Geoserver on Fedora using Maven
mvn clean install
and got an error. Frankly speaking, I have no ideas, what is the way to solve it. The error is:
Test set: org.geoserver.wms.wms_1_1_1.GetMapIntegrationTest
-------------------------------------------------------------------------------
Tests run: 87, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.72 s <<< FAILURE! - in org.geoserver.wms.wms_1_1_1.GetMapIntegrationTest
testNamedPlacesRenderingSelection(org.geoserver.wms.wms_1_1_1.GetMapIntegrationTest) Time elapsed: 0.102 s <<< FAILURE!
java.lang.AssertionError:
Images are visibly different, found 1469 different pixels, against a threshold of 1300
You can add -Dorg.geotools.image.test.interactive=true to show a dialog comparing them (requires GUI support)
at org.geoserver.wms.wms_1_1_1.GetMapIntegrationTest.testNamedPlacesRenderingSelection(GetMapIntegrationTest.java:2333)
[ERROR] Failures:
[ERROR] GetMapIntegrationTest.testNamedPlacesRenderingSelection:2333 Images are visibly different, found 1469 different pixels, against a threshold of 1300
You can add -Dorg.geotools.image.test.interactive=true to show a dialog comparing them (requires GUI support)
[INFO]
[ERROR] Tests run: 1392, Failures: 1, Errors: 0, Skipped: 6
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project gs-wms: There are test failures.
[ERROR]
[ERROR] Please refer to /home/andlis/geoserver-2.22.0/src/wms/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :gs-wms
I would really appreciate any help.
I cannot understand the way of solving the problem...

The test is rendering a map with a legend, and expects the following result:
The test running on your platform fails to match the expected outcome. The test has 1300 pixels difference threshold to care for differences in font rendering (and some logic to deal with simple antialiasing differences), but on your system, you have 1469 pixels that are different.
May be due to fonts... GeoServer gets built on Linux, Windows and OSX, and on different Linux distributions as well, without triggering that failure, so I'm guessing there is something quite different in that Fedora installation... fonts likely?
If you are building on a system with a graphical UI running, get into the wms module, and run the following:
mvn test -Dtest=GetMapIntegrationTest#testNamedPlacesRenderingSelection -nsu -Dinteractive.image=true -Djava.awt.headless=false
You should get a dialog showing a side by side image comparison.

Related

Jenkins throws an exception: build step 'invoke top-level maven targets' marked build as failure

Jenkins throws the following error:
[WARNING] The requested profile "singleflow" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project factor-esb-autotest: Fatal error compiling: invalid target release: 10 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
build step 'invoke top-level maven targets' marked build as failure
My POM https://pastebin.com/xeb5Mpcb
At first I thought that the error was due to the fact that in the jenkins global settings the version does not match the plugin (3.8.1), I set it to "Install from Apach" 3.8.1 but it still does not work. What could be the reason ?
Maven in global setting
There must be a configuration for maven-compiler-plugin (<release>10</release>) or a property like <maven.compiler.release>10</maven.compiler.release>
The commented upgrade of JUnit is unrelated to the problem.
Apart from that such information that you have update pom should be part of the question up-front

Maven Iterator/Invoker fails on Windows

I have a Windows 10 System where I don't have administrative rights. However, most Maven builds are working on that machine. For some reason I run into a problem with the Iterator Plugin. Even the example from https://github.com/khmarbaise/iterator-maven-plugin/blob/master/src/it/invokerBasicTest/pom.xml fails with this error:
[INFO] [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:<my home director>). Please verify you invoked Maven from the correct directory. -> [Help 1]
[INFO] [ERROR]
[INFO] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[INFO] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[INFO] [ERROR]
[INFO] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[INFO] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
[ERROR] ------ Maven call was NOT Ok. for iteration one ( return code: 1 )
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.567 s
[INFO] Finished at: 2020-05-08T10:04:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.soebes.maven.plugins:iterator-maven-plugin:0.5.0:invoker (default) on project invoker-basic-test: Maven call failed with return code 1 for iteration: one -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
So in other words, on that particular Windows system (I see that build working on Macs and other Windows machines), the invoker tries to find the pom.xml in my user home directory. And of course, I started the build in the right directory. The only significant thing what I have noticed on that Windows, the Environment variable MP_FORCE_USE_SANDBOX=1 is set.
-e and -X don't really help. Perhaps someone could help me out with some further hints in order to tackle down the problem.
Finally, I found out what the problem was. It's not really a maven or Iterator Problem, more of a misconfigured Windows problem. However, in case someone comes over something like this, it may be worth to check.
In my case it was a Registry Key. In Windows there is a Registry Key Autorun under
\HKEY_CURRENT_USER\Software\Microsoft\Command Processor
This Registry Key can control, in which directory a new cmd.exe will be started. In my case, there was cd /d C:\<myHomeDirectory>as a value. Which made the cmd.exe always start in my Home Directory. This caused my build to fail, because each iteration of the iterator supposably starts a new process in my Home Directory, which finally lets Maven search the desired pom.xml in my Home Directory.
For me the resolution for my problem is, change the Registry Key Autorun to the value cd.

SonarQube 6.1 Execute Analysis Permissions

We would like to allow any user to run a SonarQube preview analysis (authenticated or not). However, we'd like to restrict whom can upload analysis to the server.
In order to allow all users to run preview analysis, the documentation indicates that the Anyone user needs access to Browse and Execute Analysis.
However, it seems that running the maven sonar plugin at the command line is still requiring sonar.login and sonar.password.
Additionally, we would like to limit who can upload analysis to only the sonar-administrator group.
Here is a screenshot of our project permissions:
Here is a screenshot of our Global permissions:
Unsuccessful command:
mvn -o org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar -Dsonar.analysis.mode=preview -Dsonar.branch=$BRANCH -Dsonar.host.url=$SONAR_URL -Dsonar.skipPackageDesign=true -Dsonar.report.export.path=sonar-report.json
Successful command:
mvn -o org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar -Dsonar.analysis.mode=preview -Dsonar.branch=$BRANCH -Dsonar.host.url=$SONAR_URL -Dsonar.skipPackageDesign=true -Dsonar.report.export.path=sonar-report.json -Dsonar.login=%SONAR_USERNAME% -Dsonar.password=%SONAR_PASSWORD%
Please help me fine-tune our access options so that we achieve the goal of allowing preview analysis but excluding the ability to push analysis.
Here is some excerpts of the failing job. I removed some of the details that are company specific.
> mvn -o org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar -Dsonar.analysis.mode=preview -Dsonar.branch=$BRANCH -Dsonar.host.url=$SONAR_URL -Dsonar.skipPackageDesign=true -Dsonar.report.export.path=sonar-report.json
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=512m; support was removed in 8.0
...
[INFO] Performing issue tracking
[INFO] 772/772 components tracked
[WARNING] Console report is deprecated. Use SonarLint CLI to have local reports of issues
[INFO]
------------- Issues Report -------------
+13 issues
+1 blocker
+1 critical
+3 major
+8 minor
-------------------------------------------
[INFO] Export issues to c:\Source\releases\vcmmigrationmgr\vcmmigrationmgr-app\target\sonar\sonar-report.json
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.933 s
[INFO] Finished at: 2017-04-25T10:59:46-05:00
[INFO] Final Memory: 100M/3582M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-cli) on project vcmmigrationmgr-app: Not authorized. Analyzing this project requires to be authenticated. Please provide the values of the properties sonar.login and sonar.password. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Edit: I removed "Execute Analysis" from the Anyone permission. I also removed
"-Dsonar.report.export.path=sonar-report.json" from the command. I do not understand why preview mode is requiring a user name and password. Is there any way to allow anonymous users to run in preview mode?

Error in Compilation of Maven Project

I am trying to create an Maven Endpoint project and while creating i am getting the following statement in windows command prompt:
Define value for property 'gcloud-version': ${gcloud.plugin.version}: :
Is there a specific version which i am supposed to enter?
When I tried giving default value, the project was created but later on when I tried compiling it, i got the following error in command prompt:
C:\projects\syncDb>mvn clean install
[INFO] Scanning for projects...
[ERROR]
[ERROR] Some problems were encountered while processing the POMs:
[ERROR] Resolving expression: '${gcloud.plugin.version}':
Detected the following recursive expression cycle in 'gcloud.plugin.version': [gcloud.plugin.version]
#[ERROR] Resolving expression: '${gcloud.plugin.version}':
Detected the followingrecursive expression cycle in 'gcloud.plugin.version': [gcloud.plugin.version]
#[ERROR] 'build.plugins.plugin.version' for com.google.appengine:gcloud-maven-plugin must be a valid version but is '${gcloud.plugin.version}'. # line 150, column 24
#[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.focusanything.syncDb:synchDb:1.0-SNAPSHOT(C:\projects\syncDb\pom.xml) has 3 errors
[ERROR] Resolving expression: '${gcloud.plugin.version}': Detected the following recursive expression cycle in 'gcloud.plugin.version': [gcloud.plugin.version] -> [Help 2]
[ERROR] Resolving expression: '${gcloud.plugin.version}': Detected the following recursive expression cycle in 'gcloud.plugin.version': [gcloud.plugin.version] -> [Help 2]
[ERROR] 'build.plugins.plugin.version' for com.google.appengine:gcloud-maven-plugin must be a valid version but is '${gcloud.plugin.version}'. # line 150, column 24
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the-eswitch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
:
Thank you in Advance
The gcloud.plugin.version represents the version of the gcloud-maven-plugin you want to use. The list of versions can be found at https://mvnrepository.com/artifact/com.google.appengine/gcloud-maven-plugin
The present version is 2.0.9.133.v201611104 so the correct xml element to use in pom.xml is
<gcloud.plugin.version>2.0.9.133.v201611104</gcloud.plugin.version>
I had the same error.
I took version from here https://cloud.google.com/sdk/downloads
and put it into pom.xml
<gcloud.plugin.version>117</gcloud.plugin.version>

Error [Help 1] Sakai 2.9.x installation

I follow this instructions at Sakai Development Environment Setup Walkthrough.
I used 2.9.x Sakai version.
At step 11-C :
Execute mvn -Pcafe clean install to build the minimal version (cafe)
of Sakai using maven.
I have an error :
[ERROR] Failed to execute goal on project kernel-deploy: Could not resolve depen
dencies for project org.sakaiproject:kernel-deploy:pom:2.9-SNAPSHOT: Could not f
ind artifact org.sakaiproject.entitybroker:entitybroker-assembly:zip:tomcat-over
lay:1.5.4-SNAPSHOT in sakai-maven2-snapshots (http://source.sakaiproject.org/mav
en2-snapshots) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :kernel-deploy
And I tried mvn clean install it gave me error.
Please Help to solve it .
The 'cafe' build profile of Sakai is no longer maintained. Just do a full build. When you have built everything then you can build individual modules that you modify and it will be quick.
The startup time of Sakai is now under 30 seconds so the cafe build doesn't really give much anymore (it used to when processors were slower, the build took an hour and the startup would take several minutes :)

Resources