Code Monkey home page Code Monkey logo

jupnp's Introduction

GitHub Actions Build Status GitHub Actions Website Status CDDL-1.0 Maven Central Javadocs

Introduction

jUPnP is a Java UPnP library and has been forked from the no-longer maintained Cling project.

You can use jUPnP in your code by adding a dependency on it. See the Maven, Gradle etc. dependency examples on Maven Central.

Additional documentation is available on www.jupnp.org.

Build Instructions

Building and running the project is fairly easy if you follow the steps detailed below.

Prerequisites

The build infrastructure is based on Maven in order to make it as easy as possible to get up to speed. If you know Maven already then there won't be any surprises for you. If you have not worked with Maven yet, just follow the instructions and everything will miraculously work ;-)

What you need before you start:

Make sure that the "mvn" command is available on your path

Checkout

Checkout the source code from GitHub, e.g. by running:

git clone https://github.com/jupnp/jupnp.git

Building with Maven

To build jUPnP from the sources, Maven takes care of everything:

  • change into the jupnp directory (cd jupnp)
  • run mvn clean install to compile and package all sources

The build result will be available in the folder target.

To improve build times you can add the following options to the command:

Option Description
-DskipTests Skip the execution of tests
-Dmaven.test.skip=true Skip the compilation and execution of tests
-Dmaven.javadoc.skip=true Skip the creation of Javadoc JARs
-Dmaven.source.skip=true Skip the creation of source code JARs
-Dlicense.skip=true Skip the license header checks
-Dsort.skip=true Skip the POM sort order checks
-Dspotless.check.skip=true Skip the Spotless code style checks
-T 1C Build in parallel, using 1 thread per core

For example you can skip tests and the Spotless checks during development with:

mvn clean install -DskipTests -Dspotless.check.skip=true

Adding these options improves the build time but could hide problems in your code. Parallel builds are also less easy to debug and the increased load may cause timing sensitive tests to fail.

Code style

The code style used by jUPnP is available as an Eclipse XML configuration in codestyle.xml. To use this configuration while coding, import the code style configuration into an IDE such as Eclipse or IntelliJ.

To check if your code is following the code style run:

mvn spotless:check

To reformat your code so it conforms to the code style you can run:

mvn spotless:apply

Integration tests

The OSGi integration tests in the "itests" directory use specific versions of bundles in the runbundles of itest.bndrun. You may need to update these runbundles after creating a new jupnp release or when changing dependencies. Maven can resolve the runbundles automatically by executing:

mvn clean install -DwithResolver

Working with Eclipse

When using Eclipse ensure that the JDK is set via the -vm option in eclipse.ini. Otherwise m2e might fail to resolve the system scoped dependency to tools.jar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.