Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix jlink task #5032

Merged
merged 1 commit into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 39 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ project.ext.threeDotVersion = "5.0.0.0"
project.ext.install4jDir = hasProperty("install4jDir") ? getProperty("install4jDir") : (OperatingSystem.current().isWindows() ? 'C:/Program Files/install4j7' : 'install4j7')
sourceCompatibility = 9
targetCompatibility = 9
mainClassName = "$moduleName/org.jabref.JabRefMain"
mainClassName = "$moduleName/org.jabref.JabRefLauncher"

// TODO: Ugly workaround to temporarily ignore build errors to dependencies of latex2unicode
// These should be removed, as well as the files in the lib folder, as soon as they have valid module names
Expand Down Expand Up @@ -599,11 +599,44 @@ jlink {
addOptions("--bind-services")

forceMerge "javafx"
forceMerge "org.controlsfx.controls"
forceMerge "org.bouncycastle.provider"
forceMerge "java.xml.bind"

//forceMerge('log4j-api')
forceMerge "controlsfx", "bcprov", "jaxb", "javax", "istack", "stax", "log4j"

mergedModule {
requires 'java.logging';
requires 'jdk.xml.dom';
requires 'java.sql';
requires 'java.rmi';
requires 'java.xml';
requires 'com.sun.xml.txw2';
requires 'java.desktop';
requires 'java.security.jgss';
requires 'jdk.jsobject';
requires 'jdk.unsupported';
requires 'java.management';
requires 'java.naming';
requires 'jdk.unsupported.desktop';
requires 'java.security.sasl';
requires 'java.scripting';
requires 'java.datatransfer';
requires 'java.compiler';
requires 'java.transaction.xa';
requires 'com.sun.xml.fastinfoset';
requires 'org.slf4j';
uses 'com.airhacks.afterburner.injection.PresenterFactory';
uses 'org.controlsfx.glyphfont.GlyphFont';
uses 'com.airhacks.afterburner.views.ResourceLocator';
provides 'java.sql.Driver' with 'org.postgresql.Driver';
provides 'org.controlsfx.glyphfont.GlyphFont' with 'org.controlsfx.glyphfont.FontAwesome';
provides 'org.apache.commons.logging.LogFactory' with 'org.apache.logging.log4j.jcl.LogFactoryImpl';
provides 'org.slf4j.spi.SLF4JServiceProvider' with 'org.apache.logging.slf4j.SLF4JServiceProvider';
provides 'javax.annotation.processing.Processor' with 'org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor';
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ServerProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyServerProvider';
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.NameResolverProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.internal.DnsNameResolverProvider';
provides 'java.security.Provider' with 'org.bouncycastle.jce.provider.BouncyCastleProvider',
'org.bouncycastle.pqc.jcajce.provider.BouncyCastlePQCProvider';
provides 'com.microsoft.applicationinsights.core.dependencies.io.grpc.ManagedChannelProvider' with 'com.microsoft.applicationinsights.core.dependencies.io.grpc.netty.shaded.io.grpc.netty.NettyChannelProvider';
}

}

jmh {
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/org/jabref/JabRefLauncher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.jabref;

/**
* JabRef Launcher
*/
public class JabRefLauncher {
public static void main(String[] args) {
JabRefMain.main(args);
}
}
2 changes: 1 addition & 1 deletion src/main/java/org/jabref/gui/util/ThemeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private void addAndWatchForChanges(Scene scene, URL cssFile, int index) {
});
}
}
} catch (IOException | URISyntaxException e) {
} catch (IOException | URISyntaxException | UnsupportedOperationException e) {
LOGGER.error("Could not watch css file for changes " + cssFile, e);
}
}
Expand Down