You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by David Blevins <da...@visi.com> on 2009/03/08 07:22:58 UTC
Applet example
The applet example should be able to setup the keystore and keys if
they don't exist. Seems we're also using the 3.1 version of the
client which is going to break eventually when the protocol changes.
We'll need to figure out a way to get that on whatever the current
version is.
Not a super high priority but something we'll want to clear up before
we release 3.1.1.
-David
Re: Applet example
Posted by Karan Malhi <ka...@gmail.com>.
Thank you Fredrik
On Tue, Mar 10, 2009 at 9:38 AM, Fredrik Jonson <fr...@myrealbox.com>wrote:
> Kevan Miller wrote:
>
> > To maintain appropriate licensing, patches should be submitted via
> > Jira using attach file (with the "Grant license to ASF for inclusion
> > in ASF works (as per the Apache License §5)" button checked.
>
> Oups. Here we go...
>
> https://issues.apache.org/jira/browse/OPENEJB-1008
>
> Hopes that makes everyone happy. =)
>
> --
> Fredrik Jonson
>
>
--
Karan Singh Malhi
Re: Applet example
Posted by Kevan Miller <ke...@gmail.com>.
On Mar 10, 2009, at 9:38 AM, Fredrik Jonson wrote:
> Kevan Miller wrote:
>
>> To maintain appropriate licensing, patches should be submitted via
>> Jira using attach file (with the "Grant license to ASF for inclusion
>> in ASF works (as per the Apache License §5)" button checked.
>
> Oups. Here we go...
>
> https://issues.apache.org/jira/browse/OPENEJB-1008
>
> Hopes that makes everyone happy. =)
:)
Thanks Fredrik.
--kevan
Re: Applet example
Posted by Fredrik Jonson <fr...@myrealbox.com>.
Kevan Miller wrote:
> To maintain appropriate licensing, patches should be submitted via
> Jira using attach file (with the "Grant license to ASF for inclusion
> in ASF works (as per the Apache License §5)" button checked.
Oups. Here we go...
https://issues.apache.org/jira/browse/OPENEJB-1008
Hopes that makes everyone happy. =)
--
Fredrik Jonson
Re: Applet example
Posted by Karan Malhi <ka...@gmail.com>.
Kevan,
Thanks for pointing this out.
On Tue, Mar 10, 2009 at 7:40 AM, Kevan Miller <ke...@gmail.com>wrote:
>
> On Mar 10, 2009, at 4:25 AM, Karan Malhi wrote:
>
> Fredrik,
>>
>> This is an awesome patch. Thank you very much!
>> Have committed your patch.
>>
>
> Karan,
> To maintain appropriate licensing, patches should be submitted via Jira
> using attach file (with the "Grant license to ASF for inclusion in ASF works
> (as per the Apache License §5)" button checked.
>
> --kevan
>
>
--
Karan Singh Malhi
Re: Applet example
Posted by Kevan Miller <ke...@gmail.com>.
On Mar 10, 2009, at 4:25 AM, Karan Malhi wrote:
> Fredrik,
>
> This is an awesome patch. Thank you very much!
> Have committed your patch.
Karan,
To maintain appropriate licensing, patches should be submitted via
Jira using attach file (with the "Grant license to ASF for inclusion
in ASF works (as per the Apache License §5)" button checked.
--kevan
Re: Applet example
Posted by Karan Malhi <ka...@gmail.com>.
Fredrik,
This is an awesome patch. Thank you very much!
Have committed your patch.
On Mon, Mar 9, 2009 at 6:21 PM, Fredrik Jonson <fr...@myrealbox.com>wrote:
> Hi,
>
> I hope the following patch solves a bit of your problem. It changes
> the dependency plugin configuration to copy the artifacts to the
> target path instead of the source path. Secondly it uses the
> destFileName parameter to make the final name of the copied artifacts
> versionless.
>
> I also think you can solve the version number issue by declaring a
> parent pom in the project and then use ${project.parent.version}
> instead of the fixed 3.1 in both the dependency and the dependency
> plugin sections. Not too confident to what extent that option is
> what you want though, so I've left that out here...
>
> Index: examples/webapps/applet/src/main/webapp/index.jsp
> ===================================================================
> --- examples/webapps/applet/src/main/webapp/index.jsp (revision 751861)
> +++ examples/webapps/applet/src/main/webapp/index.jsp (working copy)
> @@ -19,7 +19,7 @@
> <body>
> <applet alt="could not load applet" height="100" width="300"
> codebase="."
> - archive="app.jar,javaee-api-5.0-1.jar,openejb-client-3.1.jar"
> + archive="app.jar,javaee-api.jar,openejb-client.jar"
> code="org.superbiz.applet.CalculatorApplet">
> </applet>
> </body>
> Index: examples/webapps/applet/pom.xml
> ===================================================================
> --- examples/webapps/applet/pom.xml (revision 751861)
> +++ examples/webapps/applet/pom.xml (working copy)
> @@ -79,10 +79,10 @@
> </goals>
> <configuration>
> <tasks>
> - <jar destfile="src/main/webapp/app.jar"
> basedir="target/classes"/>
> - <signjar jar='src/main/webapp/app.jar' alias="mykey"
> storepass="openejb"/>
> - <signjar jar='src/main/webapp/openejb-client-3.1.jar'
> alias="mykey" storepass="openejb"/>
> - <signjar jar='src/main/webapp/javaee-api-5.0-1.jar'
> alias="mykey" storepass="openejb"/>
> + <jar
> destfile="${project.build.directory}/${project.build.finalName}/app.jar"
> basedir="target/classes"/>
> + <signjar
> jar="${project.build.directory}/${project.build.finalName}/app.jar"
> alias="mykey" storepass="openejb"/>
> + <signjar
> jar="${project.build.directory}/${project.build.finalName}/openejb-client.jar"
> alias="mykey" storepass="openejb"/>
> + <signjar
> jar="${project.build.directory}/${project.build.finalName}/javaee-api.jar"
> alias="mykey" storepass="openejb"/>
> </tasks>
> </configuration>
> </execution>
> @@ -104,13 +104,15 @@
> <groupId>org.apache.openejb</groupId>
> <artifactId>openejb-client</artifactId>
> <version>3.1</version>
> - <outputDirectory>src/main/webapp</outputDirectory>
> +
> <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
> + <destFileName>openejb-client.jar</destFileName>
> </artifactItem>
> <artifactItem>
> <groupId>org.apache.openejb</groupId>
> <artifactId>javaee-api</artifactId>
> <version>5.0-1</version>
> - <outputDirectory>src/main/webapp</outputDirectory>
> +
> <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
> + <destFileName>javaee-api.jar</destFileName>
> </artifactItem>
> </artifactItems>
> </configuration>
>
> --
> Fredrik Jonson
>
>
--
Karan Singh Malhi
Re: Applet example
Posted by Fredrik Jonson <fr...@myrealbox.com>.
Hi,
I hope the following patch solves a bit of your problem. It changes
the dependency plugin configuration to copy the artifacts to the
target path instead of the source path. Secondly it uses the
destFileName parameter to make the final name of the copied artifacts
versionless.
I also think you can solve the version number issue by declaring a
parent pom in the project and then use ${project.parent.version}
instead of the fixed 3.1 in both the dependency and the dependency
plugin sections. Not too confident to what extent that option is
what you want though, so I've left that out here...
Index: examples/webapps/applet/src/main/webapp/index.jsp
===================================================================
--- examples/webapps/applet/src/main/webapp/index.jsp (revision 751861)
+++ examples/webapps/applet/src/main/webapp/index.jsp (working copy)
@@ -19,7 +19,7 @@
<body>
<applet alt="could not load applet" height="100" width="300"
codebase="."
- archive="app.jar,javaee-api-5.0-1.jar,openejb-client-3.1.jar"
+ archive="app.jar,javaee-api.jar,openejb-client.jar"
code="org.superbiz.applet.CalculatorApplet">
</applet>
</body>
Index: examples/webapps/applet/pom.xml
===================================================================
--- examples/webapps/applet/pom.xml (revision 751861)
+++ examples/webapps/applet/pom.xml (working copy)
@@ -79,10 +79,10 @@
</goals>
<configuration>
<tasks>
- <jar destfile="src/main/webapp/app.jar" basedir="target/classes"/>
- <signjar jar='src/main/webapp/app.jar' alias="mykey" storepass="openejb"/>
- <signjar jar='src/main/webapp/openejb-client-3.1.jar' alias="mykey" storepass="openejb"/>
- <signjar jar='src/main/webapp/javaee-api-5.0-1.jar' alias="mykey" storepass="openejb"/>
+ <jar destfile="${project.build.directory}/${project.build.finalName}/app.jar" basedir="target/classes"/>
+ <signjar jar="${project.build.directory}/${project.build.finalName}/app.jar" alias="mykey" storepass="openejb"/>
+ <signjar jar="${project.build.directory}/${project.build.finalName}/openejb-client.jar" alias="mykey" storepass="openejb"/>
+ <signjar jar="${project.build.directory}/${project.build.finalName}/javaee-api.jar" alias="mykey" storepass="openejb"/>
</tasks>
</configuration>
</execution>
@@ -104,13 +104,15 @@
<groupId>org.apache.openejb</groupId>
<artifactId>openejb-client</artifactId>
<version>3.1</version>
- <outputDirectory>src/main/webapp</outputDirectory>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ <destFileName>openejb-client.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>5.0-1</version>
- <outputDirectory>src/main/webapp</outputDirectory>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ <destFileName>javaee-api.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
--
Fredrik Jonson
Re: Applet example
Posted by Karan Malhi <ka...@gmail.com>.
We could probably use an ant task to rename the file (and strip off the
version) in one of the appropriate phases of maven.
On Sun, Mar 8, 2009 at 7:14 PM, David Blevins <da...@visi.com>wrote:
>
> On Mar 8, 2009, at 6:38 AM, Karan Malhi wrote:
>
>
>>> Seems we're also using the 3.1 version of the client which is going to
>>> break eventually when the protocol changes. We'll need to figure out a
>>> way
>>> to get that on whatever the current version is.
>>>
>>> Not sure that I understand the above.
>> I think creating the keystore for the user is a good idea. Will look into
>> it.
>>
>
> Better said, when we ship 3.1.1 the applet example should be using the
> 3.1.1 client. Not sure if there's some way we can strip the version number
> before copying it into the war file. I wonder also if the maven guys know
> of a way to get those jars into the webapp without us having to copy them
> into the src/webapp/ directory. Hopefully there's some trick we can use.
>
> -David
>
>
>
>
--
Karan Singh Malhi
Re: Applet example
Posted by David Blevins <da...@visi.com>.
On Mar 8, 2009, at 6:38 AM, Karan Malhi wrote:
>>
>> Seems we're also using the 3.1 version of the client which is going
>> to
>> break eventually when the protocol changes. We'll need to figure
>> out a way
>> to get that on whatever the current version is.
>>
> Not sure that I understand the above.
> I think creating the keystore for the user is a good idea. Will look
> into
> it.
Better said, when we ship 3.1.1 the applet example should be using the
3.1.1 client. Not sure if there's some way we can strip the version
number before copying it into the war file. I wonder also if the
maven guys know of a way to get those jars into the webapp without us
having to copy them into the src/webapp/ directory. Hopefully there's
some trick we can use.
-David
Re: Applet example
Posted by Karan Malhi <ka...@gmail.com>.
>
> Seems we're also using the 3.1 version of the client which is going to
> break eventually when the protocol changes. We'll need to figure out a way
> to get that on whatever the current version is.
>
Not sure that I understand the above.
I think creating the keystore for the user is a good idea. Will look into
it.
--
Karan Singh Malhi