You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aditya Shastri <ad...@gmail.com> on 2023/11/30 22:35:23 UTC

Tomcat 9 build from scratch

Hello,

We build our own Tomcat 9 binaries from scratch (grab the tag from
https://github.com/apache/tomcat) and call ant (with java8) to build
it.

Starting with 9.0.83, our pipelines are failing with the error
build.xml:113: Java version 17 or newer is required (1.8.0_381 is installed)

The apps we have are only certified on Java 8 and it would take a bit
of work to get it to Java 17.

My question is if I build the binaries with Java 17, can I still use
it with Java 8?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 9 build from scratch

Posted by Aditya Shastri <ad...@gmail.com>.
Sounds good. Thanks!

On Thu, Nov 30, 2023 at 3:40 PM Adwait Kumar Singh <ad...@gmail.com> wrote:
>
> The former.
>
> <property name="compile.release" value="8"/>
>
> On Thu, Nov 30, 2023 at 3:40 PM Aditya Shastri <ad...@gmail.com>
> wrote:
>
> > Thanks for the response Adwait.
> >
> > My ant skills are lacking. Does the minimum bytecode definition come
> > from this line?
> > <property name="compile.release" value="8"/>
> >
> > What does this line do?
> >   <property name="min.java.version" value="8"/>
> >
> > On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com>
> > wrote:
> > >
> > > Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
> > >
> > > On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <
> > aditya.shastri5955@gmail.com>
> > > wrote:
> > >
> > > > Hello,
> > > >
> > > > We build our own Tomcat 9 binaries from scratch (grab the tag from
> > > > https://github.com/apache/tomcat) and call ant (with java8) to build
> > > > it.
> > > >
> > > > Starting with 9.0.83, our pipelines are failing with the error
> > > > build.xml:113: Java version 17 or newer is required (1.8.0_381 is
> > > > installed)
> > > >
> > > > The apps we have are only certified on Java 8 and it would take a bit
> > > > of work to get it to Java 17.
> > > >
> > > > My question is if I build the binaries with Java 17, can I still use
> > > > it with Java 8?
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > > For additional commands, e-mail: users-help@tomcat.apache.org
> > > >
> > > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 9 build from scratch

Posted by Adwait Kumar Singh <ad...@gmail.com>.
The former.

<property name="compile.release" value="8"/>

On Thu, Nov 30, 2023 at 3:40 PM Aditya Shastri <ad...@gmail.com>
wrote:

> Thanks for the response Adwait.
>
> My ant skills are lacking. Does the minimum bytecode definition come
> from this line?
> <property name="compile.release" value="8"/>
>
> What does this line do?
>   <property name="min.java.version" value="8"/>
>
> On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com>
> wrote:
> >
> > Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
> >
> > On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <
> aditya.shastri5955@gmail.com>
> > wrote:
> >
> > > Hello,
> > >
> > > We build our own Tomcat 9 binaries from scratch (grab the tag from
> > > https://github.com/apache/tomcat) and call ant (with java8) to build
> > > it.
> > >
> > > Starting with 9.0.83, our pipelines are failing with the error
> > > build.xml:113: Java version 17 or newer is required (1.8.0_381 is
> > > installed)
> > >
> > > The apps we have are only certified on Java 8 and it would take a bit
> > > of work to get it to Java 17.
> > >
> > > My question is if I build the binaries with Java 17, can I still use
> > > it with Java 8?
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > > For additional commands, e-mail: users-help@tomcat.apache.org
> > >
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 9 build from scratch

Posted by Aditya Shastri <ad...@gmail.com>.
Thank you for the clarification!

Thank you Chris, Mark, Adwait!

On Fri, Dec 1, 2023 at 2:07 PM Christopher Schultz
<ch...@christopherschultz.net> wrote:
>
> Aditya,
>
> On 12/1/23 12:48, Aditya Shastri wrote:
> >> Yes. Equally importantly it also ensures that the code is compiled
> >> against the Java 8 API.
>  >
> > Makes sense!
> >
> >> It is used for property replacement in the documentation for the minimum
> >> Java version required at runtime. We do it this way so the documentation
> >> source files can be the same for all Tomcat versions with the correct
> >> minimum version being inserted via this property. It makes it a lot
> >> easier when we start a new major version as we only have to change the
> >> minimum version in one place rather than searching through the
> >> documentation to find all the places that reference the minimum version.
> >
> > That only happens during the `ant release` step? Doesn't really affect a
> > regular compile from source situation?
>
> It actually happens when building the documentation. It has nothing to
> do with the source, which may be confusing if you are just reading the
> Ant property names. We probably could have chosen a better name for that
> property, or at least written a bit of documentation for it to make it
> clear.
>
> -chris
>
> > On Fri, Dec 1, 2023, 3:41 AM Mark Thomas <ma...@apache.org> wrote:
> >
> >> On 30/11/2023 23:38, Aditya Shastri wrote:
> >>> Thanks for the response Adwait.
> >>>
> >>> My ant skills are lacking. Does the minimum bytecode definition come
> >>> from this line?
> >>> <property name="compile.release" value="8"/>
> >>
> >> Yes. Equally importantly it also ensures that the code is compiled
> >> against the Java 8 API.
> >>
> >>> What does this line do?
> >>>     <property name="min.java.version" value="8"/>
> >>
> >> It is used for property replacement in the documentation for the minimum
> >> Java version required at runtime. We do it this way so the documentation
> >> source files can be the same for all Tomcat versions with the correct
> >> minimum version being inserted via this property. It makes it a lot
> >> easier when we start a new major version as we only have to change the
> >> minimum version in one place rather than searching through the
> >> documentation to find all the places that reference the minimum version.
> >>
> >> Mark
> >>
> >>>
> >>> On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com>
> >> wrote:
> >>>>
> >>>> Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
> >>>>
> >>>> On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <
> >> aditya.shastri5955@gmail.com>
> >>>> wrote:
> >>>>
> >>>>> Hello,
> >>>>>
> >>>>> We build our own Tomcat 9 binaries from scratch (grab the tag from
> >>>>> https://github.com/apache/tomcat) and call ant (with java8) to build
> >>>>> it.
> >>>>>
> >>>>> Starting with 9.0.83, our pipelines are failing with the error
> >>>>> build.xml:113: Java version 17 or newer is required (1.8.0_381 is
> >>>>> installed)
> >>>>>
> >>>>> The apps we have are only certified on Java 8 and it would take a bit
> >>>>> of work to get it to Java 17.
> >>>>>
> >>>>> My question is if I build the binaries with Java 17, can I still use
> >>>>> it with Java 8?
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>>>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>>>
> >>>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 9 build from scratch

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Aditya,

On 12/1/23 12:48, Aditya Shastri wrote:
>> Yes. Equally importantly it also ensures that the code is compiled
>> against the Java 8 API.
 >
> Makes sense!
> 
>> It is used for property replacement in the documentation for the minimum
>> Java version required at runtime. We do it this way so the documentation
>> source files can be the same for all Tomcat versions with the correct
>> minimum version being inserted via this property. It makes it a lot
>> easier when we start a new major version as we only have to change the
>> minimum version in one place rather than searching through the
>> documentation to find all the places that reference the minimum version.
> 
> That only happens during the `ant release` step? Doesn't really affect a
> regular compile from source situation?

It actually happens when building the documentation. It has nothing to 
do with the source, which may be confusing if you are just reading the 
Ant property names. We probably could have chosen a better name for that 
property, or at least written a bit of documentation for it to make it 
clear.

-chris

> On Fri, Dec 1, 2023, 3:41 AM Mark Thomas <ma...@apache.org> wrote:
> 
>> On 30/11/2023 23:38, Aditya Shastri wrote:
>>> Thanks for the response Adwait.
>>>
>>> My ant skills are lacking. Does the minimum bytecode definition come
>>> from this line?
>>> <property name="compile.release" value="8"/>
>>
>> Yes. Equally importantly it also ensures that the code is compiled
>> against the Java 8 API.
>>
>>> What does this line do?
>>>     <property name="min.java.version" value="8"/>
>>
>> It is used for property replacement in the documentation for the minimum
>> Java version required at runtime. We do it this way so the documentation
>> source files can be the same for all Tomcat versions with the correct
>> minimum version being inserted via this property. It makes it a lot
>> easier when we start a new major version as we only have to change the
>> minimum version in one place rather than searching through the
>> documentation to find all the places that reference the minimum version.
>>
>> Mark
>>
>>>
>>> On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com>
>> wrote:
>>>>
>>>> Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
>>>>
>>>> On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <
>> aditya.shastri5955@gmail.com>
>>>> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> We build our own Tomcat 9 binaries from scratch (grab the tag from
>>>>> https://github.com/apache/tomcat) and call ant (with java8) to build
>>>>> it.
>>>>>
>>>>> Starting with 9.0.83, our pipelines are failing with the error
>>>>> build.xml:113: Java version 17 or newer is required (1.8.0_381 is
>>>>> installed)
>>>>>
>>>>> The apps we have are only certified on Java 8 and it would take a bit
>>>>> of work to get it to Java 17.
>>>>>
>>>>> My question is if I build the binaries with Java 17, can I still use
>>>>> it with Java 8?
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 9 build from scratch

Posted by Aditya Shastri <ad...@gmail.com>.
> Yes. Equally importantly it also ensures that the code is compiled
against the Java 8 API.
Makes sense!

> It is used for property replacement in the documentation for the minimum
Java version required at runtime. We do it this way so the documentation
source files can be the same for all Tomcat versions with the correct
minimum version being inserted via this property. It makes it a lot
easier when we start a new major version as we only have to change the
minimum version in one place rather than searching through the
documentation to find all the places that reference the minimum version.

That only happens during the `ant release` step? Doesn't really affect a
regular compile from source situation?

Thank you for your response!

On Fri, Dec 1, 2023, 3:41 AM Mark Thomas <ma...@apache.org> wrote:

> On 30/11/2023 23:38, Aditya Shastri wrote:
> > Thanks for the response Adwait.
> >
> > My ant skills are lacking. Does the minimum bytecode definition come
> > from this line?
> > <property name="compile.release" value="8"/>
>
> Yes. Equally importantly it also ensures that the code is compiled
> against the Java 8 API.
>
> > What does this line do?
> >    <property name="min.java.version" value="8"/>
>
> It is used for property replacement in the documentation for the minimum
> Java version required at runtime. We do it this way so the documentation
> source files can be the same for all Tomcat versions with the correct
> minimum version being inserted via this property. It makes it a lot
> easier when we start a new major version as we only have to change the
> minimum version in one place rather than searching through the
> documentation to find all the places that reference the minimum version.
>
> Mark
>
> >
> > On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com>
> wrote:
> >>
> >> Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
> >>
> >> On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <
> aditya.shastri5955@gmail.com>
> >> wrote:
> >>
> >>> Hello,
> >>>
> >>> We build our own Tomcat 9 binaries from scratch (grab the tag from
> >>> https://github.com/apache/tomcat) and call ant (with java8) to build
> >>> it.
> >>>
> >>> Starting with 9.0.83, our pipelines are failing with the error
> >>> build.xml:113: Java version 17 or newer is required (1.8.0_381 is
> >>> installed)
> >>>
> >>> The apps we have are only certified on Java 8 and it would take a bit
> >>> of work to get it to Java 17.
> >>>
> >>> My question is if I build the binaries with Java 17, can I still use
> >>> it with Java 8?
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >>>
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Tomcat 9 build from scratch

Posted by Mark Thomas <ma...@apache.org>.
On 30/11/2023 23:38, Aditya Shastri wrote:
> Thanks for the response Adwait.
> 
> My ant skills are lacking. Does the minimum bytecode definition come
> from this line?
> <property name="compile.release" value="8"/>

Yes. Equally importantly it also ensures that the code is compiled 
against the Java 8 API.

> What does this line do?
>    <property name="min.java.version" value="8"/>

It is used for property replacement in the documentation for the minimum 
Java version required at runtime. We do it this way so the documentation 
source files can be the same for all Tomcat versions with the correct 
minimum version being inserted via this property. It makes it a lot 
easier when we start a new major version as we only have to change the 
minimum version in one place rather than searching through the 
documentation to find all the places that reference the minimum version.

Mark

> 
> On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com> wrote:
>>
>> Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
>>
>> On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <ad...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> We build our own Tomcat 9 binaries from scratch (grab the tag from
>>> https://github.com/apache/tomcat) and call ant (with java8) to build
>>> it.
>>>
>>> Starting with 9.0.83, our pipelines are failing with the error
>>> build.xml:113: Java version 17 or newer is required (1.8.0_381 is
>>> installed)
>>>
>>> The apps we have are only certified on Java 8 and it would take a bit
>>> of work to get it to Java 17.
>>>
>>> My question is if I build the binaries with Java 17, can I still use
>>> it with Java 8?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 9 build from scratch

Posted by Aditya Shastri <ad...@gmail.com>.
Thanks for the response Adwait.

My ant skills are lacking. Does the minimum bytecode definition come
from this line?
<property name="compile.release" value="8"/>

What does this line do?
  <property name="min.java.version" value="8"/>

On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh <ad...@gmail.com> wrote:
>
> Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.
>
> On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <ad...@gmail.com>
> wrote:
>
> > Hello,
> >
> > We build our own Tomcat 9 binaries from scratch (grab the tag from
> > https://github.com/apache/tomcat) and call ant (with java8) to build
> > it.
> >
> > Starting with 9.0.83, our pipelines are failing with the error
> > build.xml:113: Java version 17 or newer is required (1.8.0_381 is
> > installed)
> >
> > The apps we have are only certified on Java 8 and it would take a bit
> > of work to get it to Java 17.
> >
> > My question is if I build the binaries with Java 17, can I still use
> > it with Java 8?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat 9 build from scratch

Posted by Adwait Kumar Singh <ad...@gmail.com>.
Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does.

On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri <ad...@gmail.com>
wrote:

> Hello,
>
> We build our own Tomcat 9 binaries from scratch (grab the tag from
> https://github.com/apache/tomcat) and call ant (with java8) to build
> it.
>
> Starting with 9.0.83, our pipelines are failing with the error
> build.xml:113: Java version 17 or newer is required (1.8.0_381 is
> installed)
>
> The apps we have are only certified on Java 8 and it would take a bit
> of work to get it to Java 17.
>
> My question is if I build the binaries with Java 17, can I still use
> it with Java 8?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>