Community
Participate
Working Groups
i use the automated build system to deploy my rcp-jws application. how can i avoid the property <offline-allowed/> from the generated jnlp files?
There are no options to remove this. The only workaround is to edit and recompile the method writePrologue in the JNLPGenerator class. Ideally this file could be generated from a template that users could change. Would you have cycles to implement something like this?
I should have time to make the change in writePrologue (just like with codebase e.g. build.properties -> jnlp.offlineAllowed = true). would that work for you? a template driven approach would be nice but I doubt I'll have time for that.
Because of the implication it has on the behavior, I don't think the change to writePrologue should be released in HEAD.
whouldn't my proposed solution have a smaller impact on the behaviour than a template driven solution?
With the template approach, users who like the current settings would not see any change since the default template provided would generate the exact same content than what JNLPGenerator does today (People knowning what they are doing would be able to specify another template). Whereas with the change to the method in jnlpgenerator users would not have the ability to get what used to be generated and they would likely enter a bug saying "a chance to ADD offline-allowed property from jnlp on automated build" :).
but where's the problem with a (optionally) build.properties setting? if there is a setting it will be used and if there is no setting online-allowed is used as default. example: [no setting] -> online-allowed jnlp.onlineAllowed = true -> online-allowed jnlp.offlineAllowed = false -> offline-allowed there's no change for the users in the new version. only the users who know what they want/do can change it. imho a template would be nice, too. but i doubt i'll have time for that.
ok, i just created a implementation for the "bug". it is based on defining the state in the build.properties file. now you can decide if you want to use this solution or integrate another. please notice that i've changed the values from online-allowed to offline-allowed cause in jnlp it's also defined with offline-allowed. forget my example in the previous comment! now see: [no setting in build.properties] -> offline is allowed offline-allowed = true -> offline is allowed offline-allowed = false -> offline is not allowed(remove line in jnlp) please see my attached patches.
The problem with this solution is that it does not scale very well as we will need more options as more people will want to customize the content of the file. Moreover it does not respect our motto "stay of the middle when you get" :-)
Created attachment 49602 [details] org.eclipse.pde.internal.build.tasks.JNLPGenerator patch
Created attachment 49603 [details] org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask patch
Created attachment 49604 [details] org.eclipse.pde.internal.build.AssembleConfigScriptGenerator patch
Created attachment 49605 [details] org.eclipse.pde.internal.build.builder.FeatureBuildScriptGenerator patch
Created attachment 49606 [details] org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask patch
you're right! but as I said before, I don't have time for a template driven solution! :-( maybe this solution is better than no one, but it's ok if you don't use it and wait for a template solution. thanks anyway for attending this problem! :-)
Investigate for 3.3.
I have released a slightly modified version of the patch in HEAD. I have opened the bug #183303 to keep track of the need for a template in this area.