Bug 153403 - [JavaWebStart] a chance to remove offline-allowed property from jnlp on automated build
Summary: [JavaWebStart] a chance to remove offline-allowed property from jnlp on autom...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2006-08-10 04:28 EDT by Michael Seele CLA
Modified: 2007-04-19 22:04 EDT (History)
0 users

See Also:


Attachments
org.eclipse.pde.internal.build.tasks.JNLPGenerator patch (1.56 KB, patch)
2006-09-07 08:47 EDT, Michael Seele CLA
no flags Details | Diff
org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask patch (2.57 KB, patch)
2006-09-07 08:48 EDT, Michael Seele CLA
no flags Details | Diff
org.eclipse.pde.internal.build.AssembleConfigScriptGenerator patch (1.07 KB, patch)
2006-09-07 08:48 EDT, Michael Seele CLA
no flags Details | Diff
org.eclipse.pde.internal.build.builder.FeatureBuildScriptGenerator patch (1.32 KB, patch)
2006-09-07 08:49 EDT, Michael Seele CLA
no flags Details | Diff
org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask patch (947 bytes, patch)
2006-09-07 08:50 EDT, Michael Seele CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Seele CLA 2006-08-10 04:28:59 EDT
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?
Comment 1 Pascal Rapicault CLA 2006-09-06 09:13:52 EDT
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?
Comment 2 Michael Seele CLA 2006-09-06 09:28:25 EDT
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.
Comment 3 Pascal Rapicault CLA 2006-09-06 10:17:55 EDT
Because of the implication it has on the behavior, I don't think the change to writePrologue should be released in HEAD.
Comment 4 Michael Seele CLA 2006-09-06 10:27:09 EDT
whouldn't my proposed solution have a smaller impact on the behaviour than a template driven solution?
Comment 5 Pascal Rapicault CLA 2006-09-06 11:00:20 EDT
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" :).
Comment 6 Michael Seele CLA 2006-09-07 04:19:07 EDT
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.
Comment 7 Michael Seele CLA 2006-09-07 08:36:16 EDT
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.
Comment 8 Pascal Rapicault CLA 2006-09-07 08:41:43 EDT
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" :-)
Comment 9 Michael Seele CLA 2006-09-07 08:47:46 EDT
Created attachment 49602 [details]
org.eclipse.pde.internal.build.tasks.JNLPGenerator patch
Comment 10 Michael Seele CLA 2006-09-07 08:48:16 EDT
Created attachment 49603 [details]
org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask patch
Comment 11 Michael Seele CLA 2006-09-07 08:48:53 EDT
Created attachment 49604 [details]
org.eclipse.pde.internal.build.AssembleConfigScriptGenerator patch
Comment 12 Michael Seele CLA 2006-09-07 08:49:24 EDT
Created attachment 49605 [details]
org.eclipse.pde.internal.build.builder.FeatureBuildScriptGenerator patch
Comment 13 Michael Seele CLA 2006-09-07 08:50:49 EDT
Created attachment 49606 [details]
org.eclipse.pde.internal.build.tasks.JNLPGeneratorTask patch
Comment 14 Michael Seele CLA 2006-09-07 08:55:25 EDT
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! :-)
Comment 15 DJ Houghton CLA 2007-04-18 14:35:30 EDT
Investigate for 3.3.
Comment 16 Pascal Rapicault CLA 2007-04-19 22:04:57 EDT
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.