OK, here is what i have so far. I have done very little 'realistic' testing, only making sure things get signed and the .jnlp file looks correct. Will do more testing this week. IF there are any otu there now that can beta test this, I would be much obliged. Please find the plugin at http://sqlviewer.sf.net/maven-jnlp-plugin-1.0.zip
Once extracted, run 'maven plugin:install' Then, in your project, you can run 'maven jnlp'. Here is what you have to do. Below is a sample of the properties the plugin looks for, most are self explanatory in you know JNLP. ## JNLP Specific stuff maven.jnlp.offline.allowed=false maven.jnlp.http.codebase=http://localhost maven.jnlp.j2se.version=1.3 maven.jnlp.vendor=Genscape maven.jnlp.homepage=http://www.genscape.com maven.jnlp.description.short=AlertGUI (short desc) maven.jnlp.permission.all=true maven.jnlp.signjar.alias=genscape maven.jnlp.signjar.storepass=genscape maven.jnlp.signjar.store=store maven.jnlp.isapplet=false maven.jnlp.applet.name=Applet #can have up to five of these maven.jnlp.property.name.0=foo maven.jnlp.property.value.0=bar maven.jnlp.property.name.1=bar maven.jnlp.property.value.1=baz maven.jnlp.mainclass=com.genscape.gui.alerts.AlertManagementInterface #can have up to five of these maven.jnlp.mainclass.argument.1=foo maven.jnlp.mainclass.argument.2=bar maven.jnlp.mainclass.argument.3=baz The resources for the .jnlp file are derived from the POM. You must do this to the dependency to get it included. <dependency> <id>jclass</id> <jar>jcschart110K.jar</jar> <properties> <jnlp.jar>true</jnlp.jar> </properties> </dependency> If the store provided in the properties file existis, it will attempt to sign the jars, with the above property using the given alias and password. Everything ends up in a directory 'target/jnlp' You should be able to upload that directory to your webserver and go. TODO - better handling of attributes. - better handling of properties - better handling of arguments - allow for packaging up all generated files for easier upload. - documentation, docuemtnation, docuemntation Jim On Sun, 29 Sep 2002, Jim Birchfield wrote: > OK, I settled on a not so elegant solution. For properties and arguments, > I limit the number you can have to 5 each. You can set these as follows: > > maven.jnlp.property.name.0=foo > maven.jnlp.property.value.0=bar > This will product > <property name="foo" value="bar"/> > > You can alos have up to five arguments for the main class. You specify > them in much the same manner: > > maven.jnlp.mainclass.argument.0=foo > maven.jnlp.mainclass.argument.1=bar > > Works for now. > > Jim > > On Sun, 29 Sep 2002, Jim Birchfield wrote: > > > Well, I will work on this more tomorrow. Have an early day coming up. > > The plugin is close to complete. If i would just settle to say some > > things have to be added after generation, then it could be done, but I am > > stubborn. Maybe that is what I do for a 1.0 release, then work on getting > > it better for 1.1. We'll see. I will have something to post tomorrow > > regardless. > > > > Dion, thanks for all the help... > > > > Jim > > > > On Sun, 29 Sep 2002, Jim Birchfield wrote: > > > > > <j:forEach begin="0" end="${maven.jnlp.property.number}" step="1" > > > indexVar="i"> > > > <j:set var="propname" value='maven.jnlp.property.name.${i}'/> > > > <property name="${context.getVariable('${propname}')}" value="${propvalue}"/> > > > <property name="${context.getVariable('maven.jnlp.property.name.0')}" > > > value="${propvalue}"/> > > > </j:forEach> > > > > > > The first property tag prints '<property name="" .../> > > > The second works correctly. It looks like $context.getVariable does not > > > interpolate a given variable, it takes it literal. > > > > > > Jim > > > > > > On Sun, 29 Sep 2002, Jim Birchfield wrote: > > > > > > > Working on that angle...still a few issues...here is What I have so > > > > far...no luck: > > > > > > > > <j:forEach begin="0" end="${maven.jnlp.property.number}" step="1" indexVar="i"> > > > > <j:set var="propname" value='maven.jnlp.property.name.${i}'/> > > > > <j:set var="propvalue" >value="${context.getVariable('maven.jnlp.property.value.${i}')}"/> > > > > <property name="${context.getVariable('maven.jnlp.property.name.${i}')}" > > > > value="${propvalue}"/> > > > > </j:forEach> > > > > > > > > ${propval} returns the literal 'maven.jnlp.property.value.1' > > > > > > > > Now the forEach works, but I cannot get the actual value from the > > > > property...still working > > > > > > > > On Mon, 30 Sep 2002 [EMAIL PROTECTED] wrote: > > > > > > > > > <j:set var="name" value="value" /> > > > > > -- > > > > > dIon Gillard, Multitask Consulting > > > > > Work: http://www.multitask.com.au > > > > > Developers: http://adslgateway.multitask.com.au/developers > > > > > > > > > > > > > > > Jim Birchfield <[EMAIL PROTECTED]> wrote on 30/09/2002 11:07:59 AM: > > > > > > > > > > > OK, I might have a solution just using Jelly, and no custom code. Is > > > > > > there anyway to dynamically create a property? For instance, I have the > > > > > > following: > > > > > > > > > > > > maven.jnlp.property.value.1=foo > > > > > > > > > > > > and I have a forEach with an index variable of i. > > > > > > > > > > > > I am trying to do something like: ${maven.jnlp.property.value.${i}} > > > > > > > > > > > > However, this won't work. Is there something built in like an 'eval' > > > > > > statement? > > > > > > > > > > > > Jim > > > > > > > > > > > > On Sun, 29 Sep 2002, Jim Birchfield wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > On Mon, 30 Sep 2002 [EMAIL PROTECTED] wrote: > > > > > > > > > > > > > > > Jim Birchfield <[EMAIL PROTECTED]> wrote on 30/09/2002 09:37:18 AM: > > > > > > > > > > > > > > > > > Can I have something likke this? > > > > > > > > > > > > > > > > > > maven.jnlp.property=foo,bar > > > > > > > > > maven.jnlp.property=foo.baz > > > > > > > > > maven.jnlp.property=bar.baz > > > > > > > > > > > > > > > > Well, no, because properties are like variables - the name must be > > > > > unique. > > > > > > > > The above simply assigns three different values to the same property > > > > > > > > 'maven.jnlp.property' in sequence. > > > > > > > > > > > > > > That's what I thought, but thought you had something in mind...;-) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > then somehow do > > > > > > > > > for allProperties { > > > > > > > > > handle prop? > > > > > > > > > } > > > > > > > > > > > > > > > > > > If possible, can you send me soemthing showing how to do this? > > > > > > > > > > > > > > > > How about you tell me what you're trying to do, and we try working > > > > > out a > > > > > > > > way of doing it. > > > > > > > > > > > > > > What I need to do is allow people to put a variable number of things > > > > > in > > > > > > > the properties file(or somewhere. The best (but ugly) solution I have > > > > > is > > > > > > > something like this: > > > > > > > > > > > > > > maven.jnlp.property.number=2 > > > > > > > maven.jnlp.property.name.1=foo > > > > > > > maven.jnlp.property.value.1=bar > > > > > > > maven.jnlp.property.name.2=bar > > > > > > > maven.jnlp.property.value.2=baz > > > > > > > > > > > > > > Then write a Jelly tag that looks similar to: > > > > > > > > > > > > > > <jnlp:propertyIterator > > > > > > > propertyName="maven.jnlp.property"/> > > > > > > > > > > > > > > And this tag looked up $propertyName.number, loops over > > > > > $propertyName.name > > > > > > > and $propertyName.value and printed out the appropriate tag. > > > > > > > > > > > > > > I remember doing some serious ugly stuff in properties files several > > > > > years > > > > > > > ago, hence my appreciation for XML based property files. > > > > > > > > > > > > > > Do you see a better approach for this? > > > > > > > > > > > > > > Jim > > > > > > > > > > > > > > > > > > > > > > > > Thanks! > > > > > > > > > > > > > > > > > > Jim > > > > > > > > -- > > > > > > > > dIon Gillard, Multitask Consulting > > > > > > > > Work: http://www.multitask.com.au > > > > > > > > Developers: http://adslgateway.multitask.com.au/developers > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > To unsubscribe, e-mail: <mailto:turbine-maven-user- > > > > > > [EMAIL PROTECTED]> > > > > > > > > For additional commands, e-mail: <mailto:turbine-maven-user- > > > > > > [EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > To unsubscribe, e-mail: <mailto:turbine-maven-user- > > > > > > [EMAIL PROTECTED]> > > > > > > > For additional commands, e-mail: <mailto:turbine-maven-user- > > > > > > [EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > To unsubscribe, e-mail: <mailto:turbine-maven-user- > > > > > > [EMAIL PROTECTED]> > > > > > > For additional commands, e-mail: <mailto:turbine-maven-user- > > > > > > [EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > > > > > -- > > > > > To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > > For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > > > > > > -- > > > > To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > > > > > > -- > > > To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> > > > For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > > > > > > > > > -- > > To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> > > For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
