pippo-java / pippo

Micro Java Web Framework
http://www.pippo.ro
Apache License 2.0
787 stars 128 forks source link

Better detection of free port to bind to #637

Closed gkresic closed 1 year ago

gkresic commented 1 year ago

As requested in https://github.com/pippo-java/pippo/issues/632#issuecomment-1431320266

gkresic commented 1 year ago

@decebals Same error as for https://github.com/pippo-java/pippo/pull/636

Error:  Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.1.2184:sonar (sonar) on project pippo-pac4j: Project not found. Please check the 'sonar.projectKey' and 'sonar.organization' properties, the 'SONAR_TOKEN' environment variable, or contact the project administrator -> [Help 1]

mvn test and mvn verify are passing, so tests are probably OK, but GitHub Action runs mvn -B verify -Pcoverage,sonar which (I guess) requires credentials for SonarQube which (again, guess) should be somewhere within this project's secrets? Interestingly, tests for https://github.com/pippo-java/pippo/pull/635 passed - may it have something to do on who makes a PR?

mhagnumdw commented 1 year ago

Please see if it is possible to remove the constants MIN_PORT_NUMBER and MAX_PORT_NUMBER. Since within the classe themselves they are no longer used.

gkresic commented 1 year ago

Done, removed both constants and unused AvailablePortFinder.findAvailablePort(int, int)

mhagnumdw commented 1 year ago

Tks @gkresic !!