FreePortFinder

A tiny library for finding free local ports

License

License

GroupId

GroupId

me.alexpanov
ArtifactId

ArtifactId

free-port-finder
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

FreePortFinder
A tiny library for finding free local ports
Project URL

Project URL

http://github.com/alexpanov/freeportfinder
Source Code Management

Source Code Management

http://github.com/alexpanov/freeportfinder

Download free-port-finder

How to add to project

<!-- https://jarcasting.com/artifacts/me.alexpanov/free-port-finder/ -->
<dependency>
    <groupId>me.alexpanov</groupId>
    <artifactId>free-port-finder</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/me.alexpanov/free-port-finder/
implementation 'me.alexpanov:free-port-finder:1.1.1'
// https://jarcasting.com/artifacts/me.alexpanov/free-port-finder/
implementation ("me.alexpanov:free-port-finder:1.1.1")
'me.alexpanov:free-port-finder:jar:1.1.1'
<dependency org="me.alexpanov" name="free-port-finder" rev="1.1.1">
  <artifact name="free-port-finder" type="jar" />
</dependency>
@Grapes(
@Grab(group='me.alexpanov', module='free-port-finder', version='1.1.1')
)
libraryDependencies += "me.alexpanov" % "free-port-finder" % "1.1.1"
[me.alexpanov/free-port-finder "1.1.1"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

freeportfinder

Build Status Maven Central

A micro Java library that does one thing and one thing only: finds a free local port (mainly) for testing purposes.

Finding a free local port is as easy as:

int port = FreePortFinder.findFreeLocalPort();

Which can then be used to set up local Jetty without hitting

java.net.BindException: Address already in use

Contributors

Shlomi Alfasi

Versions

Version
1.1.1
1.1.0
1.0