[jitsi-dev] [jitsi-videobridge] General build improvements (#165)


#1

With this PR we have these improvements:

- creation of a single jar containing all the dependencies required by JVB;

- the jar will contain in the manifest the SHA-1 taken from the last commit;

- the distributable package will contain a reference to the SHA-1 in the filename, and also an empty _sip-communicator.properties_ file useful to eventually configure some parameters for libjitsi or JVB;

NOTES:

- I tested only the linux-x64 package since I don't have Windows or Mac OSX machines available;

- During the package process, the Maven shade plugins signals some overlapping classes in the dependencies:
[WARNING] xmlpull-1.1.3.4a.jar, xpp3-1.1.4c.jar define 4 overlapping classes:
[WARNING] - org.xmlpull.v1.XmlPullParserException
[WARNING] - org.xmlpull.v1.XmlSerializer
[WARNING] - org.xmlpull.v1.XmlPullParser
[WARNING] - org.xmlpull.v1.XmlPullParserFactory
[WARNING] slf4j-simple-1.6.1.jar, slf4j-jdk14-1.7.7.jar define 3 overlapping classes:
[WARNING] - org.slf4j.impl.StaticMarkerBinder
[WARNING] - org.slf4j.impl.StaticLoggerBinder
[WARNING] - org.slf4j.impl.StaticMDCBinder
[WARNING] org.apache.felix.framework-4.4.0.jar, org.apache.felix.main-4.4.0.jar define 163 overlapping classes:
[WARNING] - org.osgi.framework.namespace.PackageNamespace
[WARNING] - org.osgi.framework.hooks.bundle.CollisionHook
[WARNING] - org.apache.felix.framework.BundleRevisionDependencies
[WARNING] - org.apache.felix.framework.util.WeakZipFileFactory$WeakZipFile
[WARNING] - org.apache.felix.framework.cache.Content
[WARNING] - org.apache.felix.framework.util.VersionRange
[WARNING] - org.apache.felix.framework.PackageAdminImpl$2
[WARNING] - org.apache.felix.framework.ServiceRegistrationImpl$ServiceFactoryPrivileged
[WARNING] - org.apache.felix.framework.FrameworkStartLevelImpl$1
[WARNING] - org.apache.felix.framework.util.EventDispatcher$3
[WARNING] - 153 more...
[WARNING] jitsi-lgpl-dependencies-1.0-SNAPSHOT.jar, libjitsi-1.0-SNAPSHOT.jar define 4 overlapping classes:
[WARNING] - org.jitsi.impl.neomedia.codec.FFmpeg
[WARNING] - org.jitsi.util.JNIUtils
[WARNING] - org.jitsi.impl.neomedia.codec.audio.g722.JNIEncoder
[WARNING] - org.jitsi.impl.neomedia.codec.audio.g722.JNIDecoder
[WARNING] org.apache.felix.framework-4.4.0.jar, org.osgi.core-4.3.1.jar, org.apache.felix.main-4.4.0.jar define 82 overlapping classes:
[WARNING] - org.osgi.framework.AdminPermission$1
[WARNING] - org.osgi.framework.FrameworkUtil$FilterImpl$Parser
[WARNING] - org.osgi.framework.Bundle
[WARNING] - org.osgi.framework.FrameworkUtil$DNChainMatching
[WARNING] - org.osgi.framework.launch.FrameworkFactory
[WARNING] - org.osgi.framework.PackagePermission
[WARNING] - org.osgi.framework.hooks.service.EventHook
[WARNING] - org.osgi.framework.AdaptPermissionCollection
[WARNING] - org.osgi.framework.ServicePermission$1
[WARNING] - org.osgi.framework.FrameworkUtil
[WARNING] - 72 more...
[WARNING] core-2.0.0.jar, tinder-1.2.3.jar define 17 overlapping classes:
[WARNING] - org.jivesoftware.util.FastDateFormat$UnpaddedNumberField
[WARNING] - org.jivesoftware.util.FastDateFormat$TimeZoneDisplayKey
[WARNING] - org.jivesoftware.util.FastDateFormat$Rule
[WARNING] - org.jivesoftware.util.FastDateFormat$TwoDigitMonthField
[WARNING] - org.jivesoftware.util.FastDateFormat$NumberRule
[WARNING] - org.jivesoftware.util.FastDateFormat$Pair
[WARNING] - org.jivesoftware.util.FastDateFormat$TwoDigitYearField
[WARNING] - org.jivesoftware.util.FastDateFormat$UnpaddedMonthField
[WARNING] - org.jivesoftware.util.FastDateFormat$TwoDigitNumberField
[WARNING] - org.jivesoftware.util.FastDateFormat$TwelveHourField
[WARNING] - 7 more...

I checked these dependencies and it seems that the version in the final jar is the right one, and JVB is working without issues.

You can view, comment on, or merge this pull request online at:

  https://github.com/jitsi/jitsi-videobridge/pull/165

-- Commit Summary --

  * Automatically call clean goal before build.
  * Added maven shade plugin to create an executable jar with all dependencies.
  * Use buildnumber plugin to get the commit SHA-1 to identify the current build.
  * Put the git SHA-1 in the jar manifest using maven-jar plugin.
  * Added the git SHA-1 string to the package filename.
  * Remove dependencySets from assembly files, now all dependencies are already included in the jar.
  * Use tar.gz instead of zip format for the linux packages.
  * Not include the original jar in the package.
  * Empty properties file for Jitsi Videobridge and libjitsi parameters.
  * Use Use SC_HOME_DIR_LOCATION variable to configure the home directory.
  * Include the .sip-communicator directory in the package.
  * Avoid the creation of dependency-reduced-pom.xml file in the project directory.

-- File Changes --

    A .sip-communicator/sip-communicator.properties (3)
    M pom.xml (78)
    M resources/install/linux-64/jvb.sh (2)
    M resources/install/linux/jvb.sh (2)
    M resources/install/macosx/jvb.sh (2)
    M src/assembly/linux-x64-bin-archive.xml (17)
    M src/assembly/linux-x86-bin-archive.xml (17)
    M src/assembly/macosx-bin-archive.xml (15)
    M src/assembly/windows-x64-bin-archive.xml (15)
    M src/assembly/windows-x86-bin-archive.xml (8)

-- Patch Links --

https://github.com/jitsi/jitsi-videobridge/pull/165.patch
https://github.com/jitsi/jitsi-videobridge/pull/165.diff

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165


#2

Hi, thanks for your contribution!
If you haven't already done so, could you please make sure you sign our CLA (https://jitsi.org/icla for individuals and https://jitsi.org/ccla for corporations)? We would unfortunately be unable to merge your patch unless we have that piece :(.

···

---
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#issuecomment-195375648


#3

Thank you for the contribution! Please disregard the message above, we do have the CLA.

I haven't looked at all the changes, but the change from zip to tgz worries me. I would be all for it, were it not for existing infrastructure and scripts people use, which assume a zip. :frowning:

If the commits could be split into multiple PRs that would make it easier to review and merge.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#issuecomment-196970906


#4

You're right this could break some existing infrastructure.
I'll revert this change and split the overall commits into multiple PRs.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#issuecomment-197339717


#5

Closed #165.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#event-591890446


#6

Reopened #165.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#event-591891237


#7

I'm going to create 3 separate PRs.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#issuecomment-197385769


#8

Closed #165.

···

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jitsi/jitsi-videobridge/pull/165#event-592015081