Coder Social home page Coder Social logo

fxlauncher-gradle-plugin's People

Contributors

aalmiray avatar gyulavoros avatar jochenschmich avatar lion7 avatar ohkio avatar turekbot avatar wulf0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fxlauncher-gradle-plugin's Issues

Plugin fails to apply when using Gradle plugin repository

Tried using the new plugin DSL with the 1.0.18 plugin (now in the gradle repository, per #16).

plugins {
    id 'no.tornado.fxlauncher' version '1.0.18'
}

But I'm getting the following error:

...
Caused by: org.gradle.api.plugins.InvalidPluginException: An exception occurred applying plugin request [id: 'no.tornado.fxlauncher', version: '1.0.18']
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.exceptionOccurred(DefaultPluginRequestApplicator.java:247)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugin(DefaultPluginRequestApplicator.java:229)
	... 96 more
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'no.tornado.fxlauncher']
	at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:150)
	at org.gradle.api.internal.plugins.DefaultPluginManager.apply(DefaultPluginManager.java:125)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator$3.run(DefaultPluginRequestApplicator.java:151)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugin(DefaultPluginRequestApplicator.java:225)
	... 96 more
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'jar' for task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.
	at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:83)
	at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:61)
	at org.gradle.api.internal.tasks.DefaultTaskContainer_Decorated.getProperty(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:50)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
	at no.tornado.fxlauncher.gradle.FXLauncherPlugin.apply(FXLauncherPlugin.groovy:53)
	at no.tornado.fxlauncher.gradle.FXLauncherPlugin.apply(FXLauncherPlugin.groovy)
	at org.gradle.api.internal.plugins.ImperativeOnlyPluginTarget.applyImperative(ImperativeOnlyPluginTarget.java:42)
	at org.gradle.api.internal.plugins.RuleBasedPluginTarget.applyImperative(RuleBasedPluginTarget.java:50)
	at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:164)
	at org.gradle.api.internal.plugins.DefaultPluginManager.access$200(DefaultPluginManager.java:47)
	at org.gradle.api.internal.plugins.DefaultPluginManager$AddPluginBuildOperation.run(DefaultPluginManager.java:252)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
	at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:144)
	... 99 more

The old system of adding a buildscript dependency and calling "apply plugin" continues to work fine.

stopOnUpdateErrors not propagating correctly

Using plugin version 1.0.18. If I set:

fxLauncher {
    stopOnUpdateErrors = true
}

the resulting manifest has:

<parameters>--stopOnUpdateErrors</parameters>
...
<stopOnUpdateErrors>false</stopOnUpdateErrors>

Looks like the latter takes precedence.

scpOptions not working for Gradle Build

Hi edvin,

I am trying to use FXLauncher to build a launcher for my JavaFX application using Gradle. My build.gradle file current looks like this (Note: The actual URLs and domain names have been removed):

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'no.tornado:fxlauncher-gradle-plugin:1.0.17'
    }
}

plugins {
    id 'io.franzbecker.gradle-lombok' version '1.10'
    id 'java'
}

group 'com.example.admin'
version '1.0.0'

apply plugin: 'java'
apply plugin: 'no.tornado.fxlauncher'

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

fxlauncher {
    applicationUrl = 'https://adminapp.example.com/'
    applicationMainClass = 'com.example.admin.Main'
    applicationVendor = 'Example Vendor'
    applicationVersion = '1.0.0'
    acceptDowngrade = false
    deployTarget = '[email protected]:adminapp'
    scpOptions = ["-v"]
}

repositories {
    mavenLocal()
    mavenCentral()
}

dependencies {
    compile 'org.slf4j:slf4j-api:1.7.25'
    compile 'org.slf4j:slf4j-simple:1.7.25'
    compile 'org.xerial:sqlite-jdbc:3.19.3'
    compile 'org.apache.commons:commons-lang3:3.6'
}

Unfortunately, I am running into an issue when I try to run the Gradle deployApp task, which I do as follows:

./gradlew clean deployApp

That task actually runs fine because a build/fxlauncher directory is generated with all the artifacts and dependencies for the application inside of it, but when fxlauncher attempts to perform the SCP I see this error:

Execution failed for task ':deployApp'.
> scp exited with status 1

To verify that SCP was installed and working on my machine I copied a test file to the folder on my server and that worked without any issues. I then tried adding the scpOptions option to the build.gradle file, but no "verbose" output is displayed. I think if you can help me get that working, then I should be able to figure out the rest on my own. Thank you in advance.

Plugin functionality overview

Goals

The plugin must perform the following high level operations:

Copy dependencies

  • Bundle application jar and dependencies to staging directory
    • Copy all resolved artifacts to a staging directory

Create app.xml manifest

  • Generate app.xml from plugin properties and embed it inside fxlauncher.jar in the staging directory
    • Manifest is created by calling fxlauncher.CreateManifest.create(URI baseURI, String launchClass, Path stagingPath) (in-process if possible)

Deploy

  • Deploy the artifacts via scp or sftp
    • Possibly use jsch to perform the upload of all files in staging folder to configured destination (host, user, password, target-folder) or simply call out to scp

Create Native Installer

  • Generate native installer

compile files dependencies don't copy

It seems dependencies in the build.gradle that use the compile files() command do not copy over to the deployment.

dependencies { 
    compile files('U:/NP/Operational Planning/People/Thomas/maven_local/terajdbc4.jar')
    compile files('U:/NP/Operational Planning/People/Thomas/maven_local/tdgssconfig.jar')
    compile files('U:/NP/Operational Planning/People/Thomas/maven_local/ojdbc6.jar')
}

javapackager drop-in resources classpath

I've used the javapackager in other projects before, so I'd like to say I kind of know what I'm talking about—kind of.

The idea is convention over configuration. You put the drop-in resources in a certain spot and if they're where the javapackager expects them, it uses them instead of the default.

It appears, however, that the fxlauncher-gradle-plugin is missing an important step mentioned in the javapackager documentation: setting up the classpath (to match the gradle project structure).

In the documentation there's an example of setting up the classpath with an Ant task. We just need to do it with gradle... right?

I'm under the impression that putting the package directory right in the root of the project goes against the gradle project structure. But I'm closer to a gradle noob than I am a gradle expert. @aalmiray, you know a thing or two. Can you weigh in on where the package directory should be?

In the javafx-gradle-plugin, they've configured it to sit right next to the java directory

│    
└───src
    ├───main
    │   ├───deploy
    │   │   └───package
    │   │       └───windows
    │   ├───java
    │   └───resources
    └───test
        ├───java
        └───resources

To conform to how a gradle project should be, is that right? Or should it be elsewhere?

copyAppDependencies broken with latest Kotlin plugin

A project which is building fine with the 1.5.30 JVM plugin fails with 1.6.20 with the following error:

Execution failed for task ':copyAppDependencies'.
> Resolving dependency configuration 'runtime' is not allowed as it is defined as 'canBeResolved=false'.
  Instead, a resolvable ('canBeResolved=true') dependency configuration that extends 'runtime' should be resolved.

Presumably this is due to https://github.com/edvin/fxlauncher-gradle-plugin/blob/master/src/main/groovy/no/tornado/fxlauncher/gradle/CopyAppDependenciesTask.groovy#L29.

Maybe "runtimeClasspath" is the replacement, though I don't know if that is backwards compatible.

how can i make this?

How can i do this?
supply the javapackagerOptions parameter, which takes a List. Consult the JavaPackager docs for more information about possible parameters.

i have this, but is not working

image

image

New release?

Can you create a new release with the latest changes? Currently I'm using a locally built SNAPSHOT (which works fine) but this breaks the build on my cloud CI server ;)

Multi Project Build Failed to find applicationUrl

Hello while compiling muliti project build failed to find application url variable . after removing
//compile project(':CustomLauncher')
this line and
remove
include 'CustomLauncher'
from settings.gradle file and run it again without any problem.

here CustomLauncher module contain class files for custom ui

copyAppDependencies should not copy, if dependency has not changed

First, another thanks for the people who have tried to make this plugin great.

I'm using it for something at work—hence all the activity recently—so I'm willing to help where I can.

The ideal work-flow when launching with FXLauncher is thus:

Fix a bug.
Plugin copies over just the fixed dependency.
Clients will automatically pull down just the updated dependency.

However, the way things currently stand, the copyAppDependencies task copies all of the dependencies, regardless if they've been changed or not. This makes all of the dependencies update and defeats the purpose of having a granular auto-updater: with the current work-flow, the clients have to pull down the whole app every time there is an update.

This problem doesn't seem to occur in projects using Maven because the Maven Dependency Plugin takes into account whether dependencies need updating.

@aalmiray, how easy is it to check for the same file already being there before copying it over? Can you point me in the right direction? I'm a groovy noob, but I'd be happy to submit a PR.

Customized inno setup script

Hi!
I'm using fxlauncher for creating native installer for Windows. I need some customization of that process.
Are project files appName.iss, appName.ico, appName-setup-icon.bmp used?
I put them in "src/main/deploy/package/window" directory, but it seems they are not used.
Maybe there is another folder should be for that files?

Thanks.

on MacOS Mojave, i always get this error: Task :generateApplicationManifest FAILED

I have tried several different configs and such, and this is the closest to your example app.
Link:

> Task :generateApplicationManifest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateApplicationManifest'.
> com/sun/javafx/application/ParametersImpl

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
5 actionable tasks: 3 executed, 2 up-to-date
➜  ancilla 

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.