The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » Metro and JAXB

Thread: metro-on-glassfish.xml

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 10 - Last Post: Sep 22, 2008 12:34 AM by: ritzmann
pbw

Posts: 24
metro-on-glassfish.xml
Posted: Sep 9, 2008 8:19 PM
  Click to reply to this thread Reply

I don't know that it matters particularly, but since the release of 1.6.0_04, could the following

condition
<condition property="jdk6">
<contains substring="1.6.0" string="${java.version}"/>
</condition>

be expressed as

<condition property="jdk6u3">
<or>
<and>
<contains substring="version 1.7" string="${ant.version}"/>
<matches pattern="1.6.0_0[0-3]" string="${java.version}"/>
</and>
<contains substring="1.6.0" string="${java.version}"/>
</or>
</condition>
?

Does it make any difference that after 1.6.0_03 the webservices-api.jar is no longer required in endorsed?

pbw

Posts: 24
Re: metro-on-glassfish.xml
Posted: Sep 9, 2008 8:56 PM   in response to: pbw
  Click to reply to this thread Reply

Make that:

<condition property="jdk6u3">
<or>
<and>
<contains substring="version 1.7" string="${ant.version}"/>
<matches pattern="1.6.0_0[0-3]" string="${java.version}"/>
</and>
<and>
<not>
<contains substring="version 1.7" string="${ant.version}"/>
</not>
<contains substring="1.6.0" string="${java.version}"/>
</and>
</or>
</condition>

Fabian Ritzmann
Re: metro-on-glassfish.xml
Posted: Sep 10, 2008 4:02 AM   in response to: pbw
  Click to reply to this thread Reply

On 10. Sep 2008, at 06:56, metro@javadesktop.org wrote:

> Make that:
>
> <condition property="jdk6u3">
> <or>
> <and>
> <contains substring="version 1.7" string="$
> {ant.version}"/>
> <matches pattern="1.6.0_0[0-3]" string="$
> {java.version}"/>
> </and>
> <and>
> <not>
> <contains substring="version 1.7" string="$
> {ant.version}"/>
> </not>
> <contains substring="1.6.0" string="${java.version}"/>
> </and>
> </or>
> </condition>

Makes sense, I'll look into it. So Ant 1.7 is reporting a different
version string than older versions of Ant?

Fabian

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net


ritzmann

Posts: 163
Re: metro-on-glassfish.xml
Posted: Sep 11, 2008 5:13 AM   in response to: Fabian Ritzmann
  Click to reply to this thread Reply

On second thought, I think it would be best to remove that condition entirely and always install into the endorsed directory. It doesn't do any harm and keeps people from getting into trouble when they switch between Java versions.

ritzmann

Posts: 163
Re: metro-on-glassfish.xml
Posted: Sep 19, 2008 4:46 AM   in response to: ritzmann
  Click to reply to this thread Reply

On third thought, we didn't like the idea of installing anything into a system-wide directory in the first place. However, we need to do that in order for the stand-alone samples to run and more importantly some tools are relying on it as well. So I have tightened the condition to only install into the JRE endorsed directory if the installation is run with Java SE 6 update 3 or older:

<condition property="jdk6">
<or>
<contains string="${java.version}" substring="1.6.0.0"/>
<contains string="${java.version}" substring="1.6.0_1"/>
<contains string="${java.version}" substring="1.6.0_2"/>
<contains string="${java.version}" substring="1.6.0_03"/>
</or>
</condition>

pbw

Posts: 24
Re: metro-on-glassfish.xml
Posted: Sep 21, 2008 6:47 PM   in response to: ritzmann
  Click to reply to this thread Reply

Looks good. So there was a change in the format of the version string between updates 2 and 3?

pbw

Posts: 24
Re: metro-on-glassfish.xml
Posted: Sep 21, 2008 7:45 PM   in response to: pbw
  Click to reply to this thread Reply

What was the string for the release of 1.6.0? If it was just 1.6.0, you'll run into trouble.

pbw

Posts: 24
Re: metro-on-glassfish.xml
Posted: Sep 21, 2008 7:50 PM   in response to: pbw
  Click to reply to this thread Reply

Sorry I didn't reply earlier, but the 1.7 test in the original version was because the regular expression condition only became available in 1.7, I think.

ritzmann

Posts: 163
Re: metro-on-glassfish.xml
Posted: Sep 22, 2008 12:34 AM   in response to: pbw
  Click to reply to this thread Reply

Right, I wasn't entirely sure whether Ant evaluates logical conditions lazily or not, so I opted for the safe choice.

This site has an overview of Java version strings:
http://javatester.org/version.html

pbw

Posts: 24
Re: metro-on-glassfish.xml
Posted: Sep 21, 2008 7:54 PM   in response to: ritzmann
  Click to reply to this thread Reply

Another note (I'm just installing 1.3.1 now, so I'm being reminded of these things as I go along).

In the current version (1.3.1) the copy to endorsed is happening anyway.

<copy todir="${as.lib.home}/endorsed" overwrite="true">
<fileset dir="${basedir}/lib">
<include name="webservices-api.jar"/>
</fileset>
</copy>
<antcall target="install-api"/>
<echo message="... installation complete."/>

ritzmann

Posts: 163
Re: metro-on-glassfish.xml
Posted: Sep 22, 2008 12:31 AM   in response to: pbw
  Click to reply to this thread Reply

We are very conservative about bug fixes that go into minor release updates. The changes will go into Metro 1.4.




 XML java.net RSS