{"action":"created","issue":{"url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/issues/128","labels_url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/issues/128/comments","events_url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/issues/128/events","html_url":"https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues/128","id":87820416,"number":128,"title":"jfx:native goal does not respect jfxMainAppJarName","user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/labels/documentation%20needed","name":"documentation needed","color":"5319e7"},{"url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/labels/needs%20investigation","name":"needs investigation","color":"fef2c0"}],"state":"open","locked":false,"assignee":{"login":"FibreFoX","id":1042579,"avatar_url":"https://avatars.githubusercontent.com/u/1042579?v=3","gravatar_id":"","url":"https://api.github.com/users/FibreFoX","html_url":"https://github.com/FibreFoX","followers_url":"https://api.github.com/users/FibreFoX/followers","following_url":"https://api.github.com/users/FibreFoX/following{/other_user}","gists_url":"https://api.github.com/users/FibreFoX/gists{/gist_id}","starred_url":"https://api.github.com/users/FibreFoX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FibreFoX/subscriptions","organizations_url":"https://api.github.com/users/FibreFoX/orgs","repos_url":"https://api.github.com/users/FibreFoX/repos","events_url":"https://api.github.com/users/FibreFoX/events{/privacy}","received_events_url":"https://api.github.com/users/FibreFoX/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-06-12T18:58:48Z","updated_at":"2015-06-15T16:56:26Z","closed_at":null,"body":"Steps to reproduce:\r\n\r\n1.  Generate a sample project:\r\n\r\n    ```\r\n$ mvn archetype:generate -DinteractiveMode=false -DarchetypeGroupId=com.zenjava \\\r\n        -DarchetypeArtifactId=javafx-basic-archetype -DarchetypeVersion=2.0.1 \\\r\n        -DgroupId=foo -DartifactId=bar -Dversion=0.1.0-SNAPSHOT -DorganizationName=Org\r\n    ```\r\n\r\n2.  Replace the generated `javafx-maven-plugin` configuration with:\r\n\r\n    ```xml\r\n            <plugin>\r\n                <groupId>com.zenjava</groupId>\r\n                <artifactId>javafx-maven-plugin</artifactId>\r\n                <version>8.1.2</version>\r\n                <configuration>\r\n                    <mainClass>foo.MainApp</mainClass>\r\n                    <jfxMainAppJarName>Fubar</jfxMainAppJarName>\r\n                </configuration>\r\n            </plugin>\r\n    ```\r\n\r\n3.  Try to build:\r\n\r\n    ```\r\n$ mvn jfx:native\r\n...\r\n[INFO] --- javafx-maven-plugin:8.1.2:native (default-cli) @ bar ---\r\n[INFO] Building Native Installers\r\n/Users/curtis/t/bar/target/jfx/app/lib\r\n/Users/curtis/t/bar/target/jfx/app/lib/commons-lang-2.6.jar\r\n/Users/curtis/t/bar/target/jfx/app/lib/jcl-over-slf4j-1.6.1.jar\r\n/Users/curtis/t/bar/target/jfx/app/lib/log4j-1.2.16.jar\r\n/Users/curtis/t/bar/target/jfx/app/lib/miglayout-core-4.2.jar\r\n/Users/curtis/t/bar/target/jfx/app/lib/miglayout-javafx-4.2.jar\r\n/Users/curtis/t/bar/target/jfx/app/lib/slf4j-api-1.6.1.jar\r\n/Users/curtis/t/bar/target/jfx/app/lib/slf4j-log4j12-1.6.1.jar\r\n[INFO] Skipping Mac Application Image because of configuration error Main application jar is missing.\r\nAdvice to Fix: Make sure to use fx:jar task to create main application jar.\r\n[INFO] Skipping DMG Installer because of configuration error Main application jar is missing.\r\nAdvice to Fix: Make sure to use fx:jar task to create main application jar.\r\n[INFO] Skipping PKG Installer because of configuration error Main application jar is missing.\r\nAdvice to Fix: Make sure to use fx:jar task to create main application jar.\r\n[INFO] Skipping Mac App Store Ready Bundler because of configuration error Main application jar is missing.\r\nAdvice to Fix: Make sure to use fx:jar task to create main application jar.\r\n[INFO] ------------------------------------------------------------------------\r\n[INFO] BUILD SUCCESS\r\n[INFO] ------------------------------------------------------------------------\r\n    ```\r\n\r\n4.  App is present, but self-contained application is missing:\r\n\r\n    ```\r\n$ ls -R target/jfx\r\napp/\r\n\r\ntarget/jfx/app:\r\nFubar.jar  lib/\r\n\r\ntarget/jfx/app/lib:\r\ncommons-lang-2.6.jar      jcl-over-slf4j-1.6.1.jar  log4j-1.2.16.jar          miglayout-core-4.2.jar    miglayout-javafx-4.2.jar  slf4j-api-1.6.1.jar       slf4j-log4j12-1.6.1.jar\r\n    ```\r\n\r\nIs this a bug, or am I doing something wrong in the configuration?"},"comment":{"url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/issues/comments/112135933","html_url":"https://github.com/javafx-maven-plugin/javafx-maven-plugin/issues/128#issuecomment-112135933","issue_url":"https://api.github.com/repos/javafx-maven-plugin/javafx-maven-plugin/issues/128","id":112135933,"user":{"login":"ctrueden","id":556626,"avatar_url":"https://avatars.githubusercontent.com/u/556626?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrueden","html_url":"https://github.com/ctrueden","followers_url":"https://api.github.com/users/ctrueden/followers","following_url":"https://api.github.com/users/ctrueden/following{/other_user}","gists_url":"https://api.github.com/users/ctrueden/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrueden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrueden/subscriptions","organizations_url":"https://api.github.com/users/ctrueden/orgs","repos_url":"https://api.github.com/users/ctrueden/repos","events_url":"https://api.github.com/users/ctrueden/events{/privacy}","received_events_url":"https://api.github.com/users/ctrueden/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T16:56:26Z","updated_at":"2015-06-15T16:56:26Z","body":"@FibreFoX I am on Java 1.8.0_45.\r\n\r\nSo on Windows and/or Linux, when you follow my recipe above, it works as expected? You get a self-contained application generated?\r\n\r\nI did accidentally leave one thing out of my recipe: the `<finalName>` line must be removed from the generated POM as well. Sorry for that!\r\n\r\nI tried to dig into the `javafx-maven-plugin` code to fix the issue, but I got confused by the major terminology differences between the Maven, Ant and Java packager API. It looks like the Maven plugin calls the Java packager API, but mapping the Ant tasks' behavior onto that is pretty challenging. For example, as I described above, in the Ant tasks, you have to explicitly tell the `fx:jar` and `fx:deploy` tasks about the correct `fx:application` element which declares the `name` you want. I see that the `JarMojo` does call:\r\n```java\r\ncreateJarParams.setOutfile(jfxMainAppJarName);\r\n```\r\nBut nowhere in the `NativeMojo` could I find anything referencing the `jfxMainAppJarName`, an application object of any kind, or really anything that would lead me to believe the `NativeMojo` could possibly infer which app name is desired for packaging into the self-contained app. I guess it could just read it from the file system, but... it would make more sense to me if there were an API call for it like everything else."}}