Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
forked from4thline/cling

UPnP/DLNA library for Java

License

NotificationsYou must be signed in to change notification settings

jupnp/jupnp

 
 

Repository files navigation

GitHub Actions Build StatusGitHub Actions Website StatusCDDL-1.0Maven CentralJavadocs

Introduction

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

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

Additional documentation is available onwww.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 itas easy as possible to get up to speed. If you know Maven already thenthere won't be any surprises for you. If you have not worked with Mavenyet, 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)
  • runmvn clean install to compile and package all sources

The build result will be available in the foldertarget.

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

OptionDescription
-DskipTestsSkip the execution of tests
-Dmaven.test.skip=trueSkip the compilation and execution of tests
-Dmaven.javadoc.skip=trueSkip the creation of Javadoc JARs
-Dmaven.source.skip=trueSkip the creation of source code JARs
-Dlicense.skip=trueSkip the license header checks
-Dsort.skip=trueSkip the POM sort order checks
-Dspotless.check.skip=trueSkip the Spotless code style checks
-T 1CBuild 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 incodestyle.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 ofitest.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 ineclipse.ini.Otherwise m2e might fail to resolve the system scoped dependency totools.jar.


[8]ページ先頭

©2009-2025 Movatter.jp