You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Greg Huber <gr...@gmail.com> on 2022/04/13 09:57:34 UTC

tld generator

I need a new tld generator for my jsp files.  The jdk.javadoc thing 
seems to have broken my builds.

Can anyone recommend one going forward?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Greg Huber <gr...@gmail.com>.
It was only doclet related items I lost, but using struts-annotations 
was able to replace the tld generation.  I had already converted my 
doclets to annotations, which seems a safer alternative going forward.

On 15/04/2022 01:38, Martin Gainty wrote:
> Apologies Greg,
>
> it appears 2011 tldgen does not yet accomodate javax.lang.model and com.sun.source API types for Java 11
>
> I'll propose that suggestion but for now we may need hard conversion types for generated source
> (assuming the class names are spot on..which they probably are not)
>
> Thanks for the link
> Martin-
> ________________________________
> From: Greg Huber <gr...@gmail.com>
> Sent: Thursday, April 14, 2022 3:13 AM
> To: dev@struts.apache.org <de...@struts.apache.org>
> Subject: Re: tld generator
>
> Martin,
>
> I had three ways of generating the tlds, this was one of them. They all
> use the com.sun.javadoc API which has been rewritten, and now not
> convertible.
>
> from the migration guide:
>
> https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html
>
> Many of the types in the old com.sun.javadoc API do not have equivalents
> in this package. Instead, types in the javax.lang.model and
> com.sun.source APIs are used instead. The following table gives a guide
> to the mapping from old types to their replacements. In some cases,
> there is no direct equivalent.
>
> On 13/04/2022 18:01, Martin Gainty wrote:
>> Hi Greg
>>
>> Have you tried tldgen?
>> Google Code Archive - Long-term storage for Google Code Project Hosting.<https://code.google.com/archive/p/tld-generator/>
>> ________________________________
>> From: Greg Huber <gr...@gmail.com>
>> Sent: Wednesday, April 13, 2022 5:57 AM
>> To: Struts Developers List <de...@struts.apache.org>
>> Subject: tld generator
>>
>> I need a new tld generator for my jsp files.  The jdk.javadoc thing
>> seems to have broken my builds.
>>
>> Can anyone recommend one going forward?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Martin Gainty <mg...@hotmail.com>.
Apologies Greg,

it appears 2011 tldgen does not yet accomodate javax.lang.model and com.sun.source API types for Java 11

I'll propose that suggestion but for now we may need hard conversion types for generated source
(assuming the class names are spot on..which they probably are not)

Thanks for the link
Martin-
________________________________
From: Greg Huber <gr...@gmail.com>
Sent: Thursday, April 14, 2022 3:13 AM
To: dev@struts.apache.org <de...@struts.apache.org>
Subject: Re: tld generator

Martin,

I had three ways of generating the tlds, this was one of them. They all
use the com.sun.javadoc API which has been rewritten, and now not
convertible.

from the migration guide:

https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html

Many of the types in the old com.sun.javadoc API do not have equivalents
in this package. Instead, types in the javax.lang.model and
com.sun.source APIs are used instead. The following table gives a guide
to the mapping from old types to their replacements. In some cases,
there is no direct equivalent.

On 13/04/2022 18:01, Martin Gainty wrote:
> Hi Greg
>
> Have you tried tldgen?
> Google Code Archive - Long-term storage for Google Code Project Hosting.<https://code.google.com/archive/p/tld-generator/>
> ________________________________
> From: Greg Huber <gr...@gmail.com>
> Sent: Wednesday, April 13, 2022 5:57 AM
> To: Struts Developers List <de...@struts.apache.org>
> Subject: tld generator
>
> I need a new tld generator for my jsp files.  The jdk.javadoc thing
> seems to have broken my builds.
>
> Can anyone recommend one going forward?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Greg Huber <gr...@gmail.com>.
Martin,

I had three ways of generating the tlds, this was one of them. They all 
use the com.sun.javadoc API which has been rewritten, and now not 
convertible.

from the migration guide:

https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html

Many of the types in the old com.sun.javadoc API do not have equivalents 
in this package. Instead, types in the javax.lang.model and 
com.sun.source APIs are used instead. The following table gives a guide 
to the mapping from old types to their replacements. In some cases, 
there is no direct equivalent.

On 13/04/2022 18:01, Martin Gainty wrote:
> Hi Greg
>
> Have you tried tldgen?
> Google Code Archive - Long-term storage for Google Code Project Hosting.<https://code.google.com/archive/p/tld-generator/>
> ________________________________
> From: Greg Huber <gr...@gmail.com>
> Sent: Wednesday, April 13, 2022 5:57 AM
> To: Struts Developers List <de...@struts.apache.org>
> Subject: tld generator
>
> I need a new tld generator for my jsp files.  The jdk.javadoc thing
> seems to have broken my builds.
>
> Can anyone recommend one going forward?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Greg Huber <gr...@gmail.com>.
Fantastic😁😁 it works, all I get is an extra dynamic-attributes tag, 
but I can remove this with a ant task.

<tag>
     <description>
       <![CDATA[Creates a status message.]]>
     </description>
     <name>StatusMessage</name>
<tag-class>org.me.tags.StatusMessageTag</tag-class>
     <body-content>empty</body-content>
     <dynamic-attributes>false</dynamic-attributes>
   </tag>

On 14/04/2022 09:41, Lukasz Lenart wrote:
> czw., 14 kwi 2022 o 09:26 Greg Huber <gr...@gmail.com> napisał(a):
>> Lucky struts never went down this path.
>>
>> Is the Struts Annotations freemarker based?
> No, it just uses two templates to generate html description files, the
> core is pure annotation based. I migrated it from APT to pure
> annotation processing sometime ago.
>
>> The POM uses the maven-compiler-plugin and No maven-javadoc-plugin??
> Not sure what you mean by that? You just need to add this dependency
> into your pom and the annotation processor will be picked up by JDK
> automatically.
>
> <dependency>
>      <groupId>org.apache.struts</groupId>
>      <artifactId>struts-annotations</artifactId>
>      <scope>compile</scope>
>      <optional>true</optional>
> </dependency>
>
> and you must pass configuration options:
>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
>      <compilerArgs>
>          <arg>-Auri=/struts-tags</arg>
>          <arg>-AtlibVersion=${tlib.version}</arg>
>          <arg>-AjspVersion=2.0</arg>
>          <arg>-AshortName=s</arg>
>          <arg>-AdisplayName=Struts Tags</arg>
>          <arg>-AoutFile=${basedir}/target/classes/META-INF/struts-tags.tld</arg>
>          <arg>-Adescription="To make it easier to access dynamic data;
>              the Apache Struts framework includes a library of custom tags.
>              The tags interact with the framework's validation and
>              internationalization features;
>              to ensure that input is correct and output is localized.
>              The Struts Tags can be used with JSP FreeMarker or Velocity."</arg>
>          <arg>-AoutTemplatesDir=${basedir}/src/site/resources/tags</arg>
>      </compilerArgs>
> </configuration>
>
>
> Regards

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Lukasz Lenart <lu...@apache.org>.
czw., 14 kwi 2022 o 09:26 Greg Huber <gr...@gmail.com> napisał(a):
>
> Lucky struts never went down this path.
>
> Is the Struts Annotations freemarker based?

No, it just uses two templates to generate html description files, the
core is pure annotation based. I migrated it from APT to pure
annotation processing sometime ago.

> The POM uses the maven-compiler-plugin and No maven-javadoc-plugin??

Not sure what you mean by that? You just need to add this dependency
into your pom and the annotation processor will be picked up by JDK
automatically.

<dependency>
    <groupId>org.apache.struts</groupId>
    <artifactId>struts-annotations</artifactId>
    <scope>compile</scope>
    <optional>true</optional>
</dependency>

and you must pass configuration options:

<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
    <compilerArgs>
        <arg>-Auri=/struts-tags</arg>
        <arg>-AtlibVersion=${tlib.version}</arg>
        <arg>-AjspVersion=2.0</arg>
        <arg>-AshortName=s</arg>
        <arg>-AdisplayName=Struts Tags</arg>
        <arg>-AoutFile=${basedir}/target/classes/META-INF/struts-tags.tld</arg>
        <arg>-Adescription="To make it easier to access dynamic data;
            the Apache Struts framework includes a library of custom tags.
            The tags interact with the framework's validation and
            internationalization features;
            to ensure that input is correct and output is localized.
            The Struts Tags can be used with JSP FreeMarker or Velocity."</arg>
        <arg>-AoutTemplatesDir=${basedir}/src/site/resources/tags</arg>
    </compilerArgs>
</configuration>


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Greg Huber <gr...@gmail.com>.
Lucky struts never went down this path.

Is the Struts Annotations freemarker based?

The POM uses the maven-compiler-plugin and No maven-javadoc-plugin??

On 14/04/2022 06:36, Lukasz Lenart wrote:
> There is also Tiles Autotag project, yet I never used it (there was a
> plan to use it instead Struts Annotations)
> https://tiles.apache.org/tiles-autotag/index.html
>
>
> Regards
> Łukasz
>
> śr., 13 kwi 2022 o 19:01 Martin Gainty <mg...@hotmail.com> napisał(a):
>> Hi Greg
>>
>> Have you tried tldgen?
>> Google Code Archive - Long-term storage for Google Code Project Hosting.<https://code.google.com/archive/p/tld-generator/>
>> ________________________________
>> From: Greg Huber <gr...@gmail.com>
>> Sent: Wednesday, April 13, 2022 5:57 AM
>> To: Struts Developers List <de...@struts.apache.org>
>> Subject: tld generator
>>
>> I need a new tld generator for my jsp files.  The jdk.javadoc thing
>> seems to have broken my builds.
>>
>> Can anyone recommend one going forward?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> For additional commands, e-mail: dev-help@struts.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Antonio Petrelli <an...@gmail.com>.
Il giorno gio 14 apr 2022 alle ore 07:36 Lukasz Lenart <
lukaszlenart@apache.org> ha scritto:

> There is also Tiles Autotag project, yet I never used it (there was a
> plan to use it instead Struts Annotations)
> https://tiles.apache.org/tiles-autotag/index.html
>
>
Hello
just to clarify what Tiles Autotag is (or was).

Tiles Autotag generates "tags" (JSP, Freemarker, Velocity) out from a
common core code. To do this, it needs to abstract the different
technologies into one model, so you develop one "pseudo-tag" and
automatically it generates JSP tags and related TLD, Freemarker and
Velocity "things" (sorry I don't remember how they are called, but you can
get the idea).
The problem is that it needs to use Tiles Request subproject, an
abstraction of the several requests (HttpServletRequest+HttpServletResponse
for servlets, PortletRequest for portlets, PageRequest for JSP etc.) to
integrate with the technologies under a common core.
So if you use Tiles Autotag you need to adopt Tiles Request too.

This made sense some years ago, now, where all the templates almost reside
on the client, I don't think this is the case. But I had fun developing for
it :-)

Best regards
Antonio Petrelli

Re: tld generator

Posted by Lukasz Lenart <lu...@apache.org>.
There is also Tiles Autotag project, yet I never used it (there was a
plan to use it instead Struts Annotations)
https://tiles.apache.org/tiles-autotag/index.html


Regards
Łukasz

śr., 13 kwi 2022 o 19:01 Martin Gainty <mg...@hotmail.com> napisał(a):
>
> Hi Greg
>
> Have you tried tldgen?
> Google Code Archive - Long-term storage for Google Code Project Hosting.<https://code.google.com/archive/p/tld-generator/>
> ________________________________
> From: Greg Huber <gr...@gmail.com>
> Sent: Wednesday, April 13, 2022 5:57 AM
> To: Struts Developers List <de...@struts.apache.org>
> Subject: tld generator
>
> I need a new tld generator for my jsp files.  The jdk.javadoc thing
> seems to have broken my builds.
>
> Can anyone recommend one going forward?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: tld generator

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Greg

Have you tried tldgen?
Google Code Archive - Long-term storage for Google Code Project Hosting.<https://code.google.com/archive/p/tld-generator/>
________________________________
From: Greg Huber <gr...@gmail.com>
Sent: Wednesday, April 13, 2022 5:57 AM
To: Struts Developers List <de...@struts.apache.org>
Subject: tld generator

I need a new tld generator for my jsp files.  The jdk.javadoc thing
seems to have broken my builds.

Can anyone recommend one going forward?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org