Skip to content

Web component support - #211

Merged
tipsy merged 5 commits into
tipsy:masterfrom
sembler:web-component-support
Jun 30, 2022
Merged

tipsy merged 5 commits into
tipsy:masterfrom
sembler:web-component-support

Conversation

@sembler

@sembler sembler commented Jun 28, 2022

Copy link
Copy Markdown
Collaborator

@tipsy this should make a new release (1.6.0). Nothing as major as I had planned long ago, but it is overdue.

- Several elements have been found to be missing from the code generator.
- A long-term strategy for dealing with obsolete elements will be needed.  Should we remove and change the API?  Or should we deprecate and leave in-place?
- Found one element that was accidentally added to the code generator but never used.  Hopefully.
- Fixes will be applied in following commits.
- Added DataTag.
- Added SlotTag and TemplateTag to support web components.
- Added global attributes to support web components.
- Removed GenerateTag.  Accidentally introduced by string replacement in code generator.
…l of GenerateTag.

- The GenerateTag class was created accidentally.  It does not have any representation in the HTML standard is should not be provided in this library.
@tipsy

tipsy commented Jun 29, 2022

Copy link
Copy Markdown
Owner

+129,126 −82 😳

@tipsy

tipsy commented Jun 29, 2022

Copy link
Copy Markdown
Owner

What is this giant .wattsi file?

@sembler

sembler commented Jun 29, 2022

Copy link
Copy Markdown
Collaborator Author

The .wattsi file is copied from the HTML Living Standard which is maintained by the Web Hypertext Application Technology Working Group. I used that to check for missing HTML tags, which I found and added (mostly). I'd like to use it for further validation when time allows, because we've likely missed some attributes here and there. But if size is a concern it can be removed.

@tipsy

tipsy commented Jun 29, 2022 •

Copy link
Copy Markdown
Owner

No, it's not an issue, it's just very large.

So you want 1.6.0 released after this is merged?

@sembler

sembler commented Jun 29, 2022

Copy link
Copy Markdown
Collaborator Author

Yes, it would be good to complete some open issues and signal that the project isn't dead with 1.6.0.

@tipsy
tipsy merged commit d1c404d into tipsy:master Jun 30, 2022
@tipsy

tipsy commented Jun 30, 2022

Copy link
Copy Markdown
Owner
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-java) @ j2html ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.761 s
[INFO] Finished at: 2022-06-30T02:14:43+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce (enforce-java) on project j2html: Execution enforce-java of goal org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce failed: An API incompatibility was encountered while executing org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-enforcer-plugin:1.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/David/.m2/repository/org/apache/maven/plugins/maven-enforcer-plugin/1.4/maven-enforcer-plugin-1.4.jar
[ERROR] urls[1] = file:/C:/Users/David/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[2] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[3] = file:/C:/Users/David/.m2/repository/org/slf4j/slf4j-jdk14/1.5.6/slf4j-jdk14-1.5.6.jar
[ERROR] urls[4] = file:/C:/Users/David/.m2/repository/org/slf4j/jcl-over-slf4j/1.5.6/jcl-over-slf4j-1.5.6.jar
[ERROR] urls[5] = file:/C:/Users/David/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.2.1/maven-reporting-api-2.2.1.jar
[ERROR] urls[6] = file:/C:/Users/David/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.1/doxia-sink-api-1.1.jar
[ERROR] urls[7] = file:/C:/Users/David/.m2/repository/org/apache/maven/doxia/doxia-logging-api/1.1/doxia-logging-api-1.1.jar
[ERROR] urls[8] = file:/C:/Users/David/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar
[ERROR] urls[9] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[10] = file:/C:/Users/David/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] = file:/C:/Users/David/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.20/plexus-utils-3.0.20.jar
[ERROR] urls[13] = file:/C:/Users/David/.m2/repository/commons-lang/commons-lang/2.3/commons-lang-2.3.jar
[ERROR] urls[14] = file:/C:/Users/David/.m2/repository/org/apache/maven/enforcer/enforcer-api/1.4/enforcer-api-1.4.jar
[ERROR] urls[15] = file:/C:/Users/David/.m2/repository/org/apache/maven/enforcer/enforcer-rules/1.4/enforcer-rules-1.4.jar
[ERROR] urls[16] = file:/C:/Users/David/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/1.4/maven-common-artifact-filters-1.4.jar
[ERROR] urls[17] = file:/C:/Users/David/.m2/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar
[ERROR] urls[18] = file:/C:/Users/David/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
[ERROR] urls[19] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[20] = file:/C:/Users/David/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[21] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-i18n/1.0-beta-6/plexus-i18n-1.0-beta-6.jar
[ERROR] urls[22] = file:/C:/Users/David/.m2/repository/org/apache/maven/plugin-testing/maven-plugin-testing-harness/1.3/maven-plugin-testing-harness-1.3.jar
[ERROR] urls[23] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
[ERROR] urls[24] = file:/C:/Users/David/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
[ERROR] urls[25] = file:/C:/Users/David/.m2/repository/junit/junit/4.11/junit-4.11.jar
[ERROR] urls[26] = file:/C:/Users/David/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : begin 0, end 3, length 2
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

@sembler

sembler commented Jun 30, 2022

Copy link
Copy Markdown
Collaborator Author

Looks like upgrading the plugin might fix that. Check #213 to see if that works.

@tipsy

tipsy commented Jun 30, 2022

Copy link
Copy Markdown
Owner

Thanks @sembler ! That did get me a step further, currently I'm stuck on:

[INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 15.579 s
    [INFO] Finished at: 2022-06-30T09:02:45+02:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.4.0:jar (attach-javadocs) on project j2html: MavenReportException: Error while generating Javadoc:
    [ERROR] Exit code: 1 - error: --add-modules ALL-MODULE-PATH can only be used when compiling the unnamed module
    [ERROR]
    [ERROR] Command line was: cmd.exe /X /C ""C:\Program Files\Java\jdk-11\bin\javadoc.exe" @options @packages @argfile"
    [ERROR]
    [ERROR] Refer to the generated Javadoc files in 'C:\Users\David\GitHub\j2html\library\target\apidocs' dir.
    [ERROR]
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@sembler

sembler commented Jun 30, 2022 •

Copy link
Copy Markdown
Collaborator Author

Maybe this error isn't showing up for me because I'm running the build on 1.8.0_322? I'll investigate.

Edit: Yes, it was the JDK version. I'll see if the plugin can be made to work on both versions, or if we'll need to focus on one JDK.

@tipsy

tipsy commented Jun 30, 2022

Copy link
Copy Markdown
Owner

Thanks, let me know what you find out. Worst case I'll install jdk8.

@sembler

sembler commented Jun 30, 2022

Copy link
Copy Markdown
Collaborator Author

I could not find any configuration options on the javadoc plugin that would allow the build to continue while using JDK11+.

The only approach that might work is to use the toolchain plugin. That would help lock the JDK version used for building, but it would still require each maintainer to install JDK8 and generate a toolchains.xml file. I don't think it would be worthwhile at this time.

@tipsy

tipsy commented Jun 30, 2022

Copy link
Copy Markdown
Owner

I'll downgrade to jdk8 and try again.

@tipsy

tipsy commented Jun 30, 2022

Copy link
Copy Markdown
Owner

1.6.0 should be out now !

@sembler

sembler commented Jun 30, 2022

Copy link
Copy Markdown
Collaborator Author

Fantastic! I'll follow up with a PR for website and readme changes.

@sembler

sembler commented Jun 30, 2022

Copy link
Copy Markdown
Collaborator Author

Submitted #214 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants