diff --git a/tck-runner/README b/tck-runner/README new file mode 100644 index 0000000..1c97aa4 --- /dev/null +++ b/tck-runner/README @@ -0,0 +1,24 @@ +//TODO: Update this file for any incomplete/incorrect information + +The pom.xml in this folder can be used to run the Jakarta Annotations Standalone TCK +against Glassfish 8.0.0 + + +Below are the instructions to run the Jakarta Annotations TCK + +1. Install Java17+ , set JAVA_HOME +2. Install Maven 3.6+ set M2_HOME +3. SET PATH : add M2_HOME/bin, JAVA_HOME/bin +eg: export PATH=$ANT_HOME/bin:$M2_HOME/bin:$JAVA_HOME/bin: + +4. Install the tck jar jakarta-annotations-tck-.jar available inside \ +jakarta-annotations-tck-.zip built from jakartaee/common-annotations-api project +in this repository using below mvn install command: +`mvn install:install-file -DcreateChecksum=true -Dpackaging=jar +-Dfile=jakarta-annotations-tck-.jar -DgroupId=jakarta.3tck +-DartifactId=jakarta-annotations-tck -Dversion=` + + +5. Use the sample tck-runner/pom.xml available in jakartaee/common-annotations-api project, +to run the test with Glassfish, verify the system properties set. +Run `mvn clean verify` from the current directory. diff --git a/tck-runner/pom.xml b/tck-runner/pom.xml new file mode 100644 index 0000000..9d12662 --- /dev/null +++ b/tck-runner/pom.xml @@ -0,0 +1,194 @@ + + + + 4.0.0 + + jakarta + glassfish.annotations-tck + 11.0.0 + jar + + + 8.0.0-M1 + glassfish7 + 5.9.1 + jakarta-annotations-tck + 3.0.0 + + + + + + org.junit + junit-bom + ${junit.jupiter.version} + pom + import + + + + + + + org.junit.jupiter + junit-jupiter + ${junit.jupiter.version} + + + jakarta.tck + ${tck.artifactId} + ${tck.version} + + + jakarta.tck + sigtest-maven-plugin + 2.1 + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.2.0 + + + unpack + + unpack + + generate-resources + + + + jakartatck + ${tck.artifactId} + ${tck.version} + zip + true + ${project.build.directory} + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 3.2.0 + + + unpack + + unpack + + pre-integration-test + + + + org.glassfish.main.distributions + ${glassfish-artifact-id} + ${glassfish.container.version} + zip + true + ${project.build.directory} + + + + + + + + + + + maven-failsafe-plugin + 3.0.0-M5 + + + sig-test + + integration-test + verify + + + jakarta.tck:${tck.artifactId} + + ${project.build.directory}/jdk11-bundle + ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.annotation-api.jar:${project.build.directory}/jdk11-bundle/java.base:${project.build.directory}/jdk11-bundle/java.rmi:${project.build.directory}/jdk11-bundle/java.sql:${project.build.directory}/jdk11-bundle/java.naming + true + false + true + true + true + true + true + true + true + true + true + true + true + true + + + + + + + + + + + full + + true + + + glassfish + + + + web + + web + + + + diff --git a/tck/docs/CAJ2.1-ReleaseNotes.html b/tck/docs/CAJ2.1-ReleaseNotes.html new file mode 100644 index 0000000..0c1879d --- /dev/null +++ b/tck/docs/CAJ2.1-ReleaseNotes.html @@ -0,0 +1,73 @@ + + + + + Jakarta Annotations TCK, Version 2.1 Release Notes, December 2021 + + + +
+

Jakarta Annotations Technology Compatibility Kit, Version 2.1
+ Release Notes, December 2021

+
+

Kit Contents

+

The Jakarta Annotations, Version 2.1 Technology Compatibility Kit (TCK) + includes the following items:

+
    +
  • +

    Jakarta Annotations TCK Signature Tests: Check that + all public APIs are supported and/or defined as specified in the + Jakarta Annotations specification, Version 2.1 implementation under + test.

    +
  • +
+
+

Platform Notes

+

The Jakarta Annotations TCK tests have been built with JDK 11 and tested + with OpenJDK 11 and OpenJDK 17.

+

The Jakarta Annotations TCK tests have been run on the following + platforms:

+
    +
  • Debian Linux 10
  • +
+

The Jakarta Annotations TCK tests have been run against the following + Common Annotations for Jakarta EE compatible implementations:

+
    +
  • Jakarta Annotations for Java Compatible Implementation Version 2.1
  • +
+
+

Installing, Setting Up, and Running the + Jakarta Annotations TCK

+

Refer to the Jakarta Annotations for Jakarta EE TCK 2.1 User's + Guide for complete instructions on installing, setting up, and + running the Jakarta Annotations TCK. The online version of the JT Harness + version 5.0 documentation is available here.

+
+

+
Copyright © 2013, 2021 Oracle and/or its affiliates. All + rights reserved.
+ +

+
+ + diff --git a/tck/docs/CAJ3.0-ReleaseNotes.html b/tck/docs/CAJ3.0-ReleaseNotes.html new file mode 100644 index 0000000..ac12b15 --- /dev/null +++ b/tck/docs/CAJ3.0-ReleaseNotes.html @@ -0,0 +1,72 @@ + + + + + Jakarta Annotations TCK, Version 2.1 Release Notes, December 2021 + + + +
+

Jakarta Annotations Technology Compatibility Kit, Version 3.0
+ Release Notes, February 2024

+
+

Kit Contents

+

The Jakarta Annotations, Version 3.0 Technology Compatibility Kit (TCK) + includes the following items:

+
    +
  • +

    Jakarta Annotations TCK Signature Tests: Check that + all public APIs are supported and/or defined as specified in the + Jakarta Annotations specification, Version 3.0 implementation under + test.

    +
  • +
+
+

Platform Notes

+

The Jakarta Annotations TCK tests have been built with JDK 17 and tested + with OpenJDK 17

+

The Jakarta Annotations TCK tests have been run on the following + platforms:

+
    +
  • Debian Linux 10
  • +
+

The Jakarta Annotations TCK tests have been run against the following + Common Annotations for Jakarta EE compatible implementations:

+
    +
  • Jakarta Annotations for Java Compatible Implementation Version 3.0
  • +
+
+

Installing, Setting Up, and Running the + Jakarta Annotations TCK

+

Refer to the Jakarta Annotations for Jakarta EE TCK 3.0 User's + Guide for complete instructions on installing, setting up, and + running the Jakarta Annotations TCK. +


+

+
Copyright (c) 2013, 2024 Oracle and/or its affiliates. All + rights reserved.
+ +

+
+ + diff --git a/tck/docs/LICENSE_EFTL.md b/tck/docs/LICENSE_EFTL.md new file mode 100644 index 0000000..a210682 --- /dev/null +++ b/tck/docs/LICENSE_EFTL.md @@ -0,0 +1,83 @@ +# Eclipse Foundation Technology Compatibility Kit License - v 1.0 + +Copyright (c) 2018, Eclipse Foundation, Inc. and its licensors. + +Redistribution and use in binary form is permitted provided that the +following conditions are met: + +1. Use of the Technology Compatibility Kit accompanying this license + (the "TCK") and its documentation is permitted solely for the + purpose of testing compatibility of an implementation (the + "Product") of a specification (the "Specification") made available + by the Eclipse Foundation, Inc. ("Eclipse"). + +2. Only those modifications expressly permitted by the TCK and its + documentation are permitted. Except in these limited circumstances, + no modifications to the TCK are permitted under this license. + +3. A Product will be deemed to be "compatible" with the Specification + if it fully and completely meets and satisfies all requirements of + the TCK. + +4. Before any claim of compatibility (or any similar claim suggesting + compatibility) is made based on the TCK, the testing party must: + + a. use the TCK to demonstrate that the Product fully and + completely meets and satisfies all requirements of the TCK; + + b. make TCK test results showing full and complete satisfaction of + all requirements of the TCK publicly available on the testing + party's website and send a link to such test results to Eclipse + at [tck@eclipse.org](mailto:tck@eclipse.org); and + + c. comply with any requirements stated in the Specification with + regard to subsetting, supersetting, modifying or extending the + Specification in any Product claimed to be compatible with the + Specification. + +5. The test results must be continuously available and the link must + be live for at least as long as the Product is available in the + marketplace. + +6. The TCK may not be used as a basis for any statements of partial + compatibility. The TCK may only be used as a basis for true, + factual statements of full compatibility of Products that fully + meet and satisfy all requirements of the TCK. + +7. A determination that a Product is compatible with the TCK does not, + in itself, give rise to the right to use any name, mark, logo + associated with the TCK, Eclipse, or Eclipse's contributors or + licensors. + +8. Upon the request of Eclipse, a tester will retract any statements + of compatibility (or any similar claim suggesting compatibility) + which Eclipse reasonably determines to be false or misleading or in + violation of the terms of this license. + +9. Redistribution of the TCK must be under this Eclipse Foundation + Technology Compatibility Kit License and must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +10. Neither the name, trademarks or logos of Eclipse, nor the names, + trademarks or logos of its contributors or licensors may be used to + endorse or promote products tested with this software without + specific prior written permission. + +11. The source code for the TCK accompanying this license is available + from Eclipse. + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED ON +AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER +EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR +CONDITIONS OF TITLE, NON- INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR +A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY APPLICABLE LAW, +NEITHER THE COPYRIGHT OWNER OR ANY CONTRIBUTORS SHALL HAVE ANY +LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/tck/docs/TCK-Exclude-List.txt b/tck/docs/TCK-Exclude-List.txt new file mode 100644 index 0000000..837a2bc --- /dev/null +++ b/tck/docs/TCK-Exclude-List.txt @@ -0,0 +1,19 @@ +# +# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +# This file lists the excluded tests from Jakarta Annotations TCK. +# This is intended only for documentation purpose and is not used to exclude any tests. +# diff --git a/tck/docs/index.html b/tck/docs/index.html new file mode 100644 index 0000000..a27feff --- /dev/null +++ b/tck/docs/index.html @@ -0,0 +1,56 @@ + + + + + + Welcome to the Jakarta Annotations TCK, Version 2.0 + + +
+

Welcome to the Jakarta Annotations
+ Technology Compatibility Kit, Version 3.0
+ Your Starting Point

+
+
+

Guide to Jakarta Annotations TCK 3.0 Documentation

+

The Jakarta Annotations Technology Compatibility Kit (TCK) 3.0 + documentation includes the following:

+
    +
  • The Jakarta Annotations 3.0 + TCK Release Notes provides the information on the test + harness, the test suite and the platforms tested. + +
  • +
  • The Jakarta Annotations TCK Users Guide provides the + information that you need to install, set up, and run the Jakarta + Annotations TCK, Version 3.0. In addition, the guide provides the rules + you must comply with to pass the Jakarta Annotations TCK.
  • +
+
+

+
Copyright (c) 2016, 2021 Oracle and/or its affiliates. All + rights reserved.
+ +

+
+ + diff --git a/tck/docs/userguide/README.md b/tck/docs/userguide/README.md new file mode 100644 index 0000000..a3ec2b6 --- /dev/null +++ b/tck/docs/userguide/README.md @@ -0,0 +1,77 @@ +# A JBake project template + +## About JBake + +JBake is a static site generator, it's inspired from jekyll and written +in java. The basic idea is to have templates for the structure of the +page, and the body generated from asciidoc content. + +## Pre requisites + +- Maven +- JDK8+ + +Deploying to Github will require password less authentication. + +This is done by exporting your SSH public key into your Github account. + +## Build the site locally + +The site is generated under target/staging. + +Open file:///PATH_TO_PROJECT_DIR/target/staging in a browser to view the site. + +``` +mvn generate-resources +``` + +Or you can invoke the JBake plugin directly. + +``` +mvn jbake:build +``` + +### Rebuild the site on changes + +``` +mvn jbake:watch +``` + +If you keep this command running, changes to the sources will be +detected and the site will be rendered incrementally. + +This is convenient when writing content. + +### Serve the site locally + +``` +mvn jbake:serve +``` + +If a webserver is required (e.g. absolute path are used), this command +will start a webserver (jetty) at http://localhost:8820. It will also +watch for changes and rebuild incrementally. + +## Deploy the site to Github Pages + +``` +mvn deploy +``` + +## Produce a zip file for download + +To produce a zip file containing the generated html files, use: + +``` +mvn package +``` + +When making a release on GitHub, this zip file should be added to the release. + +## Links + +- [JBake maven plugin documentation](https://github.com/Blazebit/jbake-maven-plugin) +- [JBake documentation](http://jbake.org/docs/2.5.1) +- [Freemarker documentation](http://freemarker.org/docs) +- [AsciiDoc User Guide](http://asciidoc.org/userguide.html) +- [Asciidoctor quick reference](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference) diff --git a/tck/docs/userguide/pom.xml b/tck/docs/userguide/pom.xml new file mode 100644 index 0000000..c8f8aa4 --- /dev/null +++ b/tck/docs/userguide/pom.xml @@ -0,0 +1,259 @@ + + + + + 4.0.0 + + org.eclipse.ee4j + project + 1.0.5 + + org.glassfish + tck_caj + pom + 3.0.0 + Eclipse Foundation Technology Compatibility Kit User's Guide for Jakarta Annotations Release 3.0 + + + UTF-8 + ${project.build.directory}/staging + true + 2.4.2 + 2.1.0 + 2.2.4 + 1.5.3 + 2.7.0-rc.7 + 2.3.30 + + + Common-Annotations-TCK-Users-Guide.pdf + true + + + + + scm:git:git@github.com:eclipse-ee4j/jakartaee-tck.git + + + + + package + + + org.apache.maven.plugins + maven-clean-plugin + + + + src/main/jbake/content + + toc.adoc + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-versions + + enforce + + + + + [17,) + You need JDK17 or newer + + + + + + + + org.glassfish.doc + glassfish-doc-maven-plugin + + + generate-toc + generate-resources + + toc + + + + [0-9]+\s.*,Preface.*,Part\s.* + + + + + generate-book + generate-resources + + book + + + + + + org.jbake + jbake-maven-plugin + + ${site.output.dir} + + ${status} + + + + + build-site + generate-resources + + generate + + + + + + org.asciidoctor + asciidoctor-maven-plugin + + ${project.build.directory}/book + book.adoc + + ${project.build.directory}/staging/ + pdf + ${doc.pdf} + + ${project.basedir}/src/theme + jakartaee + book + ${status} + + + font + + + font + true + + - + true + true + + + + + generate-pdf-doc + generate-resources + + process-asciidoc + + + + + + org.apache.maven.plugins + maven-scm-publish-plugin + + + deploy-site + deploy + + publish-scm + + + gh-pages + false + Update site + + + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + org.glassfish.doc + glassfish-doc-maven-plugin + 1.3 + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-scm-publish-plugin + 3.1.0 + + + org.jbake + jbake-maven-plugin + ${jbake.maven.plugin.version} + + + org.asciidoctor + asciidoctorj + ${asciidoctorj.version} + + + org.asciidoctor + asciidoctorj-diagram + ${asciidoctorj.diagram.version} + + + org.freemarker + freemarker + ${freemarker.version} + + + + + org.asciidoctor + asciidoctor-maven-plugin + ${asciidoctorj.maven.plugin.version} + + + org.asciidoctor + asciidoctorj-pdf + ${asciidoctorj.pdf.version} + + + + + + + diff --git a/tck/docs/userguide/src/main/jbake/assets/README.md b/tck/docs/userguide/src/main/jbake/assets/README.md new file mode 100644 index 0000000..f8f962c --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/assets/README.md @@ -0,0 +1,4 @@ +# About + +The {{site.title}} project contains the [AsciiDoc](http://asciidoc.org/) +source code for the ... diff --git a/tck/docs/userguide/src/main/jbake/assets/_config.yml b/tck/docs/userguide/src/main/jbake/assets/_config.yml new file mode 100644 index 0000000..606e072 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/assets/_config.yml @@ -0,0 +1,13 @@ +remote_theme: jakartaee/jekyll-theme-jakarta-ee + +title: [tck_coa_v1_3] +description: [Jakarta EE Technology Compatibility Kit User's Guide for Jakarta Annotations, Release 3.0] + +# sidebar links url +links: + source: https://github.com/eclipse-ee4j/common-annotations-api + download: https://github.com/eclipse-ee4j/common-annotations-api/releases + #mailinglist: https://javaee.groups.io/g/tck_coa_v1_3 + #javadocs: + docs: https://jakarta.ee/specifications/annotations/3.0 + #faq: diff --git a/tck/docs/userguide/src/main/jbake/assets/css/style.css b/tck/docs/userguide/src/main/jbake/assets/css/style.css new file mode 100644 index 0000000..182f755 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/assets/css/style.css @@ -0,0 +1,313 @@ +/* CSS */ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +/** 1. Set default font family to sans-serif. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ +html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } + +/* HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined for any HTML5 element in IE 8/9. Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. Correct `block` display not defined for `main` in IE 11. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } + +/** 1. Correct `inline-block` display not defined in IE 8/9. 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ +audio, canvas, progress, video { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address `[hidden]` styling not present in IE 8/9/10. Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. */ +[hidden], template { display: none; } + +/* Links ========================================================================== */ +/** Remove the gray background color from active links in IE 10. */ +a { background-color: transparent; } + +/** Improve readability when focused and also mouse hovered in all browsers. */ +a:active, a:hover { outline: 0; } + +/* Text-level semantics ========================================================================== */ +/** Address styling not present in IE 8/9/10/11, Safari, and Chrome. */ +abbr[title] { border-bottom: 1px dotted; } + +/** Address style set to `bolder` in Firefox 4+, Safari, and Chrome. */ +b, strong { font-weight: bold; } + +/** Address styling not present in Safari and Chrome. */ +dfn { font-style: italic; } + +/** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +/** Address styling not present in IE 8/9. */ +mark { background: #ff0; color: #000; } + +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { top: -0.5em; } + +sub { bottom: -0.25em; } + +/* Embedded content ========================================================================== */ +/** Remove border when inside `a` element in IE 8/9/10. */ +img { border: 0; } + +/** Correct overflow not hidden in IE 9/10/11. */ +svg:not(:root) { overflow: hidden; } + +/* Grouping content ========================================================================== */ +/** Address margin not present in IE 8/9 and Safari. */ +figure { margin: 1em 40px; } + +/** Address differences between Firefox and other browsers. */ +hr { box-sizing: content-box; height: 0; } + +/** Contain overflow in all browsers. */ +pre { overflow: auto; } + +/** Address odd `em`-unit font size rendering in all browsers. */ +code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } + +/* Forms ========================================================================== */ +/** Known limitation: by default, Chrome and Safari on OS X allow very limited styling of `select`, unless a `border` property is set. */ +/** 1. Correct color not being inherited. Known issue: affects color of disabled elements. 2. Correct font properties not being inherited. 3. Address margins set differently in Firefox 4+, Safari, and Chrome. */ +button, input, optgroup, select, textarea { color: inherit; /* 1 */ font: inherit; /* 2 */ margin: 0; /* 3 */ } + +/** Address `overflow` set to `hidden` in IE 8/9/10/11. */ +button { overflow: visible; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. Correct `select` style inheritance in Firefox. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } + +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** Remove inner padding and border in Firefox 4+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +input { line-height: normal; } + +/** It's recommended that you don't attempt to style these elements. Firefox's implementation doesn't respect box-sizing, padding, or width. 1. Address box sizing set to `content-box` in IE 8/9/10. 2. Remove excess padding in IE 8/9/10. */ +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } + +/** Fix the cursor style for Chrome's increment/decrement buttons. For certain `font-size` values of the `input`, it causes the cursor style of the decrement button to change from `default` to `text`. */ +input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } + +/** 1. Address `appearance` set to `searchfield` in Safari and Chrome. 2. Address `box-sizing` set to `border-box` in Safari and Chrome (include `-moz` to future-proof). */ +input[type="search"] { -webkit-appearance: textfield; /* 1 */ /* 2 */ box-sizing: content-box; } + +/** Remove inner padding and search cancel button in Safari and Chrome on OS X. Safari (but not Chrome) clips the cancel button when the search input has padding (and `textfield` appearance). */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct `color` not being inherited in IE 8/9/10/11. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ +legend { border: 0; /* 1 */ padding: 0; /* 2 */ } + +/** Remove default vertical scrollbar in IE 8/9/10/11. */ +textarea { overflow: auto; } + +/** Don't inherit the `font-weight` (applied by a rule above). NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ +optgroup { font-weight: bold; } + +/* Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +td, th { padding: 0; } + +/* LAYOUT STYLES */ + +p { margin-top: 0; } + +code, pre { margin-bottom: 30px; font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; font-size: 13px; color: #222; } + +code { padding: 0 3px; background-color: #f2f8fc; border: solid 1px #dbe7f3; } + +pre { padding: 20px; overflow: auto; text-shadow: none; background: #fff; border: solid 1px #f2f2f2; } + +pre code { padding: 0; color: #2879d0; background-color: #fff; border: none; } + +ul, ol, dl { margin-bottom: 20px; } + +/* COMMON STYLES */ + +td.halign-right { text-align: right; } + +td.halign-center { text-align: center; } + +form { padding: 20px; background: #f2f2f2; } + +h2 { + font-size: 2em; + line-height: 1.2em; + font-weight: 200; + letter-spacing: 0; +} + +h3 { + font-size: 1.4em; + line-height: 1.2em; + font-weight: normal; + letter-spacing: 0; +} + +.sect1 { + margin-left: 4%; + margin-right: 4%; + font: 13px/20px Arial, Helvetica, sans-serif +} + +a:link { + text-decoration: none; + color: #09569d; +} + +#preamble hr{ + margin-left: 0%; + margin-right: 0%; +} + +#preamble .sectionbody table { + font-weight: 200; + margin-left: 4%; + margin-right: 4%; +} + +hr { + margin-bottom: 12px; +} + +table.tableblock.frame-all.grid-all.spread { + font-size: 12px; +} + +code { + font-size:.9em; + border: 1px solid #eaeaea; + background-color: #f6f6f6; + border-radius: 3px; + padding: 1px; + padding-left:2px; + padding-right:2px; +} + +pre.prettyprint.highlight { + border: 1px solid #eaeaea; + background-color: #f6f6f6; + border-radius: 4px; + padding: 8px; + padding-top:4px; + padding-bottom:4px; +} + +.language-oac_no_warn { + font-size:.9em; + color:#222; + background-color: transparent; +} + +#doc-title { + margin-left: 4%; +} + +#top-nav { + margin-left: 4%; + font-size: 12px; +} + +#bottom-nav { + margin-left: 4%; + font-size: 12px; +} + +.vector-font { + color:grey; + font-size: 20px; +} + +#copyright { + padding-top: 10px; + padding-bottom: 4px; + display: table; + margin:0 auto; + color: grey; + font-size: 12px; + vertical-align: middle; +} + +.beta {color: #FF0000} + +/* GENERAL ELEMENT TYPE STYLES */ + +/* #Media Queries +================================================== */ +/* Smaller than standard 960 (devices and browsers) */ +/* Tablet Portrait size to standard 960 (devices and browsers) */ +@media only screen and (min-width: 768px) and (max-width: 959px) { .inner { width: 740px; } + header h1, header h2 { width: 340px; } + header h1 { font-size: 60px; } + header h2 { font-size: 30px; } +} +/* All Mobile Sizes (devices and browser) */ +@media only screen and (max-width: 767px) { .inner { width: 93%; } + header { padding: 20px 0; } + header .inner { position: relative; } + header h1, header h2 { width: 100%; } + header h1 { font-size: 48px; } + header h2 { font-size: 24px; } + header a.button { position: relative; display: inline-block; width: auto; height: auto; padding: 5px 10px; margin-top: 15px; font-size: 13px; line-height: 1; color: #2879d0; text-align: center; background-color: #9ddcff; background-image: none; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } + header a.button small { display: inline; font-size: 13px; } +} +/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ +/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ + +header h1 { padding-top: 14px; font-size: 2em; font-weight: 200; line-height: 1.4; color: #FFFFFF; letter-spacing: 0px; border-bottom: 0px; } + +header h2 { font-size: 1.2em; margin-top: 0; margin-bottom: 0; font-weight: 200; line-height: .8; color: #ec7D11; letter-spacing: 0; } + +//header a.button { background: transparent url(../images/logo.png) 0 0 no-repeat; padding-left: 32px; } + +header a:hover { text-decoration: none; } + +/* Admonition (Note) block */ +.admonitionblock > table { + border: 0; + background: none; + width: 100%; + table-layout: auto; + margin-bottom: 10.5px; +} +.admonitionblock > table td.icon { + text-align: center; + width: 60px; +} +.admonitionblock > table td.icon img { + max-width: none; +} +.admonitionblock > table td.icon .title { + text-transform: uppercase; +} +.admonitionblock > table td.content { + padding-left: 1em; + padding-right: 1em; + border-left: 3px solid #ddd; +} +.admonitionblock > table td.content > :last-child > :last-child { + margin-bottom: 0; +} +.admonitionblock td.icon [class^="fa icon-"]:before { + font-size: 2.5em; + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); + cursor: default; +} +.admonitionblock td.icon .icon-note:before { + content: "\f05a"; + color: #5bc0de; +} diff --git a/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png b/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png new file mode 100644 index 0000000..ee830ae Binary files /dev/null and b/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png differ diff --git a/tck/docs/userguide/src/main/jbake/content/README b/tck/docs/userguide/src/main/jbake/content/README new file mode 100644 index 0000000..05fa2c2 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/README @@ -0,0 +1,77 @@ +The file attributes.conf defines several attributes (variables) that +need to be customized for each technology. + +The *.adoc files should not be modified. + +The following "include" files should be customized as necessary +for the specific technology: + +- rules.inc + + Additional compatibility rules needed by some technologies. + The rules in rules.adoc should NOT be changed. + +- defns.inc + + Additional definitions needed by additional compatibility + rules in rules.inc. + +- config.inc + + Detailed instructions for configuring the TCK, included in + Chapter 4. Unfortunately, these are sections 4.1 - 4.3, + so even if the TCK doesn't require 3 sections you need to + make up something, or else change the sections to "N/A". + +- packages.inc + + A simple list of Jakarta EE package names for the technology. + +- tck-packages.inc + + A list of additional software packages included in the TCK. + +- req-software.inc + + A list of software required in addition to the TCK and CI. + +- install-server.inc + + Steps to install the Jakarta EE CI, if needed. + For standalone technologies, no server may be required, + and this file can be empty. + This is used in install.adoc in section 3.2. + +- install-server-vi.inc + + Steps to install a Vendor's web server, if needed. + For standalone technologies, no web server may be required, + and this file can be empty. + This is used in install.adoc in section 3.2. + +- using-examples.inc + + Command line examples showing how to run the TCK. + +- using.inc + + Optional additional instructions for running the TCK. + +- debug-tips.inc + + Technology-specific troubleshooting tips for Chapter 6. + If this isn't needed, it can be an empty file, but toc.adoc + will need to be fixed. + +- rebuild.inc + + Special instructions for rebuilding the WAR files used by some TCKs. + If needed, customize it appropriately and define the "rebuild" + attribute in attributes.conf. + +- title.inc + Add acronym references as required do distinguish between legacy and + current APIs. + +Note that this template is NOT sufficient for the Jakarta EE platform +or Jakarta EE Web Profile. diff --git a/tck/docs/userguide/src/main/jbake/content/attributes.conf b/tck/docs/userguide/src/main/jbake/content/attributes.conf new file mode 100644 index 0000000..8d25cbf --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/attributes.conf @@ -0,0 +1,37 @@ +:TechnologyFullName: Jakarta Annotations +:TechnologyShortName: Annotations +:LegacyAcronym: CAJ +:TechnologyVersion: 3.0 +:TechnologyRI: Jakarta Annotations 3.0 +:ReleaseDate: February 2024 +:CopyrightDates: 2018, 2024 +:TechnologyRIURL: https://projects.eclipse.org/projects/ee4j.ca +:SpecificationURL: https://jakarta.ee/specifications/annotations/3.0/ +:TCKInquiryList: mailto:jakartaee-tck-dev@eclipse.org[jakartaee-tck-dev@eclipse.org] +:SpecificationInquiryList: mailto:ca-dev@eclipse.org[ca-dev@eclipse.org] +:techID: Annotations +// Define this attribute (uncomment it) if the TCK includes no API tests. (Rare.) +// :no-api-tests: +// Define this attribute (uncomment it) if the TCK includes end-to-end tests. +// :end-to-end-tests: +// Define this attribute (uncomment it) if subsets of the API are allowed. +// (Common Annotations only) +// :subset-allowed: +// +// The environment variable used to specify the home directory +// for the technology. Used in config.inc. +:TechnologyHomeEnv: CAJ_HOME +// Java SE version required. +:SEversion: 17 +:AntVersion: 1.10+ +:JakartaEEVersion: 11 +:JavaTestVersion: 5.0 +:jteFileName: /bin/ts.jte +:jtxFileName: /bin/ts.jtx +:TCKPackageName: jakarta-annotations-tck-3.0.0.zip +// Directory names used in examples in using.adoc. +:sigTestDirectoryExample: /src/com/sun/ts/tests/signaturetest/caj +:singleTestDirectoryExample: /src/com/sun/ts/tests/caj/api/client +:subsetTestDirectoryExample: /src/com/sun/ts/tests/caj/api +// Define this attribute (uncomment it) if the TCK needs the rebuild appendix. +// :rebuild: diff --git a/tck/docs/userguide/src/main/jbake/content/config.adoc b/tck/docs/userguide/src/main/jbake/content/config.adoc new file mode 100644 index 0000000..ff8b863 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/config.adoc @@ -0,0 +1,353 @@ +type=page +status=published +title=Setup and Configuration +next=using.html +prev=install.html +~~~~~~ +include::attributes.conf[] +Setup and Configuration +======================= + +[[GBFVV]] + + + +[[setup-and-configuration]] +4 Setup and Configuration +------------------------- + + +[NOTE] +==== +The Jakarta EE Specification process provides for any number of compatible implementations. +As additional implementations become available, refer to project or product documentation from +those vendors for specific TCK setup and operational guidance. + +==== + +This chapter describes how to set up the {TechnologyShortName} TCK and +JavaTest harness software. Before proceeding with the instructions in +this chapter, be sure to install all required software, as described in +link:install.html#GBFTP[Chapter 3, "Installation."] + +After completing the instructions in this chapter, proceed to +link:using.html#GBFWO[Chapter 5, "Executing Tests,"] for instructions on +running the {TechnologyShortName} TCK. + +include::config.inc[] + +[[GHGDH]][[custom-configuration-handlers]] + +4.4 Custom Configuration Handlers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configuration handlers are used to configure and unconfigure a +{TechnologyShortName} {TechnologyVersion} implementation during the +certification process. These are similar to deployment handlers but +used for configuration. A configuration handler is an Ant build file +that contains at least the required targets listed below: + + * `config.vi` - to configure the vendor implementation + * `clean.vi` - to unconfigure the vendor implementation + +These targets are called from the `/bin/build.xml` file and +call down into the implementation-specific configuration handlers. + +To provide your own configuration handler, create a config.vi.xml file +with the necessary configuration steps for your implementation and place +the file under the `/bin/xml/impl/` directory. + +For more information, you may wish to view `/bin/xml/impl/glassfish/config.vi.xml`, +the configuration file for Jakarta EE {JakartaEEVersion} Compatible Implementation, Eclipse GlassFish. + +[[GBFWG]][[custom-deployment-handlers]] + +4.5 Custom Deployment Handlers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Deployment handlers are used to deploy and undeploy the WAR files that +contain the tests to be run during the certification process. A deployment +handler is an Ant build file that contains at least the required targets +listed in the table below. + +The {TechnologyShortName} TCK provides these deployment handlers: + +* `/bin/xml/impl/none/deploy.xml` +* `/bin/xml/impl/glassfish/deploy.xml` +* `/bin/xml/impl/tomcat/deploy.xml` + +The `deploy.xml` files in each of these directories are used to control +deployment to a specific container (no deployment, deployment to +the Eclipse GlassFish Web container, deployment to the Tomcat Web container) +denoted by the name of the directory in which each `deploy.xml` file +resides. The primary `build.xml` file in the `/bin` directory +has a target to invoke any of the required targets (`-deploy`, `-undeploy`, +`-deploy.all`, `-undeploy.all`). + +[[GBFVA]][[create-custom-deployment-handler]] + +4.5.1 To Create a Custom Deployment Handler +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To deploy tests to another {TechnologyShortName} implementation, you +must create a custom handler. + +1. Create a new directory in the `/bin/xml/impl` directory tree. + For example, create the `/bin/xml/impl/my_deployment_handler` directory. + Replace my_deployment_handler with the value of the impl.vi + property that you set in Step 5 of the configuration procedure + described in Section 4.2, "Configuring Your Environment to Repackage + and Run the TCK Against the Vendor Implementation". + +2. Copy the deploy.xml file from the `/bin/xml/impl/none` + directory to the directory that you created. + +3. Modify the required targets in the `deploy.xml` file. This is what + the `deploy.xml` file for the "none" deployment handler looks like. + ++ +[source,oac_no_warn] +---- + + + + + + + + + + + + + + + +---- ++ +Although this example just echoes messages, it does include the four +required Ant targets (`-deploy`, `-undeploy`, `-deploy.all`, `-undeploy.all`) +that your custom `deploy.xml` file must contain. With this as your +starting point, look at the required targets in the `deploy.xml` files +in the Tomcat and Eclipse Glassfish directories for guidance as you create +the same targets for the Web container in which you will run your +implementation of {TechnologyShortName}. + +The following Ant targets can be called from anywhere under the +`/src` directory: + +* `deploy` +* `undeploy` +* `deploy.all` +* `undeploy.all` + +The `deploy.all` and `undeploy.all` targets can also be called from the +`/bin` directory. + +[NOTE] +======================================================================= +The targets in the `deploy.xml` file are never called directly. +They are called indirectly by the targets listed above. +======================================================================= + +[[GBFUY]][[using-the-javatest-harness-software]] + +4.6 Using the JavaTest Harness Software +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are two general ways to run the {TechnologyShortName} TCK test +suite using the JavaTest harness software: + +* Through the JavaTest GUI; if using this method, please continue on to +link:#GBFWG[Section 4.7, "Using the JavaTest Harness Configuration +GUI."] +* In JavaTest batch mode, from the command line in your shell +environment; if using this method, please proceed directly to +link:using.html#GBFWO[Chapter 5, "Executing Tests."] + +[[GBFWG]][[using-the-javatest-harness-configuration-gui]] + +4.7 Using the JavaTest Harness Configuration GUI +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can use the JavaTest harness GUI to modify general test settings and +to quickly get started with the default {TechnologyShortName} TCK test +environment. This section covers the following topics: + +* link:#GBFVA[Configuration GUI Overview] +* link:#GBFVD[Starting the Configuration GUI] +* link:#GBFVX[To Configure the JavaTest Harness to Run the +{TechnologyShortName} TCK Tests] +* link:#GBFUU[Modifying the Default Test Configuration] + + +[NOTE] +======================================================================= + +It is only necessary to proceed with this section if you want to run the +JavaTest harness in GUI mode. If you plan to run the JavaTest harness in +command-line mode, skip the remainder of this chapter, and continue with +link:using.html#GBFWO[Chapter 5, "Executing Tests."] + +======================================================================= + + +[[GBFVA]][[configuration-gui-overview]] + +4.7.1 Configuration GUI Overview +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In order for the JavaTest harness to execute the test suite, it requires +information about how your computing environment is configured. The +JavaTest harness requires two types of configuration information: + +* Test environment: This is data used by the tests. For example, the +path to the Java runtime, how to start the product being tested, network +resources, and other information required by the tests in order to run. +This information does not change frequently and usually stays constant +from test run to test run. +* Test parameters: This is information used by the JavaTest harness to +run the tests. Test parameters are values used by the JavaTest harness +that determine which tests in the test suite are run, how the tests +should be run, and where the test reports are stored. This information +often changes from test run to test run. + +The first time you run the JavaTest harness software, you are asked to +specify the test suite and work directory that you want to use. (These +parameters can be changed later from within the JavaTest harness GUI.) + +Once the JavaTest harness GUI is displayed, whenever you choose Start, +then Run Tests to begin a test run, the JavaTest harness determines +whether all of the required configuration information has been supplied: + +* If the test environment and parameters have been completely +configured, the test run starts immediately. +* If any required configuration information is missing, the +configuration editor displays a series of questions asking you the +necessary information. This is called the configuration interview. When +you have entered the configuration data, you are asked if you wish to +proceed with running the test. + +[[GBFVD]][[starting-the-configuration-gui]] + +4.7.2 Starting the Configuration GUI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Before you start the JavaTest harness software, you must have a valid +test suite and Java SE {SEversion} installed on your system. + +The {TechnologyShortName} TCK includes an Ant script that is used to execute the +JavaTest harness from the `` directory. Using this Ant script +to start the JavaTest harness is part of the procedure described in +link:#GBFVX[Section 4.7.3, "To Configure the JavaTest Harness to Run the +TCK Tests."] + +When you execute the JavaTest harness software for the first time, the +JavaTest harness displays a Welcome dialog box that guides you through +the initial startup configuration. + +* If it is able to open a test suite, the JavaTest harness displays a +Welcome to JavaTest dialog box that guides you through the process of +either opening an existing work directory or creating a new work +directory as described in the JavaTest online help. +* If the JavaTest harness is unable to open a test suite, it displays a +Welcome to JavaTest dialog box that guides you through the process of +opening both a test suite and a work directory as described in the +JavaTest documentation. + +After you specify a work directory, you can use the Test Manager to +configure and run tests as described in link:#GBFVX[Section 4.7.3, "To +Configure the JavaTest Harness to Run the TCK Tests."] + +[[GBFVX]][[to-configure-the-javatest-harness-to-run-the-tck-tests]] + +4.7.3 To Configure the JavaTest Harness to Run the TCK Tests +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The answers you give to some of the configuration interview questions +are specific to your site. For example, the name of the host on which +the JavaTest harness is running. Other configuration parameters can be +set however you wish. For example, where you want test report files to +be stored. + +Note that you only need to complete all these steps the first time you +start the JavaTest test harness. After you complete these steps, you can +either run all of the tests by completing the steps in +link:using.html#GBFUZ[Section 5.1, "Starting JavaTest,"] or run a subset +of the tests by completing the steps in link:using.html#GBFWM[Section +5.2, "Running a Subset of the Tests."] + +1. Change to the `/bin` directory and start the JavaTest test +harness: + +`cd /bin` + +`ant gui` +2. From the File menu, click *Open Quick Start Wizard*. + +The Welcome screen displays. +3. Select *Start a new test run*, and then click *Next*. + +You are prompted to create a new configuration or use a configuration +template. +4. Select *Create a new configuration*, and then click *Next*. + +You are prompted to select a test suite. +5. Accept the default suite (`/src`), and then click *Next*. + +You are prompted to specify a work directory to use to store your test +results. +6. Type a work directory name or use the *Browse* button to select a work +directory, and then click *Next*. + +You are prompted to start the configuration editor or start a test run. +At this point, the {TechnologyShortName} TCK is configured to run the +default test suite. +7. Deselect the *Start the configuration editor* option, and then click +*Finish*. +8. Click *Run Tests*, then click *Start*. + +The JavaTest harness starts running the tests. +9. To reconfigure the JavaTest test harness, do one of the following: +* Click *Configuration*, then click *New Configuration*. +* Click *Configuration*, then click *Change Configuration*. +10. Click *Report*, and then click *Create Report*. +11. Specify the directory in which the JavaTest test harness will write +the report, and then click *OK*. + +A report is created, and you are asked whether you want to view it. +12. Click *Yes* to view the report. + +[[GBFUU]][[modifying-the-default-test-configuration]] + +4.7.4 Modifying the Default Test Configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The JavaTest GUI enables you to configure numerous test options. These +options are divided into two general dialog box groups: + +* Group 1: Available from the JavaTest *Configure/Change Configuration* +submenus, the following options are displayed in a tabbed dialog box: + +** *Tests to Run* + +** *Exclude List* + +** *Keywords* + +** *Prior Status* + +** *Test Environment* + +** *Concurrency* + +** *Timeout Factor* +* Group 2: Available from the JavaTest *Configure/Change +Configuration/Other Values* submenu, or by pressing `Ctrl+E`, the following +options are displayed in a paged dialog box: + +** *Environment Files* + +** *Test Environment* + +** *Specify Tests to Run* + +** *Specify an Exclude List* + +Note that there is some overlap between the functions in these two +dialog boxes; for those functions use the dialog box that is most +convenient for you. Please refer to the JavaTest Harness documentation +or the online help for complete information about these various options. + + diff --git a/tck/docs/userguide/src/main/jbake/content/config.inc b/tck/docs/userguide/src/main/jbake/content/config.inc new file mode 100644 index 0000000..6fe83c7 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/config.inc @@ -0,0 +1,118 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +The following sections should be customized for the technology. +This text was originally from the JAX-RS TCK. Most references +to JAX-RS have been parameterized to serve as a simple starting +point for customization. There are still many details that will +need to be changed or removed. The major sections 4.1, 4.2, and +4.3 should be preserved. If their titles are changed, the links +at the top of config.adoc will need to be changed as well as well +as toc.adoc. +/////////////////////////////////////////////////////////////////////// + +[[GBFVU]][[configuring-your-environment-to-run-the-tck-against-the-reference-implementation]] + +4.1 Configuring Your Environment to Run the TCK Against a Compatible Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After configuring your environment as described in this section, +continue with the instructions in link:#GBFUY[Section 4.4, "Using the +JavaTest Harness Software."] + + +[NOTE] +======================================================================= + +In these instructions, variables in angle brackets need to be expanded +for each platform. For example, `` becomes `$TS_HOME` on +Solaris/Linux and `%TS_HOME%` on Windows. In addition, the forward +slashes (`/`) used in all of the examples need to be replaced with +backslashes (`\`) for Windows. Finally, be sure to use the appropriate +separator for your operating system when specifying multiple path +entries (`;` on Windows, `:` on UNIX/Linux). + +On Windows, you must escape any backslashes with an extra backslash in +path separators used in any of the following properties, or use forward +slashes as a path separator instead. + +======================================================================= + + +1. Set the following environment variables in your shell environment: + a. `JAVA_HOME` to the directory in which Java SE 8 is installed + b. `TS_HOME` to the directory in which the {TechnologyShortName} TCK + {TechnologyVersion} software is installed + c. `PATH` to include the following directories: `JAVA_HOME/bin`, + +{TechnologyHomeEnv}/bin+, and `ANT_HOME/bin` +2. Copy /bin/ts.jte.jdk11 as /bin/ts.jte if JAVA_HOME is Java SE 11. +Edit your `/bin/ts.jte` file and set the following +environment variables: + a. Set the `local.classes` + property to point to a Jakarta Annotations CI classes/jars that contain the + annotations being supported in Step link:#BABJHHAJ[c], below. + b. Set the `endorsed.dirs` + property to the location of the CI API jars for those technologies you + wish to override that exist within the JDK. + c. [[BABJHHAJ]] Depending on the annotations that are supported or unsupported in your + Jakarta Annotations implementation, the following properties + should be set to `true` or `false` respectively. + + By default, all of these annotations are supported in the Jakarta Annotations CI. + +[source,oac_no_warn] +---- +#jakarta.annotation.Generated +ca.sig.generated=true + +#jakarta.annotation.ManagedBean +ca.sig.managedbean=true + +#jakarta.annotation.PostConstruct +ca.sig.postconstruct=true + +#jakarta.annotation.PreDestroy +ca.sig.predestroy=true + +#jakarta.annotation.Priorityca.sig.priority=true + +#jakarta.annotation.Resource +ca.sig.resource=true + +#jakarta.annotation.Resources +ca.sig.resources=true + +#jakarta.annotation.security.DeclareRoles +ca.sig.securitydeclareroles=true + +#jakarta.annotation.security.DenyAll +ca.sig.securitydenyall=true + +#jakarta.annotation.security.PermitAll +ca.sig.securitypermitall=true + +#jakarta.annotation.security.RolesAllowed +ca.sig.securityrolesallowed=true + +#jakarta.annotation.security.RunAs +ca.sig.securityrunas=true + +#jakarta.annotation.sql.DataSourceDefinition +ca.sig.sqldatasourcedefinition=true + +#jakarta.annotation.sql.DataSourceDefinitions +ca.sig.sqldatasourcedefinitions=true +---- + d. Run the JavaTest harness in GUI or command-line mode, as described +in link:#GBFUY[Section 4.4, "Using the JavaTest Harness Software."] + +[[GCLHU]][[configuring-your-environment-to-repackage-and-run-the-tck-against-the-vendor-implementation]] + +4.2 Configuring Your Environment to Repackage and Run the TCK Against the Vendor Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is not required for the Jakarta Annotations TCK. + +[[GHGDG]][[publishing-the-test-applications]] + +4.3 Publishing the Test Applications +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is not required for the Jakarta Annotations TCK. diff --git a/tck/docs/userguide/src/main/jbake/content/debug-tips.inc b/tck/docs/userguide/src/main/jbake/content/debug-tips.inc new file mode 100644 index 0000000..813e2c0 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/debug-tips.inc @@ -0,0 +1,15 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +The following sections should be customized for the technology. +This text was originally from the JACC TCK. Some references +to JACC have been parameterized to serve as a simple starting +point for customization. There are still many details that will +need to be changed or removed. +/////////////////////////////////////////////////////////////////////// + +[[GBFHA]][[troubleshooting-tips]] + +6.7 Troubleshooting Tips +~~~~~~~~~~~~~~~~~~~~~~~~ + +None for the Jakarta Annotations TCK. diff --git a/tck/docs/userguide/src/main/jbake/content/debug.adoc b/tck/docs/userguide/src/main/jbake/content/debug.adoc new file mode 100644 index 0000000..5208c40 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/debug.adoc @@ -0,0 +1,174 @@ +type=page +status=published +title=Debugging Test Problems +next=faq.html +prev=using.html +~~~~~~ +include::attributes.conf[] +Debugging Test Problems +======================= + +[[GBFUV]] + + +[[debugging-test-problems]] +6 Debugging Test Problems +------------------------- + +There are a number of reasons that tests can fail to execute properly. +This chapter provides some approaches for dealing with these failures. +Please note that most of these suggestions are only relevant when +running the test harness in GUI mode. + +This chapter includes the following topics: + +* link:#GBFYP[Overview] +* link:#GBFVF[Test Tree] +* link:#GBFWI[Folder Information] +* link:#GBFVP[Test Information] +* link:#GBFVZ[Report Files] +* link:#GBFYF[Configuration Failures] + +[[GBFYP]][[overview]] + +6.1 Overview +~~~~~~~~~~~~ + +The goal of a test run is for all tests in the test suite that are not +filtered out to have passing results. If the root test suite folder +contains tests with errors or failing results, you must troubleshoot and +correct the cause to satisfactorily complete the test run. + +* Errors: Tests with errors could not be executed by the JavaTest +harness. These errors usually occur because the test environment is not +properly configured. +* Failures: Tests that fail were executed but had failing results. + +The Test Manager GUI provides you with a number of tools for effectively +troubleshooting a test run. See the JavaTest User's Guide and JavaTest +online help for detailed descriptions of the tools described in this +chapter. Ant test execution tasks provide command-line users with +immediate test execution feedback to the display. Available JTR report +files and log files can also help command-line users troubleshoot test +run problems. + +For every test run, the JavaTest harness creates a set of report files +in the reports directory, which you specified by setting the +`report.dir` property in the +{jteFileName}+ file. The report files contain +information about the test description, environment, messages, +properties used by the test, status of the test, and test result. After +a test run is completed, the JavaTest harness writes HTML reports for +the test run. You can view these files in the JavaTest ReportBrowser +when running in GUI mode, or in the Web browser of your choice outside +the JavaTest interface. To see all of the HTML report files, enter the +URL of the `report.html` file. This file is the root file that links to +all of the other HTML reports. + +The JavaTest harness also creates a `summary.txt` file in the report +directory that you can open in any text editor. The `summary.txt` file +contains a list of all tests that were run, their test results, and +their status messages. + +The work directory, which you specified by setting the `work.dir` +property in the +{jteFileName}+ file, contains several files that were +deposited there during test execution: `harness.trace`, `log.txt`, +`lastRun.txt`, and `testsuite`. Most of these files provide information +about the harness and environment in which the tests were executed. + +[NOTE] +======================================================================= + +You can set `harness.log.traceflag=true` in +{jteFileName}+ to +get more debugging information. + +======================================================================= + +If a large number of tests failed, you should read +link:#GBFYF[Configuration Failures] to see if a +configuration issue is the cause of the failures. + + +[[GBFVF]][[test-tree]] + +6.2 Test Tree +~~~~~~~~~~~~~ + +Use the test tree in the JavaTest GUI to identify specific folders and +tests that had errors or failing results. Color codes are used to +indicate status as follows: + +* Green: Passed +* Blue: Test Error +* Red: Failed to pass test +* White: Test not run +* Gray: Test filtered out (not run) + +[[GBFWI]][[folder-information]] + +6.3 Folder Information +~~~~~~~~~~~~~~~~~~~~~~ + +Click a folder in the test tree in the JavaTest GUI to display its tabs. + +Choose the Error and the Failed tabs to view the lists of all tests in +and under a folder that were not successfully run. You can double-click +a test in the lists to view its test information. + +[[GBFVP]][[test-information]] + +6.4 Test Information +~~~~~~~~~~~~~~~~~~~~ + +To display information about a test in the JavaTest GUI, click its icon +in the test tree or double-click its name in a folder status tab. The +tab contains detailed information about the test run and, at the bottom +of the window, a brief status message identifying the type of failure or +error. This message may be sufficient for you to identify the cause of +the error or failure. + +If you need more information to identify the cause of the error or +failure, use the following tabs listed in order of importance: + +* Test Run Messages contains a Message list and a Message section that +display the messages produced during the test run. +* Test Run Details contains a two-column table of name/value pairs +recorded when the test was run. +* Configuration contains a two-column table of the test environment +name/value pairs derived from the configuration data actually used to +run the test. + + +[NOTE] +======================================================================= + +You can set `harness.log.traceflag=true` in +{jteFileName}+ to +get more debugging information. + +======================================================================= + + +[[GBFVZ]][[report-files]] + +6.5 Report Files +~~~~~~~~~~~~~~~~ + +Report files are another good source of troubleshooting information. You +may view the individual test results of a batch run in the JavaTest +Summary window, but there are also a wide range of HTML report files +that you can view in the JavaTest ReportBrowser or in the external +browser or your choice following a test run. See +link:using.html#GBFVK[Section 5.5, "Test Reports,"] for more information. + +[[GBFYF]][[configuration-failures]] + +6.6 Configuration Failures +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configuration failures are easily recognized because many tests fail the +same way. When all your tests begin to fail, you may want to stop the +run immediately and start viewing individual test output. However, in +the case of full-scale launching problems where no tests are actually +processed, report files are usually not created (though sometimes a +small `harness.trace` file in the report directory is written). + +include::debug-tips.inc[] diff --git a/tck/docs/userguide/src/main/jbake/content/defns.inc b/tck/docs/userguide/src/main/jbake/content/defns.inc new file mode 100644 index 0000000..038db2d --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/defns.inc @@ -0,0 +1,46 @@ +// NOTE TO WRITERS: +// Most technologies will only need the compatibility rules in rules.adoc. +// Some technologies will need additional definitions to go with additional +// rules. If they're needed, remove the comment characters below +// and update the definitions as appropriate. +// +// The first block below is additional definitions needed by +// Jakarta XML Web Services. +// +// The second block below is additional defintions needed by +// Jakarta Server Pages. +// +// NOTE: This set of examples is NOT complete, but should be. +// +// +// Jakarta XML Web Services +// +// |Development Kit |A software product that implements or incorporates a +// Compiler, a Schema Compiler, a Schema Generator, a Java-to-WSDL Tool, a +// WSDL-to-Java Tool, and/or an RMI Compiler. +// +// |Java-to-WSDL Output |Output of a Java-to-WSDL Tool that is required for +// Web service deployment and invocation. +// +// |Java-to-WSDL Tool |A software development tool that implements or +// incorporates a function that generates web service endpoint descriptions +// in WSDL and XML schema format from Source Code as specified by the +// Jakarta XML Web Services Specification. +// +// |WSDL-to-Java Output |Output of a WSDL-to-Java tool that is required for +// Web service deployment and invocation. +// +// |WSDL-to-Java Tool |A software development tool that implements or +// incorporates a function that generates web service interfaces for +// clients and endpoints from a WSDL description as specified by the +// Jakarta XML Web Services Specification. +// +// +// Jakarta Server Pages +// +// |Jakarta Server Page |A text-based document that uses Jakarta Server +// Pages technology. +// +// |Jakarta Server Page Implementation Class |A program constructed by +// transforming the Jakarta Server Page text into a Java language program +// using the transformation rules described in the Specifications. diff --git a/tck/docs/userguide/src/main/jbake/content/faq.adoc b/tck/docs/userguide/src/main/jbake/content/faq.adoc new file mode 100644 index 0000000..97ca394 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/faq.adoc @@ -0,0 +1,62 @@ +type=page +status=published +title=Appendix A: Frequently Asked Questions +next=rebuild.html +prev=debug.html +~~~~~~ +include::attributes.conf[] +Appendix A: Frequently Asked Questions +====================================== + +[[GBFYD]] + + +[[a-frequently-asked-questions]] +A Frequently Asked Questions +---------------------------- + +This appendix contains the following questions. + +* link:#GBFYQ[Where do I start to debug a test failure?] +* link:#GBFYR[How do I restart a crashed test run?] +* link:#GBFWU[What would cause tests be added to the exclude list?] + +[[GBFYQ]][[a.1-where-do-i-start-to-debug-a-test-failure]] + +A.1 Where do I start to debug a test failure? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +From the JavaTest GUI, you can view recently run tests using the Test +Results Summary, by selecting the red Failed tab or the blue Error tab. +See link:debug.html#GBFUV[Chapter 6, "Debugging Test Problems,"] for more +information. + +[[GBFYR]][[a.2-how-do-i-restart-a-crashed-test-run]] + +A.2 How do I restart a crashed test run? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you need to restart a test run, you can figure out which test crashed +the test suite by looking at the `harness.trace` file. The +`harness.trace` file is in the report directory that you supplied to the +JavaTest GUI or parameter file. Examine this trace file, then change the +JavaTest GUI initial files to that location or to a directory location +below that file, and restart. This will overwrite only `.jtr` files that +you rerun. As long as you do not change the value of the GUI work +directory, you can continue testing and then later compile a complete +report to include results from all such partial runs. + +[[GBFWU]][[a.3-what-would-cause-tests-be-added-to-the-exclude-list]] + +A.3 What would cause tests be added to the exclude list? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The JavaTest exclude file (+{jtxFileName}+) contains all tests that are not +required to be run. The following is a list of reasons for a test to be +included in the Exclude List: + +* An error in a Compatible Implementation that does not allow the test to +execute properly has been discovered. +* An error in the specification that was used as the basis of the test +has been discovered. +* An error in the test has been discovered. diff --git a/tck/docs/userguide/src/main/jbake/content/install-server-vi.inc b/tck/docs/userguide/src/main/jbake/content/install-server-vi.inc new file mode 100644 index 0000000..e69de29 diff --git a/tck/docs/userguide/src/main/jbake/content/install-server.inc b/tck/docs/userguide/src/main/jbake/content/install-server.inc new file mode 100644 index 0000000..e69de29 diff --git a/tck/docs/userguide/src/main/jbake/content/install.adoc b/tck/docs/userguide/src/main/jbake/content/install.adoc new file mode 100644 index 0000000..a3b93e7 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/install.adoc @@ -0,0 +1,86 @@ +type=page +status=published +title=Installation +next=config.html +prev=rules.html +~~~~~~ +include::attributes.conf[] +Installation +============ + +[[GBFTP]] + + +[[installation]] +3 Installation +-------------- + +This chapter explains how to install the {TechnologyFullName} TCK software. + +After installing the software according to the instructions in this +chapter, proceed to link:config.html#GBFVV[Chapter 4, "Setup and +Configuration,"] for instructions on configuring your test environment. + +[[GBFUD]][[obtaining-the-reference-implementation]] + +3.1 Obtaining a Compatible Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Each compatible implementation (CI) will provide instructions for obtaining +their implementation. +{TechnologyRI} is a compatible implementation which may be obtained +from {TechnologyRIURL} + +[[GBFTS]][[installing-the-software]] + +3.2 Installing the Software +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before you can run the {TechnologyShortName} TCK tests, you must +install and set up the following software components: + +include::req-software.inc[] +* Java SE {SEversion} +* Apache Ant {AntVersion} +* A CI for {TechnologyShortName} {TechnologyVersion}, one example is {TechnologyRI} +* {TechnologyShortName} TCK version {TechnologyVersion}, which includes: +include::tck-packages.inc[] +* The {TechnologyShortName} {TechnologyVersion} Vendor Implementation (VI) + +Follow these steps: + +. Install the Java SE {SEversion} software, if it is not already installed. + +Download and install the Java SE {SEversion} software from +http://www.oracle.com/technetwork/java/javase/downloads/index.html. +Refer to the installation instructions that accompany the software for +additional information. +. Install the Apache Ant {AntVersion} software, if it is not already installed. + +Download and install Apache Ant {AntVersion} software from Apache Ant +Project. For complete information about Ant, refer to the extensive documentation +on the Apache Ant Project site. The Apache Ant Manual is available at +`http://ant.apache.org/manual/index.html`. +Apache Ant is protected under the Apache Software, License 2.0, which is +is available on the Apache Ant Project license page at +`http://ant.apache.org/license.html`. +. Install the {TechnologyShortName} TCK {TechnologyVersion} software. + a. Copy or download the {TechnologyShortName} TCK software to your + local system. + + You can obtain the {TechnologyShortName} TCK software from the + Jakarta EE site {SpecificationURL}. + b. Use the `unzip` command to extract the bundle in the directory of + your choice: + + +unzip {TCKPackageName}+ + + This creates the TCK directory. The TCK is the test suite home, + ``. +include::install-server.inc[] +. Install a {TechnologyShortName} {TechnologyVersion} Compatible +Implementation. + +A Compatible Implementation is used to validate your initial +configuration and setup of the {TechnologyShortName} TCK +{TechnologyVersion} tests, which are explained further in +link:config.html#GBFVV[Chapter 4, "Setup and Configuration."] + +The Compatible Implementations for {TechnologyShortName} are listed on +the Jakarta EE Specifications web site: {SpecificationURL}. +include::install-server-vi.inc[] +. Install the {TechnologyShortName} VI to be tested. + +Follow the installation instructions for the particular VI under test. diff --git a/tck/docs/userguide/src/main/jbake/content/intro.adoc b/tck/docs/userguide/src/main/jbake/content/intro.adoc new file mode 100644 index 0000000..774adfd --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/intro.adoc @@ -0,0 +1,349 @@ +type=page +status=published +title=Introduction +next=rules.html +prev=preface.html +~~~~~~ +include::attributes.conf[] +Introduction +============ + +[[GBFOW]] + + +[[introduction]] +1 Introduction +-------------- + +This chapter provides an overview of the principles that apply +generally to all Technology Compatibility Kits (TCKs) and describes the +{TechnologyFullName} TCK ({TechnologyShortName} {TechnologyVersion} TCK). +It also includes a high level listing +of what is needed to get up and running with the {TechnologyShortName} +TCK. + +This chapter includes the following topics: + +* link:#GBFTK[Compatibility Testing] +* link:#GBFQR[About the TCK] +* link:#GBFQW[Getting Started With the TCK] + +[[GBFTK]][[compatibility-testing]] + +1.1 Compatibility Testing +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Compatibility testing differs from traditional product testing in a +number of ways. The focus of compatibility testing is to test those +features and areas of an implementation that are likely to differ across +other implementations, such as those features that: + +* Rely on hardware or operating system-specific behavior +* Are difficult to port +* Mask or abstract hardware or operating system behavior + +Compatibility test development for a given feature relies on a complete +specification and compatible implementation (CI) for that feature. +Compatibility testing is not primarily concerned with robustness, +performance, nor ease of use. + +[[GBFQN]][[why-compatibility-testing-is-important]] + +1.1.1 Why Compatibility Testing is Important +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Jakarta platform compatibility is important to different groups involved +with Jakarta technologies for different reasons: + +* Compatibility testing ensures that the Jakarta platform does not become +fragmented as it is ported to different operating systems and hardware +environments. +* Compatibility testing benefits developers working in the Jakarta +programming language, allowing them to write applications once and then +to deploy them across heterogeneous computing environments without +porting. +* Compatibility testing allows application users to obtain applications +from disparate sources and deploy them with confidence. +* Conformance testing benefits Jakarta platform implementors by ensuring a +level playing field for all Jakarta platform ports. + +[[GBFPR]][[tck-compatibility-rules]] + +1.1.2 TCK Compatibility Rules +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Compatibility criteria for all technology implementations are embodied +in the TCK Compatibility Rules that apply to a specified technology. +Each TCK tests for adherence to these Rules as described in +link:rules.html#GBFSN[Chapter 2, "Procedure for Certification."] + +[[GBFPW]][[tck-overview]] + +1.1.3 TCK Overview +^^^^^^^^^^^^^^^^^^ + +A TCK is a set of tools and tests used to verify that a vendor's compatible +implementation of a Jakarta EE technology conforms to the applicable +specification. All tests in the TCK are based on the written +specifications for the Jakarta EE platform. A TCK tests compatibility of a +vendor's compatible implementation of the technology to the applicable +specification of the technology. Compatibility testing is a means of +ensuring correctness, completeness, and consistency across all +implementations developed by technology licensees. + +The set of tests included with each TCK is called the test suite. Most +tests in a TCK's test suite are self-checking, but some tests may +require tester interaction. Most tests return either a Pass or Fail +status. For a given platform to be certified, all of the required tests +must pass. The definition of required tests may change from platform to +platform. + +The definition of required tests will change over time. Before your +final certification test pass, be sure to download the latest version +of this TCK. + +[[GBFPB]][[java-community-process-jcp-program-and-compatibility-testing]] + +1.1.4 Jakarta EE Specification Process (JESP) Program and Compatibility Testing +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The Jakarta EE Specification Process (JESP) program is the formalization of the +open process that has been used since 2019 to develop and revise Jakarta EE +technology specifications in cooperation with the international Jakarta EE +community. The JESP program specifies that the following three major +components must be included as deliverables in a final Jakarta EE technology +release under the direction of the responsible Expert Group: + +* Technology Specification +* Compatible Implementation (CI) +* Technology Compatibility Kit (TCK) + +For further information about the JESP program, go to Jakarta EE Specification +Process community page https://jakarta.ee/specifications. + +[[GBFQR]][[about-the-tck]] + +1.2 About the TCK +~~~~~~~~~~~~~~~~~ + +The {TechnologyShortName} TCK {TechnologyVersion} is designed as a +portable, configurable, automated test suite for verifying the +compatibility of a vendor's implementation of the +{TechnologyShortName} {TechnologyVersion} Specification. + +[[GBFQV]][[tck-specifications-and-requirements]] + +1.2.1 TCK Specifications and Requirements +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This section lists the applicable requirements and specifications. + +* Specification Requirements: Software requirements for a +{TechnologyShortName} implementation are described in detail in the +{TechnologyShortName} {TechnologyVersion} Specification. Links to the +{TechnologyShortName} specification and other product information can +be found at {SpecificationURL}. +* {TechnologyShortName} Version: The {TechnologyShortName} {TechnologyVersion} TCK +is based on the {TechnologyShortName} +Specification, Version {TechnologyVersion}. +* Compatible Implementation: One {TechnologyShortName} +{TechnologyVersion} Compatible Implementation, {TechnologyRI} is +available from the Eclipse EE4J project +(https://projects.eclipse.org/projects/ee4j). See the CI documentation page at +{TechnologyRIURL} for more information. + +See the {TechnologyShortName} TCK Release Notes for more specific +information about Java SE version requirements, supported platforms, +restrictions, and so on. + +[[GBFSQ]][[tck-components]] + +1.2.2 TCK Components +^^^^^^^^^^^^^^^^^^^^ + +The {TechnologyShortName} TCK {TechnologyVersion} includes the +following components: + +* JavaTest harness version {JavaTestVersion} and related documentation. See +link:https://wiki.openjdk.java.net/display/CodeTools/JT+Harness[JT Harness web site] +for additional information. +* {TechnologyShortName} TCK signature tests; check that all public APIs +are supported and/or defined as specified in the {TechnologyShortName} +Version {TechnologyVersion} implementation under test. +* If applicable, an exclude list, which provides a list of tests that your +implementation is not required to pass. +ifndef::no-api-tests[] +* API tests for all of the {TechnologyShortName} API in all related packages: +include::packages.inc[] +endif::no-api-tests[] +ifdef::end-to-end-tests[] +* End-to-end tests that demonstrate compliance with the {TechnologyFullName} +Specification. +endif::end-to-end-tests[] + +The {TechnologyShortName} TCK tests run on the following platforms: + +include::platforms.inc[] + +[[GBFSA]][[javatest-harness]] + +1.2.3 JavaTest Harness +^^^^^^^^^^^^^^^^^^^^^^ + +The JavaTest harness version {JavaTestVersion} is a set of tools +designed to run and manage test suites on different Java platforms. +To JavaTest, Jakarta EE can be considered another platform. +The JavaTest harness can be described as both a Java application and a set +of compatibility testing tools. It can run tests on different kinds of +Java platforms and it allows the results to be browsed online within +the JavaTest GUI, or offline in the HTML reports that the JavaTest +harness generates. + +The JavaTest harness includes the applications and tools that are used +for test execution and test suite management. It supports the following +features: + +* Sequencing of tests, allowing them to be loaded and executed automatically +* Graphic user interface (GUI) for ease of use +* Automated reporting capability to minimize manual errors +* Failure analysis +* Test result auditing and auditable test specification framework +* Distributed testing environment support + +To run tests using the JavaTest harness, you specify which tests in the +test suite to run, how to run them, and where to put the results as +described in link:config.html#GBFVV[Chapter 4, "Setup and +Configuration."] + +[[GBFRA]][[tck-compatibility-test-suite]] + +1.2.4 TCK Compatibility Test Suite +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The test suite is the collection of tests used by the JavaTest harness +to test a particular technology implementation. In this case, it is the +collection of tests used by the {TechnologyShortName} TCK +{TechnologyVersion} to test a {TechnologyShortName} {TechnologyVersion} +implementation. The tests are designed to verify that a vendor's +runtime implementation of the technology complies with the appropriate +specification. The individual tests correspond to assertions of the +specification. + +The tests that make up the TCK compatibility test suite are precompiled +and indexed within the TCK test directory structure. When a test run is +started, the JavaTest harness scans through the set of tests that are +located under the directories that have been selected. While scanning, +the JavaTest harness selects the appropriate tests according to any +matches with the filters you are using and queues them up for execution. + +[[GBFSH]][[exclude-lists]] + +1.2.5 Exclude Lists +^^^^^^^^^^^^^^^^^^^ + +Each version of a TCK includes an Exclude List contained in a `.jtx` +file. +This is a list of test file URLs that identify tests which do not +have to be run for the specific version of the TCK being used. +Whenever tests are run, the JavaTest harness automatically excludes +any test on the Exclude List from being executed. + +A vendor's compatible implementation is not required to pass or run any test on the Exclude List. +The Exclude List file, +{jtxFileName}+, is included in the +{TechnologyShortName} TCK. + + +[NOTE] +======================================================================= + +From time to time, updates to the Exclude List are made available. +The exclude list is included in the Jakarta TCK ZIP archive. +Each time an update is approved and released, the version number +will be incremented. +You should always make sure you are using an up-to-date copy of the +Exclude List before running the {TechnologyShortName} TCK to verify your +implementation. + +======================================================================= + + +A test might be in the Exclude List for reasons such as: + +* An error in an underlying implementation API has been discovered which +does not allow the test to execute properly. +* An error in the specification that was used as the basis of the test +has been discovered. +* An error in the test itself has been discovered. +* The test fails due to a bug in the tools (such as the JavaTest +harness, for example). + +In addition, all tests are run against the compatible implementations. +Any tests that fail when run on a compatible Jakarta platform are put on the +Exclude List. Any test that is not specification-based, or for which the +specification is vague, may be excluded. Any test that is found to be +implementation dependent (based on a particular thread scheduling model, +based on a particular file system behavior, and so on) may be excluded. + + +[NOTE] +======================================================================= + +Vendors are not permitted to alter or modify Exclude Lists. Changes to +an Exclude List can only be made by using the procedure described in +link:rules.html#CJAJEAEI[Section 2.3.1, "TCK Test Appeals Steps."] + +======================================================================= + + +[[GBFRR]][[tck-configuration]] + +1.2.6 TCK Configuration +^^^^^^^^^^^^^^^^^^^^^^^ + +You need to set several variables in your test environment, modify +properties in the +{jteFileName}+ file, and then use the JavaTest +harness to configure and run the {TechnologyShortName} tests, as described in +link:config.html#GBFVV[Chapter 4, "Setup and Configuration."] + +include::intro.inc[] + +[[GBFQW]][[getting-started-with-the-tck]] + +[NOTE] +==== +The Jakarta EE Specification Process support multiple compatible implementations. +These instructions explain how to get started with the {TechnologyRI} CI. +If you are using another compatible implementation, refer to material provided +by that implementation for specific instructions and procedures. + +==== + +1.3 Getting Started With the TCK +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This section provides an general overview of what needs to be done to +install, set up, test, and use the {TechnologyShortName} TCK. These +steps are explained in more detail in subsequent chapters of this +guide. + +1. Make sure that the following software has been correctly installed +on the system hosting the JavaTest harness: +include::req-software.inc[] +* Java SE {SEversion} +* Apache Ant {AntVersion} +* A CI for {TechnologyShortName} {TechnologyVersion}. One example is {TechnologyRI}. +* {TechnologyShortName} TCK version {TechnologyVersion}, which includes: +include::tck-packages.inc[] +* The {TechnologyShortName} {TechnologyVersion} Vendor Implementation (VI) + +See the documentation for each of these software applications for +installation instructions. See link:install.html#GBFTP[Chapter 3, +"Installation,"] for instructions on installing the {TechnologyShortName} TCK. +2. Set up the {TechnologyShortName} TCK software. + +See link:config.html#GBFVV[Chapter 4, "Setup and Configuration,"] for +details about the following steps. + a. Set up your shell environment. + b. Modify the required properties in the +{jteFileName}+ file. + c. Configure the JavaTest harness. +3. Test the {TechnologyShortName} {TechnologyVersion} implementation. + +Test the {TechnologyShortName} implementation installation by running +the test suite. See link:using.html#GBFWO[Chapter 5, "Executing Tests."] diff --git a/tck/docs/userguide/src/main/jbake/content/intro.inc b/tck/docs/userguide/src/main/jbake/content/intro.inc new file mode 100644 index 0000000..e69de29 diff --git a/tck/docs/userguide/src/main/jbake/content/packages.inc b/tck/docs/userguide/src/main/jbake/content/packages.inc new file mode 100644 index 0000000..b7c62de --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/packages.inc @@ -0,0 +1,5 @@ +** `jakarta.annotation` + +** `jakarta.annotation.security` + +** `jakarta.annotation.sql` diff --git a/tck/docs/userguide/src/main/jbake/content/platforms.inc b/tck/docs/userguide/src/main/jbake/content/platforms.inc new file mode 100644 index 0000000..236beed --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/platforms.inc @@ -0,0 +1 @@ +* CentOS Linux 7 \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/content/preface.adoc b/tck/docs/userguide/src/main/jbake/content/preface.adoc new file mode 100644 index 0000000..ea10c28 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/preface.adoc @@ -0,0 +1,147 @@ +type=page +status=published +title=Preface +next=intro.html +prev=title.html +~~~~~~ +include::attributes.conf[] +Preface +======= + +[[TCJRS00001]][[GBFTI]] + + +[[preface]] +Preface +------- + +This guide describes how to install, configure, and run the Technology +Compatibility Kit (TCK) that is used to test the {TechnologyFullName} +({TechnologyShortName} {TechnologyVersion}) technology. + +The {TechnologyShortName} TCK is a portable, configurable automated +test suite for verifying the compatibility of a vendor's +implementation of the {TechnologyShortName} {TechnologyVersion} +Specification (hereafter referred to as the vendor implementation or VI). +The {TechnologyShortName} TCK uses the JavaTest harness version +{JavaTestVersion} to run the test suite + + +[NOTE] +======================================================================= + +Note All references to specific Web URLs are given for the sake of your +convenience in locating the resources quickly. These references are +always subject to changes that are in many cases beyond the control of +the authors of this guide. + +======================================================================= + +Jakarta EE is a community sponsored and community run program. +Organizations contribute, along side individual contributors who use, evolve +and assist others. +Commercial support is not available through the Eclipse Foundation resources. +Please refer to the Eclipse EE4J project site +(https://projects.eclipse.org/projects/ee4j). +There, you will find additional details as well as a list of all the associated sub-projects +(Implementations and APIs), that make up Jakarta EE and define these specifications. +If you have questions about this Specification you may +send inquiries to {SpecificationInquiryList}. +If you have questions about this TCK, you may send inquiries to +{TCKInquiryList}. + +[[TCJRS00034]][[GBFUS]] + + +[[who-should-use-this-book]] +Who Should Use This Book +~~~~~~~~~~~~~~~~~~~~~~~~ + +This guide is for vendors that implement the {TechnologyShortName} +{TechnologyVersion} technology to assist them in running the test suite +that verifies compatibility of their implementation of the +{TechnologyShortName} {TechnologyVersion} Specification. + + +[[TCJRS00035]][[GBFPO]] + + +[[before-you-read-this-book]] +Before You Read This Book +~~~~~~~~~~~~~~~~~~~~~~~~~ + +You should be familiar with the {TechnologyShortName} +{TechnologyVersion}, version {TechnologyVersion} Specification, +which can be found at {SpecificationURL}. + +Before running the tests in the {TechnologyShortName} TCK, you should +familiarize yourself with the JavaTest documentation which can be +accessed at the +link:https://wiki.openjdk.java.net/display/CodeTools/JT+Harness[JT Harness web site]. + +[[TCJRS00036]][[GBFWF]] + + +[[typographic-conventions]] +Typographic Conventions +~~~~~~~~~~~~~~~~~~~~~~~ + +The following table describes the typographic conventions that are used +in this book. + +[width="100%",cols="15%,40%,45%",options="header",] +|======================================================================= +|Convention |Meaning |Example +|*Boldface* |Boldface type indicates graphical user interface elements +associated with an action, terms defined in text, or what you type, +contrasted with onscreen computer output. a| +From the *File* menu, select *Open Project*. + +A *cache* is a copy that is stored locally. + +`machine_name% *su*` + +`Password:` + +|`Monospace` |Monospace type indicates the names of files and +directories, commands within a paragraph, URLs, code in examples, text +that appears on the screen, or text that you enter. a| +Edit your `.login` file. + +Use `ls` `-a` to list all files. + +`machine_name% you have mail.` + +|_Italic_ |Italic type indicates book titles, emphasis, or placeholder +variables for which you supply particular values. a| +Read Chapter 6 in the _User's Guide_. + +Do _not_ save the file. + +The command to remove a file is `rm` _filename_. + +|======================================================================= + + +[[TCJRS00037]][[FWBSD]] + + +[[shell-prompts-in-command-examples]] +Shell Prompts in Command Examples +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following table shows the default UNIX system prompt and superuser +prompt for the C shell, Bourne shell, and Korn shell. + +[width="100%",cols="50%,50%",options="header",] +|===================================================== +|Shell |Prompt +|C shell |`machine_name%` +|C shell for superuser |`machine_name#` +|Bourne shell and Korn shell |`$` + +|Bourne shell and Korn shell for superuser |`#` + +|Bash shell |`shell_name-shell_version$` +|Bash shell for superuser |`shell_name-shell_version#` +|===================================================== + + + diff --git a/tck/docs/userguide/src/main/jbake/content/rebuild.adoc b/tck/docs/userguide/src/main/jbake/content/rebuild.adoc new file mode 100644 index 0000000..e4021cf --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rebuild.adoc @@ -0,0 +1,20 @@ +type=page +status=published +title=Appendix B: Rebuild Rules +prev=faq.html +~~~~~~ +include::attributes.conf[] + +Appendix B: Rebuild Rules +========================= + + +ifdef::rebuild[] +include::rebuild.inc[] +endif::rebuild[] +ifndef::rebuild[] + +<<< +Appendix B is not used for the {TechnologyShortName} TCK. + +endif::rebuild[] diff --git a/tck/docs/userguide/src/main/jbake/content/rebuild.inc b/tck/docs/userguide/src/main/jbake/content/rebuild.inc new file mode 100644 index 0000000..ab92bc4 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rebuild.inc @@ -0,0 +1,8 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +The following sections should be customized for the technology. +This is not required for Jakarta Annotations +/////////////////////////////////////////////////////////////////////// + +[[GCLIZ]] + diff --git a/tck/docs/userguide/src/main/jbake/content/req-software.inc b/tck/docs/userguide/src/main/jbake/content/req-software.inc new file mode 100644 index 0000000..d918d9f --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/req-software.inc @@ -0,0 +1,9 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +This is a list of software required in addition to the TCK and the RI. +For many Java EE APIs, the Java EE RI will be required, as described below. +For standalone technologies, no other software may be required, and the +below line can be removed. + +This is used in intro.adoc in section 1.3 and install.adoc in section 3.2. +/////////////////////////////////////////////////////////////////////// diff --git a/tck/docs/userguide/src/main/jbake/content/rules.adoc b/tck/docs/userguide/src/main/jbake/content/rules.adoc new file mode 100644 index 0000000..f6b08ce --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rules.adoc @@ -0,0 +1,403 @@ +type=page +status=published +title=Procedure for Certification +next=install.html +prev=intro.html +~~~~~~ +include::attributes.conf[] +Procedure for Certification +=========================== + +[[GBFSN]] + + +[[procedure-for-certification]] +2 Procedure for Certification +----------------------------- + +This chapter describes the compatibility testing procedure and +compatibility requirements for {TechnologyFullName}. +This chapter contains the following sections: + +* link:#CJAFFDGI[Certification Overview] +* link:#CJAFGIGG[Compatibility Requirements] +* link:#CJAIIBDJ[Test Appeals Process] +* link:#CJAJECIE[Specifications for {TechnologyFullName}] +* link:#CJABAHGI[Libraries for {TechnologyFullName}] + +[[CJAFFDGI]][[certification-overview]] + +2.1 Certification Overview +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The certification process for {technologyShortName} {TechnologyVersion} +consists of the following activities: + +* Install the appropriate version of the Technology Compatibility Kit +(TCK) and execute it in accordance with the instructions in this User's +Guide. +* Ensure that you meet the requirements outlined in +link:#CJAFGIGG[Compatibility Requirements] below. +* Certify to the Eclipse Foundation that you have finished +testing and that you meet all of the compatibility requirements, +as required by the Eclipse Foundation TCK License. + +[[CJAFGIGG]][[compatibility-requirements]] + +2.2 Compatibility Requirements +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The compatibility requirements for {TechnologyShortName} +{TechnologyVersion} consist of meeting the requirements set forth by +the rules and associated definitions contained in this section. + +[[sthref4]][[definitions]] + +2.2.1 Definitions +^^^^^^^^^^^^^^^^^ + +These definitions are for use only with these compatibility requirements +and are not intended for any other purpose. + +[[sthref5]][[sthref6]] + +Table 2-1 Definitions  + +[width="100%",cols="25%,75%",options="header",] +|======================================================================= +|Term |Definition +|API Definition Product |A Product for which the only Java class files +contained in the product are those corresponding to the application +programming interfaces defined by the Specifications, and which is +intended only as a means for formally specifying the application +programming interfaces defined by the Specifications. + +|Computational Resource a| +A piece of hardware or software that may vary in quantity, existence, or +version, which may be required to exist in a minimum quantity and/or at +a specific or minimum revision level so as to satisfy the requirements +of the Test Suite. + +Examples of computational resources that may vary in quantity are RAM +and file descriptors. + +Examples of computational resources that may vary in existence (that is, +may or may not exist) are graphics cards and device drivers. + +Examples of computational resources that may vary in version are +operating systems and device drivers. + +|Configuration Descriptor |Any file whose format is well defined by a +specification and which contains configuration information for a set of +Java classes, archive, or other feature defined in the specification. + +|Conformance Tests |All tests in the Test Suite for an indicated +Technology Under Test, as released and distributed by the +Eclipse Foundation, excluding those tests on the +published Exclude List for the Technology Under Test. + +|Container |An implementation of the associated Libraries, as specified +in the Specifications, and a version of a Java Platform, Standard +Edition Runtime Product, as specified in the Specifications, or a later +version of a Java Platform, Standard Edition Runtime Product that also +meets these compatibility requirements. + +|Documented |Made technically accessible and made known to users, +typically by means such as marketing materials, product documentation, +usage messages, or developer support programs. + +|Exclude List |The most current list of tests, released and distributed by the +Eclipse Foundation, that are not required to be passed to certify +conformance. The Jakarta EE Specification Committee may add to the Exclude List for that +Test Suite as needed at any time, in which case the updated TCK version +supplants any previous Exclude Lists for that Test Suite. + +|Libraries a| +The class libraries, as specified through the Jakarta EE Specification Process +(JESP), for the Technology Under Test. + +The Libraries for {TechnologyFullName} are listed at the end of this chapter. + +|Location Resource a| +A location of classes or native libraries that are components of the +test tools or tests, such that these classes or libraries may be +required to exist in a certain location in order to satisfy the +requirements of the test suite. + +For example, classes may be required to exist in directories named in a +CLASSPATH variable, or native libraries may be required to exist in +directories named in a PATH variable. + +|Maintenance Lead |The corresponding Jakarta EE Specification Project +is responsible for maintaining the Specification, and the TCK for the +Technology. The Specification Project Team will propose revisions and +updates to the Jakarta EE Specification Committee which will approve +and release new versions of the specification and TCK. + +|Operating Mode a| +Any Documented option of a Product that can be changed by a user in +order to modify the behavior of the Product. + +For example, an Operating Mode can be binary (enable/disable +optimization), an enumeration (select from a list of protocols), or a +range (set the maximum number of active threads). + +Note that an Operating Mode may be selected by a command line switch, an +environment variable, a GUI user interface element, a configuration or +control file, etc. + +|Product |A vendor's product in which the Technology Under Test is +implemented or incorporated, and that is subject to compatibility +testing. + +|Product Configuration a| +A specific setting or instantiation of an Operating Mode. + +For example, a Product supporting an Operating Mode that permits user +selection of an external encryption package may have a Product +Configuration that links the Product to that encryption package. + +|Rebuildable Tests |Tests that must be built using an +implementation-specific mechanism. This mechanism must produce +specification-defined artifacts. Rebuilding and running these tests +against a known compatible implementation verifies that the mechanism generates +compatible artifacts. + +|Resource |A Computational Resource, a Location Resource, or a Security +Resource. + +|Rules |These definitions and rules in this Compatibility Requirements +section of this User's Guide. + +|Runtime |The Containers specified in the Specifications. + +|Security Resource a| +A security privilege or policy necessary for the proper execution of the +Test Suite. + +For example, the user executing the Test Suite will need the privilege +to access the files and network resources necessary for use of the +Product. + +|Specifications a| +The documents produced through the Jakarta EE Specification Process (JESP) +that define a particular Version of a Technology. + +The Specifications for the Technology Under Test are referenced later in +this chapter. + +|Technology |Specifications and one or more compatible implementations produced +through the Jakarta EE Specification Process (JESP). + +|Technology Under Test |Specifications and a compatible implementation +for {TechnologyFullName} Version {TechnologyVersion}. + +|Test Suite |The requirements, tests, and testing tools distributed by +the Maintenance Lead as applicable to a given Version of the Technology. + +|Version |A release of the Technology, as produced through the +Jakarta EE Specification Process (JESP). + +include::defns.inc[] +|======================================================================= + + +[[sthref7]][[rules-for-products]] + +2.2.2 Rules for {TechnologyFullName} Products +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following rules apply for each version of an operating system, +software component, and hardware platform Documented as supporting the +Product: + +*{techID}1* The Product must be able to satisfy all applicable compatibility +requirements, including passing all Conformance Tests, in every Product +Configuration and in every combination of Product Configurations, except +only as specifically exempted by these Rules. + +For example, if a Product provides distinct Operating Modes to optimize +performance, then that Product must satisfy all applicable compatibility +requirements for a Product in each Product Configuration, and +combination of Product Configurations, of those Operating Modes. + +*{techID}1.1* If an Operating Mode controls a Resource necessary for the +basic execution of the Test Suite, testing may always use a Product +Configuration of that Operating Mode providing that Resource, even if +other Product Configurations do not provide that Resource. +Notwithstanding such exceptions, each Product must have at least one set +of Product Configurations of such Operating Modes that is able to pass +all the Conformance Tests. + +For example, a Product with an Operating Mode that controls a security +policy (i.e., Security Resource) which has one or more Product +Configurations that cause Conformance Tests to fail may be tested using +a Product Configuration that allows all Conformance Tests to pass. + +*{techID}1.2* A Product Configuration of an Operating Mode that causes the +Product to report only version, usage, or diagnostic information is +exempted from these compatibility rules. + +*{techID}1.3* An API Definition Product is exempt from all functional +testing requirements defined here, except the signature tests. + +*{techID}2* Some Conformance Tests may have properties that may be changed. +Properties that can be changed are identified in the configuration +interview. Properties that can be changed are identified in the JavaTest +Environment (.jte) files in the Test Suite +installation. Apart from changing such properties and other allowed +modifications described in this User's Guide (if any), no source or +binary code for a Conformance Test may be altered in any way without +prior written permission. Any such allowed alterations to the +Conformance Tests will be provided via the Jakarta EE Specification Project +website and apply to all vendor compatible implementations. + +*{techID}3* The testing tools supplied as part of the Test Suite or as +updated by the Maintenance Lead must be used to certify compliance. + +*{techID}4* The Exclude List associated with the Test Suite cannot be +modified. + +*{techID}5* The Maintenance Lead can define exceptions to these Rules. Such +exceptions would be made available as above, and will apply to all vendor implementations. + +*{techID}6* All hardware and software component additions, deletions, and +modifications to a Documented supporting hardware/software platform, +that are not part of the Product but required for the Product to satisfy +the compatibility requirements, must be Documented and available to +users of the Product. + +For example, if a patch to a particular version of a supporting +operating system is required for the Product to pass the Conformance +Tests, that patch must be Documented and available to users of the +Product. + +*{techID}7* The Product must contain the full set of public and protected +classes and interfaces for all the Libraries. Those classes and +interfaces must contain exactly the set of public and protected methods, +constructors, and fields defined by the Specifications for those +Libraries. No subsetting, supersetting, or modifications of the public +and protected API of the Libraries are allowed except only as +specifically exempted by these Rules. + +*{techID}7.1* If a Product includes Technologies in addition to the +Technology Under Test, then it must contain the full set of combined +public and protected classes and interfaces. The API of the Product +must contain the union of the included Technologies. No further +modifications to the APIs of the included Technologies are allowed. + +ifdef::subset-allowed[] +*{techID}7.2* The Product may contain a subset of the classes and +interfaces for the Libraries. +endif::subset-allowed[] + +*{techID}8* Except for tests specifically required by this TCK to be rebuilt +(if any), the binary Conformance Tests supplied as part of the Test +Suite or as updated by the Maintenance Lead must be used to certify +compliance. + +*{techID}9* The functional programmatic behavior of any binary class or +interface must be that defined by the Specifications. + +include::rules.inc[] + +[[CJAIIBDJ]][[test-appeals-process]] + +2.3 Test Appeals Process +~~~~~~~~~~~~~~~~~~~~~~~~ + +Jakarta has a well established process for managing challenges to its +TCKs. Any implementor may submit a challenge to one or more tests in the +{TechnologyShortName} TCK as it relates to their implementation. Implementor +means the entity as a whole in charge of producing the final certified release. +*Challenges filed should represent the consensus of that entity*. + +2.3.1 Valid Challenges +^^^^^^^^^^^^^^^^^^^^^^ +Any test case (e.g., test class, @Test method), test case configuration (e.g., deployment descriptor), test beans, annotations, and other resources considered part of the TCK may be challenged. + +The following scenarios are considered in scope for test challenges: + +* Claims that a test assertion conflicts with the specification. +* Claims that a test asserts requirements over and above that of the specification. +* Claims that an assertion of the specification is not sufficiently implementable. +* Claims that a test is not portable or depends on a particular implementation. + +2.3.2 Invalid Challenges +^^^^^^^^^^^^^^^^^^^^^^^^ +The following scenarios are considered out of scope for test challenges and will be immediately closed if filed: + +* Challenging an implementation’s claim of passing a test. Certification is an honor system and these issues must be raised directly with the implementation. +* Challenging the usefulness of a specification requirement. The challenge process cannot be used to bypass the specification process and raise in question the need or relevance of a specification requirement. +* Claims the TCK is inadequate or missing assertions required by the specification. See the Improvement section, which is outside the scope of test challenges. +* Challenges that do not represent a consensus of the implementing community will be closed until such time that the community does agree or agreement cannot be made. The test challenge process is not the place for implementations to initiate their own internal discussions. +* Challenges to tests that are already excluded for any reason. +* Challenges that an excluded test should not have been excluded and should be re-added should be opened as a new enhancement request + +Test challenges must be made in writing via the {TechnologyShortName} specification project issue tracker +as described in link:#CJAJEAEI[Section 2.3.3, "TCK Test Appeals Steps."] + +All tests found to be invalid will be placed on the Exclude List +for that version of the {TechnologyShortName} TCK. + + +[[CJAJEAEI]][[tck-test-appeals-steps]] + +2.3.3 TCK Test Appeals Steps +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. Challenges should be filed via the {TechnologyFullName} specification project’s issue tracker using the label `challenge` and include the following information: +* The relevant specification version and section number(s) +* The coordinates of the challenged test(s) +* The exact TCK and exclude list versions +* The implementation being tested, including name and company +* The full test name +* A full description of why the test is invalid and what the correct behavior is believed to be +* Any supporting material; debug logs, test output, test logs, run scripts, etc. + + + +2. Specification project evaluates the challenge. + +Challenges can be resolved by a specification project lead, or a project challenge triage team, after a consensus of the specification project committers is reached or attempts to gain consensus fails. +Specification projects may exercise lazy consensus, voting or any practice that follows the principles of Eclipse Foundation Development Process. +The expected timeframe for a response is two weeks or less. +If consensus cannot be reached by the specification project for a prolonged period of time, the default recommendation is to exclude the tests and address the dispute in a future revision of the specification. + +3. Accepted Challenges. + +A consensus that a test produces invalid results will result in the exclusion of that test from certification requirements, and an immediate update and release of an official distribution of the TCK including the new exclude list. The associated `challenge` issue must be closed with an `accepted` label to indicate it has been resolved. + +4. Rejected Challenges and Remedy. + +When a`challenge` issue is rejected, it must be closed with a label of `invalid` to indicate it has been rejected. +There appeal process for challenges rejected on technical terms is outlined in Escalation Appeal. +If, however, an implementer feels the TCK challenge process was not followed, an appeal issue should be filed with specification project’s TCK issue tracker using the label `challenge-appeal`. +A project lead should escalate the issue with the Jakarta EE Specification Committee via email (jakarta.ee-spec@eclipse.org). +The committee will evaluate the matter purely in terms of due process. +If the appeal is accepted, the original TCK challenge issue will be reopened and a label of `appealed-challenge` added, along with a discussion of the appeal decision, and the `challenge-appeal` issue with be closed. +If the appeal is rejected, the `challenge-appeal` issue should closed with a label of `invalid`. + +5. Escalation Appeal. + +If there is a concern that a TCK process issue has not been resolved satisfactorily, the +https://www.eclipse.org/projects/dev_process/#6_5_Grievance_Handling[Eclipse Development Process Grievance Handling] procedure should be followed to escalate the resolution. Note that this is not a mechanism to attempt to handle implementation specific issues. + + +[[CJAJECIE]][[specifications-for-technology]] + +2.4 Specifications for {TechnologyFullName} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The {TechnologyFullName} specification is available from the specification +project web-site: {SpecificationURL}. + +[[CJABAHGI]][[libraries-for-technology]] + +2.5 Libraries for {TechnologyFullName} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following is a list of the packages comprising the required class +libraries for {TechnologyShortName} {TechnologyVersion}: + +include::packages.inc[] + +For the latest list of packages, also see: + +{SpecificationURL} diff --git a/tck/docs/userguide/src/main/jbake/content/rules.inc b/tck/docs/userguide/src/main/jbake/content/rules.inc new file mode 100644 index 0000000..b5a250f --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rules.inc @@ -0,0 +1,78 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +Most technologies will only need the compatibility rules in rules.adoc. +Some technologies will need additional rules. If they're needed, +remove the comment block delimiters below and update the rules as +appropriate. You may need to adjust the rule numbers to avoid gaps. + +The first comment block below is additional rules needed by JPA. + +The second comment block below is additional rules needed by +JSP and Servlet. (And EJB, if it had a standalone TCK.) + +The third comment block below is additional rules that apply +to any technology that defines deployment descriptors. + +The fourth comment block is special rules that apply only to JSP. + +NOTE: This set of examples is NOT complete, but should be. +/////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////// +*{techID}10* The Runtime must report an error when processing a +Configuration Descriptor that does not conform to the Specifications. + +*{techID}11* An error must be reported when processing a configuration +descriptor that includes a Java Persistence QL expression that does not +conform to the Specifications. + +*{techID}12* The presence of an XML comment in a Configuration +Descriptor, when processed by the Runtime, must not cause the +functional programmatic behavior of the Runtime to vary from the +functional programmatic behavior of the Runtime in the absence of that +comment. +/////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////// +*{techID}10* Each Container must make technically accessible all Java SE +Runtime interfaces and functionality, as defined by the Specifications, +to programs running in the Container, except only as specifically +exempted by these Rules. + +*{techID}10.1* Containers may impose security constraints, as defined by +the Specifications. +/////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////// +*{techID}11* A Deployment Tool must report an error when processing a +Configuration Descriptor that does not conform to the Specifications. + +*{techID}12* The presence of an XML comment in a Configuration +Descriptor, when processed by a Deployment Tool, must not cause the +functional programmatic behavior of the Deployment Tool to vary from +the functional programmatic behavior of the Deployment Tool in the +absence of that comment. +/////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////// +*{techID}11* A web Container must report an error, as defined by the +Specifications, when processing a JSP Page that does not conform to the +Specifications. + +*{techID}12* The presence of a Java language comment or Java language +directive in a JSP Page that specifies â€java†as the scripting +language, when processed by a web Container, must not cause the +functional programmatic behavior of that JSP Page to vary from the +functional programmatic behavior of that JSP Page in the absence of +that Java language comment or Java language directive. + +*{techID}13* The contents of any fixed template data (defined by the +Specifications) in a JSP Page, when processed by a web Container, must +not affect the functional programmatic behavior of that JSP Page, +except as defined by the Specifications. + +*{techID}14* The functional programmatic behavior of a JSP Page that +specifies â€java†as the scripting language must be equivalent to the +functional programmatic behavior of the JSP Page Implementation Class +constructed from that JSP Page. +/////////////////////////////////////////////////////////////////////// diff --git a/tck/docs/userguide/src/main/jbake/content/tck-packages.inc b/tck/docs/userguide/src/main/jbake/content/tck-packages.inc new file mode 100644 index 0000000..5ca5003 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/tck-packages.inc @@ -0,0 +1,7 @@ +** JDOM 1.1.3 + +** Apache Commons HTTP Client 3.1 + +** Apache Commons Logging 1.1.3 + +** Apache Commons Codec 1.9 diff --git a/tck/docs/userguide/src/main/jbake/content/title.adoc b/tck/docs/userguide/src/main/jbake/content/title.adoc new file mode 100644 index 0000000..ec9d735 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/title.adoc @@ -0,0 +1,40 @@ +type=page +status=published +title=TCK User's Guide for Technology Implementors +next=preface.html +prev=toc.html +~~~~~~ +include::attributes.conf[] + +TCK User's Guide for {TechnologyFullName}, Release {TechnologyVersion} for Jakarta EE +===================================================================================== + +[[eclipse-foundation]] +Eclipse Foundation +------------------ + +Technology Compatibility Kit User's Guide for {TechnologyFullName} + +Release {TechnologyVersion} for Jakarta EE + +{ReleaseDate} + +[[sthref1]] + +''''' + +Technology Compatibility Kit User's Guide for {TechnologyFullName}, +Release {TechnologyVersion} for Jakarta EE + +Copyright © {CopyrightDates} Oracle and/or its affiliates. All rights reserved. + +This program and the accompanying materials are made available under +the terms of the Eclipse Public License v. 2.0, which is available at +http://www.eclipse.org/legal/epl-2.0. + +SPDX-License-Identifier: EPL-2.0 + +Oracle and Java are registered trademarks of Oracle and/or its +affiliates. Other names may be trademarks of their respective owners. + +include::title.inc[] diff --git a/tck/docs/userguide/src/main/jbake/content/title.inc b/tck/docs/userguide/src/main/jbake/content/title.inc new file mode 100644 index 0000000..25bf47e --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/title.inc @@ -0,0 +1,11 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +This is included at the tail end of the Title page. +The following section should be customized for the technology. +This is provided to allow each technology to customize legacy acronym names +that are used in this TCK. +Be sure to customize LegacyAcronym in attributes.conf +Add additional lines as needed for acronyms found in your TCK user guide. +/////////////////////////////////////////////////////////////////////// + +References in this document to {LegacyAcronym} refer to the {TechnologyFullName} unless otherwise noted. diff --git a/tck/docs/userguide/src/main/jbake/content/using-examples.inc b/tck/docs/userguide/src/main/jbake/content/using-examples.inc new file mode 100644 index 0000000..b47962f --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/using-examples.inc @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +These CLI examples can be customized as necessary. +/////////////////////////////////////////////////////////////////////// + +1. Change to any subdirectory under `/src/com/sun/ts/tests`. +2. Start JavaTest using the following command: ++ +-- +[source,oac_no_warn] +---- +ant runclient +---- +-- + +[[GCMCU]] + +Example 5-1 {TechnologyShortName} TCK Signature Tests + +To run the {TechnologyShortName} TCK signature tests, enter the +following commands: + +[source,subs="attributes"] +---- +cd {sigTestDirectoryExample} +ant runclient +---- + +[[GCMBV]] + + +Example 5-2 Single Test Directory + +To run a single test directory, enter the following commands: + +[source,subs="attributes"] +---- +cd {singleTestDirectoryExample} +ant runclient +---- + +[[GCMCA]] + + +Example 5-3 Subset of Test Directories + +To run a subset of test directories, enter the following commands: + +[source,subs="attributes"] +---- +cd {subsetTestDirectoryExample} +ant runclient +---- diff --git a/tck/docs/userguide/src/main/jbake/content/using.adoc b/tck/docs/userguide/src/main/jbake/content/using.adoc new file mode 100644 index 0000000..b0a41c5 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/using.adoc @@ -0,0 +1,323 @@ +type=page +status=published +title=Executing Tests +next=debug.html +prev=config.html +~~~~~~ +include::attributes.conf[] +Executing Tests +=============== + +[[GBFWO]] + + +[[executing-tests]] +5 Executing Tests +----------------- + +The {TechnologyShortName} TCK uses the JavaTest harness to execute the +tests in the test suite. For detailed instructions that explain how to +run and use JavaTest, see the JavaTest User's Guide and Reference in +the documentation bundle. + +This chapter includes the following topics: + +* link:#GBFUZ[Starting JavaTest] +* link:#GBFWM[Running a Subset of the Tests] +* link:#GCLRR[Running the TCK Against your selected CI] +* link:#GCLRZ[Running the TCK Against a Vendor's Implementation] +* link:#GBFVK[Test Reports] + + +[NOTE] +======================================================================= + +The instructions in this chapter assume that you have installed and +configured your test environment as described in +link:install.html#GBFTP[Chapter 3, "Installation,"] and +link:config.html#GBFVV[Chapter 4, "Setup and Configuration,"], +respectively. + +======================================================================= + +ifdef::rebuild[] +As explained in link:rebuild.html#GCLIZ[Appendix B, "Packaging the +Test Applications in Servlet-Compliant WAR +Files With VI-Specific Information,"] the {TechnologyShortName} TCK +introduces the concept of repackaging the TCK tests. +endif::rebuild[] + + +[[GBFUZ]][[starting-javatest]] + +5.1 Starting JavaTest +~~~~~~~~~~~~~~~~~~~~~ + +There are two general ways to run the {TechnologyShortName} TCK using +the JavaTest harness software: + +* Through the JavaTest GUI +* From the command line in your shell environment + + +[NOTE] +======================================================================= + +The `ant` command referenced in the following +two procedures and elsewhere in this guide is the Apache Ant +build tool, which will need to be downloaded separately. +The `build.xml` file in `/bin` contains the various Ant +targets for the {TechnologyShortName} TCK test suite. + +======================================================================= + + +[[GBFWH]][[to-start-javatest-in-gui-mode]] + +5.1.1 To Start JavaTest in GUI Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Execute the following commands: + +[source,oac_no_warn] +---- +cd /bin +ant gui +---- + +[[GBFVW]][[to-start-javatest-in-command-line-mode]] + +5.1.2 To Start JavaTest in Command-Line Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +include::using-examples.inc[] + +[[GBFWM]][[running-a-subset-of-the-tests]] + +5.2 Running a Subset of the Tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the following modes to run a subset of the tests: + +* link:#GBFVT[Section 5.2.1, "To Run a Subset of Tests in GUI Mode"] +* link:#GBFWK[Section 5.2.2, "To Run a Subset of Tests in Command-Line Mode"] +* link:#GBFVL[Section 5.2.3, "To Run a Subset of Tests in Batch Mode +Based on Prior Result Status"] + +[[GBFVT]][[to-run-a-subset-of-tests-in-gui-mode]] + +5.2.1 To Run a Subset of Tests in GUI Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. From the JavaTest main menu, click *Configure*, then click *Change +Configuration*, and then click *Tests to Run*. + +The tabbed Configuration Editor dialog box is displayed. +2. Click *Specify* from the option list on the left. +3. Select the tests you want to run from the displayed test tree, and +then click *Done*. + +You can select entire branches of the test tree, or use `Ctrl+Click` or +`Shift+Click` to select multiple tests or ranges of tests, respectively, +or select just a single test. +4. Click *Save File*. +5. Click *Run Tests*, and then click *Start* to run the tests you selected. + +Alternatively, you can `right-click` the test you want from the test tree +in the left section of the JavaTest main window, and choose *Execute +These Tests* from the menu. +6. Click *Report*, and then click *Create Report*. +7. Specify the directory in which the JavaTest test harness will write +the report, and then click *OK* + +A report is created, and you are asked whether you want to view it. +8. Click *Yes* to view the report. + +[[GBFWK]][[to-run-a-subset-of-tests-in-command-line-mode]] + +5.2.2 To Run a Subset of Tests in Command-Line Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. Change to the directory containing the tests you want to run. +2. Start the test run by executing the following command: + ++ +[source] +---- +ant runclient +---- ++ +The tests in the directory and its subdirectories are run. + +[[GBFVL]][[to-run-a-subset-of-tests-in-batch-mode-based-on-prior-result-status]] + +5.2.3 To Run a Subset of Tests in Batch Mode Based on Prior Result Status +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can run certain tests in batch mode based on the test's prior run +status by specifying the `priorStatus` system property when invoking +`ant` + +Invoke `ant` with the `priorStatus` property. + +The accepted values for the `priorStatus` property are any combination +of the following: + +* `fail` +* `pass` +* `error` +* `notRun` + +For example, you could run all the {TechnologyShortName} tests with a +status of failed and error by invoking the following commands: + +[source,oac_no_warn] +---- +ant -DpriorStatus="fail,error" runclient +---- + +Note that multiple `priorStatus` values must be separated by commas. + +[[GCLRR]][[running-the-tck-against-the-ri]] + +5.3 Running the TCK Against another CI +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some test scenarios are designed to ensure that the configuration and deployment of +all the prebuilt {TechnologyShortName} TCK tests against one Compatible +Implementation are successful operating with other compatible implementations, and that the TCK is ready for +compatibility testing against the Vendor and Compatible Implementations. + +1. Verify that you have followed the configuration instructions in +link:config.html#GBFVU[Section 4.1, "Configuring Your Environment to Run +the TCK Against the Compatible Implementation."] +2. If required, verify that you have completed the steps in +link:config.html#GCLIW[Section 4.3.2, "Deploying the Prebuilt Archives."] +3. Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting +JavaTest,"] and, if desired, link:#GBFWM[Section 5.2, "Running a Subset +of the Tests."] + +[[GCLRZ]][[running-the-tck-against-a-vendors-implementation]] + +5.4 Running the TCK Against a Vendor's Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This test scenario is one of the compatibility test phases that all +Vendors must pass. + +1. Verify that you have followed the configuration instructions in +link:config.html#GCLHU[Section 4.2, "Configuring Your Environment to +Repackage and Run the TCK Against the Vendor Implementation."] +2. If required, verify that you have completed the steps in +link:config.html#GCLIL[Section 4.3.3, "Deploying the +Test Applications Against the Vendor Implementation."] +3. Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting +JavaTest,"] and, if desired, link:#GBFWM[Section 5.2, "Running a Subset +of the Tests."] + +[[GBFVK]][[test-reports]] + +5.5 Test Reports +~~~~~~~~~~~~~~~~ + +A set of report files is created for every test run. These report files +can be found in the report directory you specify. After a test run is +completed, the JavaTest harness writes HTML reports for the test run. +You can view these files in the JavaTest ReportBrowser when running in +GUI mode, or in the web browser of your choice outside the JavaTest +interface. + +To see all of the HTML report files, enter the URL of the `report.html` +file. This file is the root file that links to all of the other HTML +reports. + +The JavaTest harness also creates a `summary.txt` file in the report +directory that you can open in any text editor. The `summary.txt` file +contains a list of all tests that were run, their test results, and +their status messages. + +[[GBFWD]][[creating-test-reports]] + +5.5.1 Creating Test Reports +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use the following modes to create test reports: + +* link:#GBFVH[Section 5.5.1.1, "To Create a Test Report in GUI Mode"] +* link:#GBFVC[Section 5.5.1.2, "To Create a Test Report in Command-Line Mode"] + +[[GBFVH]][[to-create-a-test-report-in-gui-mode]] + +5.5.1.1 To Create a Test Report in GUI Mode ++++++++++++++++++++++++++++++++++++++++++++ + +1. From the JavaTest main menu, click *Report*, then click *Create Report*. + +You are prompted to specify a directory to use for your test reports. +2. Specify the directory you want to use for your reports, and then +click *OK*. + +Use the Filter list to specify whether you want to generate reports for +the current configuration, all tests, or a custom set of tests. + +You are asked whether you want to view report now. +3. Click *Yes* to display the new report in the JavaTest ReportBrowser. + +[[GBFVC]][[to-create-a-test-report-in-command-line-mode]] + +5.5.1.2 To Create a Test Report in Command-Line Mode +++++++++++++++++++++++++++++++++++++++++++++++++++++ + +1. Specify where you want to create the test report. +a. To specify the report directory from the command line at runtime, +use: ++ +[source] +---- +ant -Dreport.dir="report_dir" +---- ++ +Reports are written for the last test run to the directory you specify. +2. To specify the default report directory, set the `report.dir` +property in +{jteFileName}+. + +For example: ++ +[source] +---- +report.dir="/home/josephine/reports" +---- ++ +3. To disable reporting, set the `report.dir` property to `"none"`, +either on the command line or in +{jteFileName}+. + +For example: ++ +[source] +---- +ant -Dreport.dir="none" +---- ++ + +[[GBFVB]][[viewing-an-existing-test-report]] + +5.5.2 Viewing an Existing Test Report +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use the following modes to view an existing test report: + +* link:#GBFVO[Section 5.5.2.1, "To View an Existing Report in GUI Mode"] +* link:#GBFWB[Section 5.5.2.2, "To View an Existing Report in +Command-Line Mode"] + +[[GBFVO]][[to-view-an-existing-report-in-gui-mode]] + +5.5.2.1 To View an Existing Report in GUI Mode +++++++++++++++++++++++++++++++++++++++++++++++ + +1. From the JavaTest main menu, click *Report*, then click *Open Report*. + +You are prompted to specify the directory containing the report you want +to open. +2. Select the report directory you want to open, and then click *Open*. + +The selected report set is opened in the JavaTest ReportBrowser. + +[[GBFWB]][[to-view-an-existing-report-in-command-line-mode]] + +5.5.2.2 To View an Existing Report in Command-Line Mode ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Use the Web browser of your choice to view the `report.html` file in the +report directory you specified from the command line or in +{jteFileName}+. + +include::using.inc[] + diff --git a/tck/docs/userguide/src/main/jbake/content/using.inc b/tck/docs/userguide/src/main/jbake/content/using.inc new file mode 100644 index 0000000..e69de29 diff --git a/tck/docs/userguide/src/main/jbake/jbake.properties b/tck/docs/userguide/src/main/jbake/jbake.properties new file mode 100644 index 0000000..05c7056 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/jbake.properties @@ -0,0 +1,24 @@ +# +# Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +site.host=http://jbake.org +render.tags=false +render.sitemap=false +render.archive=false +render.feed=false +render.index=false +asciidoctor.option.safe=0 +asciidoctor.attributes.export=true \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/templates/footer.ftl b/tck/docs/userguide/src/main/jbake/templates/footer.ftl new file mode 100644 index 0000000..236b646 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/footer.ftl @@ -0,0 +1,44 @@ +<#-- a footer template fragment included in the page template --> +
+ + + + + + + + + <#if content.prev??> + + + + <#if content.next??> + + + + + +
+ + + Previous + + + + + Next + + + + + Contents + +
+ + + Eclipse Foundation Logo  + Copyright © 2017, 2021 Oracle and/or its affiliates. All rights reserved. + + + + diff --git a/tck/docs/userguide/src/main/jbake/templates/header.ftl b/tck/docs/userguide/src/main/jbake/templates/header.ftl new file mode 100644 index 0000000..50b72ae --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/header.ftl @@ -0,0 +1,54 @@ + +<#-- a header template fragment included in the page template --> + + + + <#if (content.title)??><#escape x as x?xml>${content.title}</#escape></#if> + + + + + + + + + +
+ ${content.title}
+
+
+ + + + + + + + + <#if content.prev??> + + + + <#if content.next??> + + + + + +
+ + + Previous + + + + + Next + + + + + Contents + +
+ diff --git a/tck/docs/userguide/src/main/jbake/templates/menu.ftl b/tck/docs/userguide/src/main/jbake/templates/menu.ftl new file mode 100644 index 0000000..888c03d --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/menu.ftl @@ -0,0 +1 @@ +<#-- a menu bar template fragment included in the page template --> \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/templates/page.ftl b/tck/docs/userguide/src/main/jbake/templates/page.ftl new file mode 100644 index 0000000..eca51db --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/page.ftl @@ -0,0 +1,8 @@ +<#-- a top level page layout template --> + +<#include "header.ftl"> +<#include "menu.ftl"> + +${content.body} + +<#include "footer.ftl"> \ No newline at end of file diff --git a/tck/docs/userguide/src/theme/jakartaee-theme.yml b/tck/docs/userguide/src/theme/jakartaee-theme.yml new file mode 100644 index 0000000..6092a2f --- /dev/null +++ b/tck/docs/userguide/src/theme/jakartaee-theme.yml @@ -0,0 +1,299 @@ +# +# Following is the asciidoctor-pdf default theme [1], with small +# customizations, mostly for header and footer, marked "EE". +# +# [1] https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml +# +font: + catalog: + # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols + Noto Serif: + normal: notoserif-regular-subset.ttf + bold: notoserif-bold-subset.ttf + italic: notoserif-italic-subset.ttf + bold_italic: notoserif-bold_italic-subset.ttf + # M+ 1mn supports ASCII and the circled numbers used for conums + M+ 1mn: + normal: mplus1mn-regular-ascii-conums.ttf + bold: mplus1mn-bold-ascii.ttf + italic: mplus1mn-italic-ascii.ttf + bold_italic: mplus1mn-bold_italic-ascii.ttf + # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols + # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font + M+ 1p Fallback: + normal: mplus1p-regular-fallback.ttf + bold: mplus1p-regular-fallback.ttf + italic: mplus1p-regular-fallback.ttf + bold_italic: mplus1p-regular-fallback.ttf + fallbacks: + - M+ 1p Fallback +page: + background_color: ffffff + layout: portrait + margin: [0.5in, 0.67in, 0.67in, 0.67in] + # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress + margin_inner: 0.75in + margin_outer: 0.59in + #size: A4 # EE + size: Letter # EE +base: + align: justify + # color as hex string (leading # is optional) + font_color: 333333 + # color as RGB array + #font_color: [51, 51, 51] + # color as CMYK array (approximated) + #font_color: [0, 0, 0, 0.92] + #font_color: [0, 0, 0, 92%] + font_family: Noto Serif + # choose one of these font_size/line_height_length combinations + #font_size: 14 + #line_height_length: 20 + #font_size: 11.25 + #line_height_length: 18 + #font_size: 11.2 + #line_height_length: 16 + font_size: 10.5 + #line_height_length: 15 + # correct line height for Noto Serif metrics + line_height_length: 12 + #font_size: 11.25 + #line_height_length: 18 + line_height: $base_line_height_length / $base_font_size + font_size_large: round($base_font_size * 1.25) + font_size_small: round($base_font_size * 0.85) + font_size_min: $base_font_size * 0.75 + font_style: normal + border_color: eeeeee + border_radius: 4 + border_width: 0.5 +# FIXME vertical_rhythm is weird; we should think in terms of ems +#vertical_rhythm: $base_line_height_length * 2 / 3 +# correct line height for Noto Serif metrics (comes with built-in line height) +vertical_rhythm: $base_line_height_length +horizontal_rhythm: $base_line_height_length +# QUESTION should vertical_spacing be block_spacing instead? +vertical_spacing: $vertical_rhythm +link: + font_color: 428bca +# literal is currently used for inline monospaced in prose and table cells +literal: + font_color: b12146 + font_family: M+ 1mn +menu_caret_content: " \u203a " +heading: + align: left + #font_color: 181818 + font_color: $base_font_color + font_family: $base_font_family + font_style: bold + # h1 is used for part titles (book doctype) or the doctitle (article doctype) + #h1_font_size: floor($base_font_size * 2.6) # EE + h1_font_size: floor($base_font_size * 2.5) # EE, squeeze title onto one line + # h2 is used for chapter titles (book doctype only) + h2_font_size: floor($base_font_size * 2.15) + h3_font_size: round($base_font_size * 1.7) + h4_font_size: $base_font_size_large + h5_font_size: $base_font_size + h6_font_size: $base_font_size_small + #line_height: 1.4 + # correct line height for Noto Serif metrics (comes with built-in line height) + line_height: 1 + margin_top: $vertical_rhythm * 0.4 + margin_bottom: $vertical_rhythm * 0.9 +title_page: + align: right + logo: + top: 10% + title: + top: 55% + font_size: $heading_h1_font_size + font_color: 999999 + line_height: 0.9 + subtitle: + font_size: $heading_h3_font_size + font_style: bold_italic + line_height: 1 + authors: + margin_top: $base_font_size * 1.25 + font_size: $base_font_size_large + font_color: 181818 + revision: + margin_top: $base_font_size * 1.25 +block: + margin_top: 0 + margin_bottom: $vertical_rhythm +caption: + align: left + font_size: $base_font_size * 0.95 + font_style: italic + # FIXME perhaps set line_height instead of / in addition to margins? + margin_inside: $vertical_rhythm / 3 + #margin_inside: $vertical_rhythm / 4 + margin_outside: 0 +lead: + font_size: $base_font_size_large + line_height: 1.4 +abstract: + font_color: 5c6266 + font_size: $lead_font_size + line_height: $lead_line_height + font_style: italic + first_line_font_style: bold + title: + align: center + font_color: $heading_font_color + font_family: $heading_font_family + font_size: $heading_h4_font_size + font_style: $heading_font_style +admonition: + column_rule_color: $base_border_color + column_rule_width: $base_border_width + padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm] + #icon: + # tip: + # name: fa-lightbulb-o + # stroke_color: 111111 + # size: 24 + label: + text_transform: uppercase + font_style: bold +blockquote: + font_color: $base_font_color + font_size: $base_font_size_large + border_color: $base_border_color + border_width: 5 + # FIXME disable negative padding bottom once margin collapsing is implemented + padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2] + cite_font_size: $base_font_size_small + cite_font_color: 999999 +# code is used for source blocks (perhaps change to source or listing?) +code: + font_color: $base_font_color + font_family: $literal_font_family + font_size: ceil($base_font_size) + padding: $code_font_size + line_height: 1.25 + # line_gap is an experimental property to control how a background color is applied to an inline block element + line_gap: 3.8 + background_color: f5f5f5 + border_color: cccccc + border_radius: $base_border_radius + border_width: 0.75 +conum: + font_family: M+ 1mn + font_color: $literal_font_color + font_size: $base_font_size + line_height: 4 / 3 +example: + border_color: $base_border_color + border_radius: $base_border_radius + border_width: 0.75 + background_color: ffffff + # FIXME reenable padding bottom once margin collapsing is implemented + padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm] +image: + align: left +prose: + margin_top: $block_margin_top + margin_bottom: $block_margin_bottom +sidebar: + background_color: eeeeee + border_color: e1e1e1 + border_radius: $base_border_radius + border_width: $base_border_width + # FIXME reenable padding bottom once margin collapsing is implemented + padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25] + title: + align: center + font_color: $heading_font_color + font_family: $heading_font_family + font_size: $heading_h4_font_size + font_style: $heading_font_style +thematic_break: + border_color: $base_border_color + border_style: solid + border_width: $base_border_width + margin_top: $vertical_rhythm * 0.5 + margin_bottom: $vertical_rhythm * 1.5 +description_list: + term_font_style: bold + term_spacing: $vertical_rhythm / 4 + description_indent: $horizontal_rhythm * 1.25 +outline_list: + indent: $horizontal_rhythm * 1.5 + #marker_font_color: 404040 + # NOTE outline_list_item_spacing applies to list items that do not have complex content + item_spacing: $vertical_rhythm / 2 +table: + background_color: $page_background_color + #head_background_color: + #head_font_color: $base_font_color + head_font_style: bold + #body_background_color: + body_stripe_background_color: f9f9f9 + foot_background_color: f0f0f0 + border_color: dddddd + border_width: $base_border_width + cell_padding: 3 +toc: + indent: $horizontal_rhythm + line_height: 1.4 + dot_leader: + #content: ". " + font_color: a9a9a9 + #levels: 2 3 +# NOTE in addition to footer, header is also supported +footer: + font_size: $base_font_size_small + # NOTE if background_color is set, background and border will span width of page + #border_color: dddddd # EE + #border_width: 0.25 # EE + height: $base_line_height_length * 2.5 + line_height: 1 + padding: [$base_line_height_length / 2, 1, 0, 1] + vertical_align: top + #image_vertical_align: or + # additional attributes for content: + # * {page-count} + # * {page-number} + # * {document-title} + # * {document-subtitle} + # * {chapter-title} + # * {section-title} + # * {section-or-chapter-title} + recto: + #columns: "<50% =0% >50%" + right: + #content: '{page-number}' # EE + #content: '{section-or-chapter-title} | {page-number}' + #content: '{document-title} | {page-number}' + content: '{document-title}{nbsp}{nbsp}{nbsp} *{page-number}*' # EE + #center: + # content: '{page-number}' + left: # EE + content: '{status}' # EE + verso: + #columns: $footer_recto_columns + left: + #content: $footer_recto_right_content # EE + #content: '{page-number} | {chapter-title}' + content: '*{page-number}* {nbsp}{nbsp}{nbsp}{document-title}' # EE + #center: + # content: '{page-number}' + right: # EE + content: '{status}' # EE +header: # EE + font_size: $base_font_size_small # EE + border_color: dddddd # EE + border_width: 0.25 # EE + height: $base_line_height_length * 2.5 # EE + line_height: 1 # EE + padding: [$base_line_height_length / 2, 1, 0, 1] # EE + vertical_align: top # EE + recto: # EE + right: # EE + content: '{section-or-chapter-title}' # EE + verso: # EE + left: # EE + content: '{section-or-chapter-title}' # EE diff --git a/tck/pom.xml b/tck/pom.xml new file mode 100644 index 0000000..ce90fcb --- /dev/null +++ b/tck/pom.xml @@ -0,0 +1,169 @@ + + + + 4.0.0 + + + org.eclipse.ee4j + project + 1.0.9 + + + jakarta.tck + jakarta-annotations-tck + 3.0.0 + jar + + Annotations-TCK + Common Annotations TCK + + + 3.0.0-M1 + 5.9.1 + + + + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotations-api.version} + + + org.junit.jupiter + junit-jupiter + ${junit.jupiter.version} + compile + + + + + ${bundle-name}-${project.version} + + + src/main/resources + + LICENSE_${license}.md + com/ + + + + + + maven-javadoc-plugin + + none + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + distribution + + single + + package + + + src/main/assembly/assembly.xml + + \ + false + ${bundle-name}-${project.version} + + + + + + maven-compiler-plugin + 3.12.1 + + 17 + + + + + + + + EFTL + + true + + + jakarta-annotations-tck + EFTL + + + + EPL + + annotations-tck + EPL + + + + record-signature + + false + + + jakarta-annotations-tck + EFTL + + + + + jakarta.tck + sigtest-maven-plugin + 2.1 + + ${project.build.directory}/jakarta.annotation.sig_${project.parent.version} + jakarta.annotation,jakarta.annotation.security,jakarta.annotation.sql + + + + + generate + + + + + + + + + + + diff --git a/tck/src/main/assembly/assembly.xml b/tck/src/main/assembly/assembly.xml new file mode 100644 index 0000000..a5eda07 --- /dev/null +++ b/tck/src/main/assembly/assembly.xml @@ -0,0 +1,77 @@ + + + + + distribution + annotations-tck + + zip + + + + + + ${project.basedir}/src/main/resources/LICENSE_${license}.md + LICENSE.md + + + ${project.basedir}/src/main/resources/jakarta.annotation.sig_3.0 + jakarta.annotation.sig_3.0 + + + + + ${project.build.directory} + artifacts + 755 + + **/*.jar + + + + ${project.basedir}/docs + docs + 755 + + assertions + *.html + *.txt + + + + ${project.basedir}/docs/userguide/target/generated-docs + docs/pdf-usersguide + 755 + + *.pdf + + + + ${project.basedir}/docs/userguide/target/staging + docs/html-usersguide + 755 + + *.html + css/** + img/** + + + + diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/CAJSigTestIT.java b/tck/src/main/java/com/sun/ts/tests/annotations/CAJSigTestIT.java new file mode 100644 index 0000000..1b80ee9 --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/CAJSigTestIT.java @@ -0,0 +1,291 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.annotations; + +import java.util.ArrayList; +import java.util.Properties; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; + +import org.junit.jupiter.api.Test; + +import java.lang.System.Logger; +/* + * This class is a simple example of a signature test that extends the + * SigTest framework class. This signature test is run outside of the + * J2EE containers. This class also contains the boilerplate + * code necessary to create a signature test using the test framework. + * To see a complete TCK example see the j2ee directory for the J2EE + * TCK signature test class. + */ +public class CAJSigTestIT extends SigTest { + + private static final Logger logger = System.getLogger(CAJSigTestIT.class.getName()); + + private Properties props = null; + + public CAJSigTestIT() { + props = System.getProperties(); + setup(); + } + + // all the classes that make up common annotations + private final String GENERATED = "jakarta.annotation.Generated"; + + private final String POSTCONSTRUCT = "jakarta.annotation.PostConstruct"; + + private final String PREDESTROY = "jakarta.annotation.PreDestroy"; + + private final String PRIORITY = "jakarta.annotation.Priority"; + + private final String RESOURCE = "jakarta.annotation.Resource,jakarta.annotation.Resource$AuthenticationType"; + + private final String RESOURCES = "jakarta.annotation.Resources"; + + private final String SECURITYDECLAREROLES = "jakarta.annotation.security.DeclareRoles"; + + private final String SECURITYDENYALL = "jakarta.annotation.security.DenyAll"; + + private final String SECURITYPERMITALL = "jakarta.annotation.security.PermitAll"; + + private final String SECURITYROLESALLOWED = "jakarta.annotation.security.RolesAllowed"; + + private final String SECURITYRUNAS = "jakarta.annotation.security.RunAs"; + + private final String SQLDATASOURCEDEFINITION = "jakarta.annotation.sql.DataSourceDefinition"; + + private final String SQLDATASOURCEDEFINITIONS = "jakarta.annotation.sql.DataSourceDefinitions"; + + private boolean ca_generated = false; + + private boolean ca_postconstruct = false; + + private boolean ca_priority = false; + + private boolean ca_predestroy = false; + + private boolean ca_resource = false; + + private boolean ca_resources = false; + + private boolean ca_securitydeclareroles = false; + + private boolean ca_securitydenyall = false; + + private boolean ca_securitypermitall = false; + + private boolean ca_securityrolesallowed = false; + + private boolean ca_securityrunas = false; + + private boolean ca_sqldatasourcedefinition = false; + + private boolean ca_sqldatasourcedefinitions = false; + + /***** Abstract Method Implementation *****/ + + /** + * Returns a list of strings where each string represents a package name. Each + * package name will have it's signature tested by the signature test + * framework. + * + * @return String[] The names of the packages whose signatures should be + * verified. + */ + protected String[] getPackages() { + return new String[] {}; + } + + protected String[] getClasses() { + // generate a String[] of the classes that should be verified based + // on what annotations are selected in the ts.jte + ArrayList classesArray = new ArrayList(); + if (ca_generated) { + classesArray.add(GENERATED); + } + if (ca_postconstruct) { + classesArray.add(POSTCONSTRUCT); + } + if (ca_priority) { + classesArray.add(PRIORITY); + } + if (ca_predestroy) { + classesArray.add(PREDESTROY); + } + if (ca_resource) { + String[] s = RESOURCE.split(","); + for (int i = 0; i < s.length; i++) { + classesArray.add(s[i]); + } + } + if (ca_resources) { + classesArray.add(RESOURCES); + } + if (ca_securitydeclareroles) { + classesArray.add(SECURITYDECLAREROLES); + } + if (ca_securitydenyall) { + classesArray.add(SECURITYDENYALL); + } + if (ca_securitypermitall) { + classesArray.add(SECURITYPERMITALL); + } + if (ca_securityrolesallowed) { + classesArray.add(SECURITYROLESALLOWED); + } + if (ca_securityrunas) { + classesArray.add(SECURITYRUNAS); + } + if (ca_sqldatasourcedefinition) { + classesArray.add(SQLDATASOURCEDEFINITION); + } + if (ca_sqldatasourcedefinitions) { + classesArray.add(SQLDATASOURCEDEFINITIONS); + } + return (String[]) classesArray.toArray(new String[classesArray.size()]); + + } + + + /* + * The following comments are specified in the base class that defines the + * signature tests. This is done so the test finders will find the right class + * to run. The implementation of these methods is inherited from the super + * class which is part of the signature test framework. + */ + + // NOTE: If the API under test is not part of your testing runtime + // environment, you may use the property sigTestClasspath to specify + // where the API under test lives. This should almost never be used. + // Normally the API under test should be specified in the classpath + // of the VM running the signature tests. Use either the first + // comment or the one below it depending on which properties your + // signature tests need. Please do not use both comments. + + /* + * @class.setup_props: ts_home; sigTestClasspath, Location of ca jar files; + * ca.sig.generated; ca.sig.managedbean; ca.sig.postconstruct; + * ca.sig.priority; ca.sig.predestroy; ca.sig.resource; ca.sig.resources; + * ca.sig.securitydeclareroles; ca.sig.securitydenyall; + * ca.sig.securitypermitall; ca.sig.securityrolesallowed; + * ca.sig.securityrunas; ca.sig.sqldatasourcedefinition; + * ca.sig.sqldatasourcedefinitions; + */ + public void setup() { + super.setup(); + + // read in the values from the ts.jte file + ca_generated = Boolean.valueOf(props.getProperty("ca.sig.generated")) + .booleanValue(); + ca_postconstruct = Boolean.valueOf(props.getProperty("ca.sig.postconstruct")) + .booleanValue(); + ca_priority = Boolean.valueOf(props.getProperty("ca.sig.priority")) + .booleanValue(); + ca_predestroy = Boolean.valueOf(props.getProperty("ca.sig.predestroy")) + .booleanValue(); + ca_resource = Boolean.valueOf(props.getProperty("ca.sig.resource")) + .booleanValue(); + ca_resources = Boolean.valueOf(props.getProperty("ca.sig.resources")) + .booleanValue(); + ca_securitydeclareroles = Boolean + .valueOf(props.getProperty("ca.sig.securitydeclareroles")).booleanValue(); + ca_securitydenyall = Boolean + .valueOf(props.getProperty("ca.sig.securitydenyall")).booleanValue(); + ca_securitypermitall = Boolean + .valueOf(props.getProperty("ca.sig.securitypermitall")).booleanValue(); + ca_securityrolesallowed = Boolean + .valueOf(props.getProperty("ca.sig.securityrolesallowed")).booleanValue(); + ca_securityrunas = Boolean.valueOf(props.getProperty("ca.sig.securityrunas")) + .booleanValue(); + ca_sqldatasourcedefinition = Boolean + .valueOf(props.getProperty("ca.sig.sqldatasourcedefinition")) + .booleanValue(); + ca_sqldatasourcedefinitions = Boolean + .valueOf(props.getProperty("ca.sig.sqldatasourcedefinitions")) + .booleanValue(); + } + + /* + * @testName: signatureTest + * + * @assertion: A CAJ platform must implement the required classes and APIs + * specified in the CAJ Specification. + * + * @test_Strategy: Using reflection, gather the implementation specific + * classes and APIs. Compare these results with the expected (required) + * classes and APIs. + * + */ + @Test + public void signatureTest() throws Exception { + + logger.log(Logger.Level.INFO, "$$$ signatureTest() called"); + String mapFile = null; + String packageFile = null; + Properties mapFileAsProps = null; + String[] packages = getPackages(); + String apiPackage = "jakarta.annotation"; + + try { + + InputStream inStreamMapfile = CAJSigTestIT.class.getClassLoader().getResourceAsStream("com/sun/ts/tests/annotations/sig-test.map"); + File mFile = writeStreamToTempFile(inStreamMapfile, "sig-test", ".map"); + mapFile = mFile.getCanonicalPath(); + logger.log(Logger.Level.INFO, "mapFile location is :"+mapFile); + + InputStream inStreamPackageFile = CAJSigTestIT.class.getClassLoader().getResourceAsStream("com/sun/ts/tests/annotations/sig-test-pkg-list.txt"); + File pFile = writeStreamToTempFile(inStreamPackageFile, "sig-test-pkg-list", ".txt"); + packageFile = pFile.getCanonicalPath(); + logger.log(Logger.Level.INFO, "packageFile location is :"+packageFile); + + mapFileAsProps = getSigTestDriver().loadMapFile(mapFile); + String packageVersion = mapFileAsProps.getProperty(apiPackage); + logger.log(Logger.Level.INFO, "Package version from mapfile :"+packageVersion); + + InputStream inStreamSigFile = CAJSigTestIT.class.getClassLoader().getResourceAsStream("com/sun/ts/tests/annotations/jakarta.annotation.sig_"+packageVersion); + File sigFile = writeStreamToSigFile(inStreamSigFile, apiPackage, packageVersion); + logger.log(Logger.Level.INFO, "signature File location is :"+sigFile.getCanonicalPath()); + + } catch(IOException ex) { + logger.log(Logger.Level.ERROR , "Exception while creating temp files :"+ex); + } + + super.signatureTest(mapFile, packageFile, mapFileAsProps, packages); + + } + + /* + * Call the parent class's cleanup method. + */ + + /* + * define which sig driver we will use + */ + protected SignatureTestDriver getSigTestDriver() { + + if (driver == null) { + driver = SignatureTestDriverFactory + .getInstance(SignatureTestDriverFactory.SIG_TEST); + } + + return driver; + + } // END getSigTestDriver + +} // end class CAJSigTest diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/PackageList.java b/tck/src/main/java/com/sun/ts/tests/annotations/PackageList.java new file mode 100644 index 0000000..8129964 --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/PackageList.java @@ -0,0 +1,412 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.annotations; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.TreeSet; + +/** + * This class represents a package list file. A package list file is used in + * conjunction with a set of signature files to execute API signature tests. + * Users specify which set of package APIs are verified. Each package's + * signature is verified independently. As such all valid sub-packages must be + * excluded while a package's signature is being verified. This allows API check + * to determine incompatible additional packages included in a distribution. + *

+ * This class builds a package list file when signatures are recorded and + * provides an API to provide valid sub-package lists when signatures are played + * back (verified). + *

+ * In record mode, this class reads the existing package list file, if one + * exists, and removes the package (as well as sub-packages) that are currently + * being recorded. All package names read from the existing package list file + * are held in a tree set which sorts the package names and keeps duplicate + * package names from ocurring. The user can then instruct this class to write + * out the package list file. At this point this class reads the currently + * recorded signature file and extracts each package names and adds it to the + * tree set. After this step the previous package list file is saved as a backup + * and the new package list file is written to disk. + *

+ * In playback mode, this class reads the contents of the package list file and + * stores each package name in a tree set. Users can then invoke the + * getSubPackages method to retrieve the valid sub-packages for any given + * package. This is done by simply examining the package names in the tree set + * and returning any package name that starts with the parent package name and a + * trailing period character. + */ +class PackageList { + + // Any line in the packageFile starting with this character is a comment + private static final char COMMENT_CHAR = '#'; + + private static final String BACKUP_EXT = ".bak"; + + // File containing the list of packages and sub-packages + private File packageFile; + + // Signature file where the package signatures were recorded + private File sigFile; + + // Name of the package being recorded + private String additionalPackageName; + + // Name of packages and sub-packages in the + private Set packageNames = new TreeSet(); + + /** + * Creates an instance of the PackageList class. The PackageList instance + * reads the specified package file and populates it's internal state with the + * package names found in this file. Users should use this c'tor when playing + * back signature files. Users can init the PackageList instance then use the + * "String[] getSubPackages(String packageName)" method to get the list of + * valid sub-packages for every package who's signature is being verified. + * + * @param packageFileName + * The name of the file that contains the package list. This file + * contains the names of all the packages that exist across all the + * signature files that makeup this deliverable. This file is used to + * generate a list of valid sub-packages that must be exclued when + * testing theor parent package's signature. + * + * @throws Exception + * when the packageFileName does not exist. + */ + public PackageList(String packageFileName) throws Exception { + packageFile = new File(packageFileName); + if (packageFile.exists() && packageFile.isFile()) { + extractExistingPackageNames(); + } else { + throw new FileNotFoundException(packageFileName); + } + } + + /** + * Creates an instance of the PackageList class. The PackageList instance + * reads the contents of the packageFileName and stores it in it's internal + * state. Next, any packages whos name starts with the specified packageName + * are removed from the internal package list. This is done because this is + * the package being recorded and we need to remove any previously recorded + * package names in case any sub-packages have been removed since the last + * time the signatures were recorded. Users should use this c'tor when they + * are recording signature files never during playback. + * + * @param packageName + * The name of the package whos signatures are being recorded (along + * with sub-packages). + * @param sigFileName + * The name of the file that contains the recored signatures. + * @param packageFileName + * The name of the file that contains the package list. This file + * contains the names of all the packages that exist across all the + * signature files that makeup this deliverable. This file is used to + * generate a list of valid sub-packages that must be exclued when + * testing their parent package's signature. + * + * @throws Exception + * when an error occurs reading the packageFileName or the + * sigFileName does not exist. + */ + public PackageList(String packageName, String sigFileName, + String packageFileName) throws Exception { + this.additionalPackageName = packageName; + sigFile = new File(sigFileName); + if (!sigFile.exists() || !sigFile.isFile()) { + throw new FileNotFoundException(sigFileName); + } + packageFile = new File(packageFileName); + if (packageFile.exists() && packageFile.isFile()) { + extractExistingPackageNames(); + removeExistingPackage(); + } + } + + /** + * Read the package names stored in the package list file. Each package name + * found in the package list file is added to the internal tree set. + * + * @throws Exception + * if there is an error opening or reading the package list file. + */ + private void extractExistingPackageNames() throws Exception { + BufferedReader in = new BufferedReader(new FileReader(packageFile)); + String line; + String trimLine; + try { + while ((line = in.readLine()) != null) { + trimLine = line.trim(); + if (isComment(trimLine) || "".equals(trimLine)) { + continue; + } + packageNames.add(trimLine); + } + } finally { + try { + in.close(); + } catch (Exception e) { + } + } + } + + /** + * Returns true if the specified string starts with a comment character as + * denoted by the COMMENT_CHAR constant. + * + * @param line + * Determins of this line is a comment line + * + * @return boolean True if the specified line is a comment line else false. + */ + private boolean isComment(String line) { + if (line == null) { + return false; + } + String theLine = line.trim(); + if (theLine.length() > 0) { + return (theLine.charAt(0) == COMMENT_CHAR); + } + + return false; + } + + /** + * Removes package names from the package list file. The packages that are + * removed are the ones currently being recorded. The packages being recorded + * is denoted by this.additionalPackageName. This includes any sub-packages of + * the additionalPackageName. This step is necessary in the cases where a + * sub-package has been removed from a parent package in between signature + * recordings. + */ + private void removeExistingPackage() { + String delPackage = this.additionalPackageName; + String packageName; + List delPkgs = new ArrayList(); + // iterate over package set and find package names to remove + for (Iterator i = packageNames.iterator(); i.hasNext();) { + packageName = (String) i.next(); + if (packageName.startsWith(delPackage)) { + delPkgs.add(packageName); + } + } + // actually remove the package names from the set + for (int i = 0; i < delPkgs.size(); i++) { + packageName = (String) (delPkgs.get(i)); + packageNames.remove(packageName); + System.out.println( + "PackageList.removeExistingPackage() \"" + packageName + "\""); + } + } + + /** + * Write the package list out to the package list file. This is done by + * reading all the package names in the specified signature file and adding + * them to the internal tree set. Then the old package list file is removed + * and the new package list file is written out. + * + * @throws Exception + * if there is a problem removing the existing package file or + * writting the new package list file. + */ + public void writePkgListFile() throws Exception { + readPkgsFromSigFile(); + removePkgFile(); + writePkgFile(); + } + + /** + * Extract the package name from the specified string. The specified string + * should have the form: "package jakarta.ejb;" + * + * @param packageLine + * The string containing the package name. + * + * @return String The extracted package name. + * + * @throws Exception + * if the specified string does not conform to the expected format. + */ + private String parsePackageName(String packageLine) throws Exception { + + // sig test framework doesn't have the concept of package entries + // as the ApiCheck signature format does. + // Instead, we need to parse an entry similar to this: + // CLSS public jakarta.some.package.SomeClass + + return packageLine.substring(packageLine.lastIndexOf(' ') + 1, + packageLine.lastIndexOf('.')); + } + + /** + * Reads the package names from the signature file. Each package name that is + * read is added to this classes internal tree set. + * + * @throws Exception + * if there is an error opening or reading the signature file. + */ + private void readPkgsFromSigFile() throws Exception { + BufferedReader in = new BufferedReader(new FileReader(sigFile)); + String line; + String trimLine; + try { + while ((line = in.readLine()) != null) { + trimLine = line.trim(); + if (trimLine.startsWith("CLSS")) { + packageNames.add(parsePackageName(trimLine)); + } + } + } finally { + try { + in.close(); + } catch (Exception e) { + } + } + } + + /** + * Removes the existing package list file. The package list file is actually + * moved to a backup file if it exists. The old backup is lost. + * + * @throws Exception + * if there is an error moving the current package list file to a + * backup file. + */ + private void removePkgFile() throws Exception { + File backupPkgFile = new File(packageFile.getPath() + BACKUP_EXT); + if (backupPkgFile.exists() && backupPkgFile.isFile()) { + backupPkgFile.delete(); + } + if (packageFile.isFile() && packageFile.exists()) { + File copyPackageFile = new File(packageFile.getPath()); + copyPackageFile.renameTo(backupPkgFile); + } + } + + /** + * Write a simple header to the package list file to explain what the file is. + * + * @param out + * The BufferedWriter to dump the header to. + * + * @throws Exception + * if there is any errors writing the header to the specified + * BufferedWriter. + */ + private void writeHeader(BufferedWriter out) throws Exception { + out.write(COMMENT_CHAR); + out.write(COMMENT_CHAR); + out.newLine(); + out.write(COMMENT_CHAR + " This file contains a list of all the packages"); + out.newLine(); + out.write(COMMENT_CHAR + " contained in the signature files for this"); + out.newLine(); + out.write( + COMMENT_CHAR + " deliverable. This file is used to exclude valid"); + out.newLine(); + out.write(COMMENT_CHAR + " sub-packages from being verified when their"); + out.newLine(); + out.write(COMMENT_CHAR + " parent package's signature is checked."); + out.newLine(); + out.write(COMMENT_CHAR); + out.write(COMMENT_CHAR); + out.newLine(); + out.newLine(); + } + + /** + * Write the list of package names out to a package list file. + * + * @throws Exception + * if there is an error creating and writting the package list file. + */ + private void writePkgFile() throws Exception { + BufferedWriter out = null; + try { + out = new BufferedWriter(new FileWriter(packageFile)); + writeHeader(out); + for (Iterator i = packageNames.iterator(); i.hasNext();) { + String packageName = (String) i.next(); + out.write(packageName); + out.newLine(); + System.out + .println("PackageList.writePkgFile() \"" + packageName + "\""); + } + } finally { + if (out != null) { + out.close(); + } + } + } + + /** + * Returns the list of sub-packages that exist in the specified package name. + * + * @param pkgName + * The name of the package we want the sub-package list for. + * + * @return String[] The sub-packages that live under the specified parent + * package. + */ + public String[] getSubPackages(String pkgName) { + List result = new ArrayList(); + String subPackageName = pkgName + "."; + for (Iterator i = packageNames.iterator(); i.hasNext();) { + String packageName = (String) i.next(); + if (packageName.startsWith(subPackageName)) { + result.add(packageName); + } + } + return (String[]) (result.toArray(new String[result.size()])); + } + + /** + * Returns the list of sub-packages that exist in the specified package name. + * The returned string matches the API check format of specifying multiple + * packages with a single string. Each package name is separated with the "+" + * character. + * + * @param pkgName + * The name of the package we want the sub-package list for. + * + * @return String The sub-packages that live under the specified parent + * package. + */ + public String getSubPackagesFormatted(String pkgName) { + StringBuffer formattedResult = new StringBuffer(); + String[] result = getSubPackages(pkgName); + for (int i = 0; i < result.length; i++) { + formattedResult.append(result[i]); + if (i < (result.length - 1)) { + formattedResult.append("+"); + } + } + return formattedResult.toString(); + } + +} // end class PackageList diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/SigTest.java b/tck/src/main/java/com/sun/ts/tests/annotations/SigTest.java new file mode 100644 index 0000000..873bb06 --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/SigTest.java @@ -0,0 +1,294 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.annotations; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +import java.util.ArrayList; +import java.util.Properties; + +import java.lang.System.Logger; + +/** + * This class should be extended by TCK developers that wish to create a set of + * signature tests that run outside of any Java EE container. Developers must + * implement the getPackages method to specify which packages are to be tested + * by the signature test framework. + */ +public abstract class SigTest { + + private static final Logger logger = System.getLogger(SigTest.class.getName()); + + protected SignatureTestDriver driver; + + /** + *

+ * Returns a {@link SignatureTestDriver} appropriate for the particular TCK + * (using API check or the Signature Test Framework). + *

+ * + *

+ * The default implementation of this method will return a + * {@link SignatureTestDriver} that will use API Check. TCK developers can + * override this to return the desired {@link SignatureTestDriver} for their + * TCK. + */ + protected SignatureTestDriver getSigTestDriver() { + + if (driver == null) { + driver = SignatureTestDriverFactory.getInstance(SignatureTestDriverFactory.SIG_TEST); + } + + return driver; + + } // END getSigTestDriver + + + /** + * Returns the list of Optional Packages which are not accounted for. By + * 'unlisted optional' we mean the packages which are Optional to the + * technology under test that the user did NOT specifically list for testing. + * For example, with Java EE 7 implementation, a user could additionally opt + * to test a JSR-88 technology along with the Java EE technology. But if the + * user chooses NOT to list this optional technology for testing (via ts.jte + * javaee.level prop) then this method will return the packages for JSR-88 + * technology with this method call. + *

+ * This is useful for checking for a scenarios when a user may have forgotten + * to identify a whole or partial technology implementation and in such cases, + * Java EE platform still requires testing it. + *

+ * Any partial or complete impl of an unlistedOptionalPackage sends up a red + * flag indicating that the user must also pass tests for this optional + * technology area. + *

+ * Sub-classes are free to override this method if they use a different + * signature repository directory. Most users should be able to use this + * default implementation - which means that there was NO optional technology + * packages that need to be tested. + * + * @return ArrayList + */ + protected ArrayList getUnlistedOptionalPackages() { + return null; + } + + /** + * Returns the list of packages that must be tested by the siganture test + * framework. TCK developers must implement this method in their signature + * test sub-class. + * + * @return String A list of packages that the developer wishes to test using + * the signature test framework. + */ + protected abstract String[] getPackages(); + + /** + * Returns an array of individual classes that must be tested by the signature + * test framwork. TCK developers may override this method when this + * functionality is needed. Most will only need package level granularity. + * + * @return an Array of Strings containing the individual classes the framework + * should test. The default implementation of this method returns a + * zero-length array. + */ + protected String[] getClasses() { + + return new String[] {}; + + } // END getClasses + + protected SigTestData testInfo; // holds the bin.dir property + + /** + * Called by the test framework to initialize this test. The method simply + * retrieves some state information that is necessary to run the test when + * when the test framework invokes the run method (actually the test1 method). + * + * @param args + * List of arguments passed to this test. + * @param p + * Properties specified by the test user and passed to this test via + * the test framework. + */ + public void setup() { + try { + logger.log(Logger.Level.TRACE, "$$$ SigTest.setup() called"); + this.testInfo = new SigTestData(); + logger.log(Logger.Level.TRACE,"$$$ SigTest.setup() complete"); + } catch (Exception e) { + logger.log(Logger.Level.ERROR, "Unexpected exception " + e.getMessage()); + } + } + + /** + * Called by the test framework to run this test. This method utilizes the + * state information set in the setup method to run the signature tests. All + * signature test code resides in the utility class so it can be reused by the + * signature test framework base classes. + * + * @throws Exception + * When an error occurs executing the signature tests. + */ + public void signatureTest(String mapFile, String packageFile, Properties mapFileAsProps, String[] packages) + throws Exception { + + SigTestResult results = null; + String repositoryDir = System.getProperty("java.io.tmpdir"); + String[] classes = getClasses(); + String testClasspath = testInfo.getTestClasspath(); // System.getProperty("sigTestClasspath"); + String optionalPkgToIgnore = testInfo.getOptionalTechPackagesToIgnore(); + + // unlisted optional technology packages are packages for optional + // technologies that were not specified by the user. We want to + // ensure there are no full or partial implementations of an + // optional technology which were not declared. + ArrayList unlistedTechnologyPkgs = getUnlistedOptionalPackages(); + + // If testing with Java 9+, extract the JDK's modules so they can be used + // on the testcase's classpath. + + String jimageDir = testInfo.getJImageDir(); + File f = new File(jimageDir); + f.mkdirs(); + + String javaHome = System.getProperty("java.home"); + logger.log(Logger.Level.INFO, "Executing JImage"); + + try { + ProcessBuilder pb = new ProcessBuilder(javaHome + "/bin/jimage", "extract", "--dir=" + jimageDir, javaHome + "/lib/modules"); + logger.log(Logger.Level.INFO, javaHome + "/bin/jimage extract --dir=" + jimageDir + " " + javaHome + "/lib/modules"); + pb.redirectErrorStream(true); + Process proc = pb.start(); + BufferedReader out = new BufferedReader(new InputStreamReader(proc.getInputStream())); + String line = null; + while ((line = out.readLine()) != null) { + logger.log(Logger.Level.INFO,line); + } + + int rc = proc.waitFor(); + logger.log(Logger.Level.INFO,"JImage RC = " + rc); + out.close(); + } catch (Exception e) { + logger.log(Logger.Level.INFO,"Exception while executing JImage! Some tests may fail."); + e.printStackTrace(); + } + + + try { + results = getSigTestDriver().executeSigTest(packageFile, mapFile, + repositoryDir, packages, classes, testClasspath, + unlistedTechnologyPkgs, optionalPkgToIgnore); + logger.log(Logger.Level.INFO,results.toString()); + if (!results.passed()) { + logger.log(Logger.Level.TRACE,"results.passed() returned false"); + throw new Exception(); + } + logger.log(Logger.Level.TRACE,"$$$ SigTest.test1() returning"); + } catch (Exception e) { + if (results != null && !results.passed()) { + throw new Exception("SigTest.test1() failed!, diffs found"); + } else { + logger.log(Logger.Level.ERROR,"Unexpected exception " + e.getMessage()); + throw new Exception("test failed with an unexpected exception", e); + } + } + } + + public File writeStreamToTempFile(InputStream inputStream, String tempFilePrefix, String tempFileSuffix) throws IOException { + FileOutputStream outputStream = null; + try { + File file = File.createTempFile(tempFilePrefix, tempFileSuffix); + file.deleteOnExit(); + outputStream = new FileOutputStream(file); + byte[] buffer = new byte[1024]; + while (true) { + int bytesRead = inputStream.read(buffer); + if (bytesRead == -1) { + break; + } + outputStream.write(buffer, 0, bytesRead); + } + return file; + } + finally { + if (outputStream != null) { + outputStream.close(); + } + } + } + + public File writeStreamToSigFile(InputStream inputStream, String apiPackage, String packageVersion) throws IOException { + FileOutputStream outputStream = null; + String tmpdir = System.getProperty("java.io.tmpdir"); + try { + File sigfile = new File(tmpdir+ File.separator + apiPackage + ".sig_"+packageVersion); + if(sigfile.exists()){ + sigfile.delete(); + logger.log(Logger.Level.INFO,"Existing signature file deleted to create new one"); + } + if(!sigfile.createNewFile()){ + logger.log(Logger.Level.ERROR,"signature file is not created"); + } + outputStream = new FileOutputStream(sigfile); + byte[] buffer = new byte[1024]; + while (true) { + int bytesRead = inputStream.read(buffer); + if (bytesRead == -1) { + break; + } + outputStream.write(buffer, 0, bytesRead); + } + return sigfile; + } + + finally { + if (outputStream != null) { + outputStream.close(); + } + } + } + + /** + * Called by the test framework to cleanup any outstanding state. This method + * simply passes the message through to the utility class so the + * implementation can be used by both framework base classes. + * + * @throws Exception + * When an error occurs cleaning up the state of this test. + */ + public void cleanup() throws Exception { + logger.log(Logger.Level.TRACE,"$$$ SigTest.cleanup() called"); + try { + getSigTestDriver().cleanupImpl(); + logger.log(Logger.Level.TRACE,"$$$ SigTest.cleanup() returning"); + } catch (Exception e) { + throw new Exception("Cleanup failed!", e); + } + } + +} // end class SigTest diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/SigTestData.java b/tck/src/main/java/com/sun/ts/tests/annotations/SigTestData.java new file mode 100644 index 0000000..7e07b7a --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/SigTestData.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.annotations; + +import java.util.Properties; + +/** + * This class holds the data passed to a signature test invocation during the + * setup phase. This allows us to keep the passed data separate and reuse the + * data between the signature test framework base classes. + */ +public class SigTestData { + + private Properties props; + + public SigTestData() { + this.props = System.getProperties(); + } + + public String getTestClasspath() { + return props.getProperty("sigTestClasspath", ""); + } + + public String getProperty(String prop) { + return props.getProperty(prop); + } + + public String getOptionalTechPackagesToIgnore() { + return props.getProperty("optional.tech.packages.to.ignore", ""); + } + + public String getJImageDir() { + return props.getProperty("jimage.dir", ""); + } +} // end class SigTestData diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/SigTestDriver.java b/tck/src/main/java/com/sun/ts/tests/annotations/SigTestDriver.java new file mode 100644 index 0000000..f564d4e --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/SigTestDriver.java @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.annotations; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.PrintWriter; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; +import java.lang.System.Logger; + + +/** + *

+ * Wrapper for the Sig Test framework. + *

+ */ +public class SigTestDriver extends SignatureTestDriver { + + private static final Logger logger = System.getLogger(SigTestDriver.class.getName()); + + private static final String CLASSPATH_FLAG = "-Classpath"; + + private static final String FILENAME_FLAG = "-FileName"; + + private static final String PACKAGE_FLAG = "-Package"; + + private static final String PACKAGE_NO_SUBS_FLAG = "-PackageWithoutSubpackages"; + + private static final String API_VERSION_FLAG = "-ApiVersion"; + + private static final String EXCLUDE_FLAG = "-Exclude"; + + private static final String STATIC_FLAG = "-Static"; + + private static final String CHECKVALUE_FLAG = "-CheckValue"; // only valid w/ + // -static + + private static final String NO_CHECKVALUE_FLAG = "-NoCheckValue"; + + private static final String SMODE_FLAG = "-mode"; // requires arg of bin or + // src + + private static final String DEBUG_FLAG = "-Debug"; + + private static final String FORMATPLAIN_FLAG = "-FormatPlain"; + + private static final String EXCLUDE_JDK_CLASS_FLAG = "-IgnoreJDKClass"; + + private static String[] excludeJdkClasses = { + "java.util.Map", + "java.lang.Object", + "java.io.ByteArrayInputStream", + "java.io.InputStream", + "java.lang.Deprecated", + "java.io.Writer", + "java.io.OutputStream", + "java.util.List", + "java.util.Collection", + "java.lang.instrument.IllegalClassFormatException", + "javax.transaction.xa.XAException", + "java.lang.annotation.Repeatable", + "java.lang.InterruptedException", + "java.lang.CloneNotSupportedException", + "java.lang.Throwable", + "java.lang.Thread", + "java.lang.Enum" + }; + + // ---------------------------------------- Methods from SignatureTestDriver + + @Override + protected String normalizeFileName(File f) { + String sURL = null; + try { + sURL = f.toURI().toURL().toExternalForm(); + } catch (Exception e) { + throw new RuntimeException(e); + } + return sURL; + } + + @Override + protected String[] createTestArguments(String packageListFile, String mapFile, + String signatureRepositoryDir, String packageOrClassUnderTest, + String classpath, boolean bStaticMode) throws Exception { + + SignatureFileInfo info = getSigFileInfo(packageOrClassUnderTest, mapFile, + signatureRepositoryDir); + + PackageList packageList = new PackageList(packageListFile); + String[] subPackages = packageList.getSubPackages(packageOrClassUnderTest); + + List command = new ArrayList(); + + if (bStaticMode) { + // static mode allows finer level of constants checking + // -CheckValue says to check the actual const values + logger.log(Logger.Level.TRACE,"Setting static mode flag to allow constant checking."); + command.add(STATIC_FLAG); + command.add(CHECKVALUE_FLAG); + + // specifying "-mode src" allows stricter 2 way verification of constant + // vals + // (note that using "-mode bin" mode is less strict) + command.add(SMODE_FLAG); + // command.add("bin"); + command.add("src"); + } else { + logger.log(Logger.Level.TRACE,"Not Setting static mode flag to allow constant checking."); + } + + // command.add(DEBUG_FLAG); + + command.add("-Verbose"); + + command.add(FILENAME_FLAG); + command.add(info.getFile()); + + command.add(CLASSPATH_FLAG); + command.add(classpath); + + command.add(PACKAGE_FLAG); + command.add(packageOrClassUnderTest); + + for (int i = 0; i < subPackages.length; i++) { + command.add(EXCLUDE_FLAG); + command.add(subPackages[i]); + } + + for(String jdkClassName:excludeJdkClasses) { + command.add(EXCLUDE_JDK_CLASS_FLAG); + command.add(jdkClassName); + } + + + command.add(API_VERSION_FLAG); + command.add(info.getVersion()); + + return ((String[]) command.toArray(new String[command.size()])); + + } // END createTestArguments + + @Override + protected boolean runSignatureTest(String packageOrClassName, + String[] testArguments) throws Exception { + + Class sigTestClass = Class + .forName("com.sun.tdk.signaturetest.SignatureTest"); + Object sigTestInstance = sigTestClass.newInstance(); + + ByteArrayOutputStream output = new ByteArrayOutputStream(); + + // do some logging to help with troubleshooting + logger.log(Logger.Level.TRACE, + "\nCalling: com.sun.tdk.signaturetest.SignatureTest() with following args:"); + for (int ii = 0; ii < testArguments.length; ii++) { + logger.log(Logger.Level.TRACE," testArguments[" + ii + "] = " + testArguments[ii]); + } + + @SuppressWarnings("unchecked") + Method runMethod = sigTestClass.getDeclaredMethod("run", + new Class[] { String[].class, PrintWriter.class, PrintWriter.class }); + runMethod.invoke(sigTestInstance, + new Object[] { testArguments, new PrintWriter(output, true), null }); + + String rawMessages = output.toString(); + + // currently, there is no way to determine if there are error msgs in + // the rawmessages, so we will always dump this and call it a status. + // TestUtil.logMsg( + // "********** Status Report '" + packageOrClassName + "' **********\n"); + // TestUtil.logMsg(rawMessages); + logger.log(Logger.Level.INFO, "********** Status Report '" + packageOrClassName + "' **********\n"); + logger.log(Logger.Level.INFO, rawMessages); + + return sigTestInstance.toString().substring(7).startsWith("Passed."); + } // END runSignatureTest + + /* + * + * @return This returns true if the packageOrClassName is found in the impl. + */ + @Override + protected boolean runPackageSearch(String packageOrClassName, + String[] testArguments) throws Exception { + + Class sigTestClass = Class + .forName("com.sun.tdk.signaturetest.SignatureTest"); + Object sigTestInstance = sigTestClass.newInstance(); + + ByteArrayOutputStream output = new ByteArrayOutputStream(); + + // we want to replace the PACKAGE_FLAG with PACKAGE_NO_SUBS_FLAG + for (int ii = 0; ii < testArguments.length; ii++) { + if (testArguments[ii].equals(PACKAGE_FLAG)) { + testArguments[ii] = PACKAGE_NO_SUBS_FLAG; + } + } + + // dump args for debugging aid + logger.log(Logger.Level.TRACE, + "\nCalling: com.sun.tdk.signaturetest.SignatureTest() with following args:"); + for (int ii = 0; ii < testArguments.length; ii++) { + logger.log(Logger.Level.TRACE," testArguments[" + ii + "] = " + testArguments[ii]); + } + + @SuppressWarnings("unchecked") + Method runMethod = sigTestClass.getDeclaredMethod("run", + new Class[] { String[].class, PrintWriter.class, PrintWriter.class }); + runMethod.invoke(sigTestInstance, + new Object[] { testArguments, new PrintWriter(output, true), null }); + + String rawMessages = output.toString(); + + // currently, there is no way to determine if there are error msgs in + // the rawmessages, so we will always dump this and call it a status. + // TestUtil.logMsg( + // "********** Status Report '" + packageOrClassName + "' **********\n"); + // TestUtil.logMsg(rawMessages); + logger.log(Logger.Level.INFO, "********** Status Report '" + packageOrClassName + "' **********\n"); + logger.log(Logger.Level.INFO, rawMessages); + + return sigTestInstance.toString().substring(7).startsWith("Passed."); + } + +} diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/SigTestResult.java b/tck/src/main/java/com/sun/ts/tests/annotations/SigTestResult.java new file mode 100644 index 0000000..bfe007f --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/SigTestResult.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.annotations; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +public class SigTestResult implements Serializable { + + private static final String NL = System.getProperty("line.separator", "\n"); + + private List failedPkgs = new ArrayList(); + + private List passedPkgs = new ArrayList(); + + private List failedClasses = new ArrayList(); + + private List passedClasses = new ArrayList(); + + // ---------------------------------------------------------- Public Methods + + public synchronized boolean passed() { + + return (failedPkgs.size() == 0 && failedClasses.size() == 0); + + } // end passed + + public synchronized void addFailedPkg(String pkg) { + + failedPkgs.add(pkg); + + } // END addFailedPkg + + public synchronized void addPassedPkg(String pkg) { + + passedPkgs.add(pkg); + + } // END addPassedPkg + + public synchronized void addFailedClass(String className) { + + failedClasses.add(className); + + } // END addFailedClass + + public synchronized void addPassedClass(String className) { + + passedClasses.add(className); + + } // END addPassedClass + + public String toString() { + + String delim = "******************************************************" + + NL; + if (!pkgsTested() && !classesTested()) { + return (delim + "******** No packages or classes were tested **********" + + NL + delim); + } + StringBuffer buf = new StringBuffer(); + buf.append(delim); + buf.append(delim); + if (passed()) { + buf.append("All package signatures passed.").append(NL); + } else { + buf.append("Some signatures failed.").append(NL); + if (failedPkgs.size() > 0) { + buf.append("\tFailed packages listed below: ").append(NL); + formatList(failedPkgs, buf); + } + if (failedClasses.size() > 0) { + buf.append("\tFailed classes listed below: ").append(NL); + formatList(failedClasses, buf); + } + } + if (passedPkgs.size() > 0) { + buf.append("\tPassed packages listed below: ").append(NL); + formatList(passedPkgs, buf); + } + if (passedClasses.size() > 0) { + buf.append("\tPassed classes listed below: ").append(NL); + formatList(passedClasses, buf); + } + buf.append("\t"); + buf.append(delim); + buf.append(delim); + return buf.toString(); + + } // END toString + + // --------------------------------------------------------- Private Methods + + private synchronized void formatList(List list, StringBuffer buf) { + + synchronized (this) { + for (int i = 0; i < list.size(); i++) { + String pkg = (String) (list.get(i)); + buf.append("\t\t").append(pkg).append(NL); + } + } + + } // END formatList + + private synchronized boolean pkgsTested() { + + return (failedPkgs.size() != 0 || passedPkgs.size() != 0); + + } // END pkgsTested + + private synchronized boolean classesTested() { + + return (failedClasses.size() != 0 || passedClasses.size() != 0); + + } // END classesTested + +} // end class SigTestResult diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/SignatureTestDriver.java b/tck/src/main/java/com/sun/ts/tests/annotations/SignatureTestDriver.java new file mode 100644 index 0000000..9f7e0f6 --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/SignatureTestDriver.java @@ -0,0 +1,604 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.annotations; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.lang.System.Logger; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Properties; + + +/** + * Allows the sigtest framework to be extended using different signature test + * implementations (e.g. ApiCheck, or SigTest) + */ +public abstract class SignatureTestDriver { + + private static final Logger logger = System.getLogger(SignatureTestDriver.class.getName()); + + private static final String SIG_FILE_EXT = ".sig"; + + private static final String SIG_FILE_VER_SEP = "_"; + + // ---------------------------------------------------------- Public Methods + + + /** + * Returns true if the passed in version matches the current Java version + * being used. + * + */ + public Boolean isJavaSEVersion(String ver) { + + String strOSVersion = System.getProperty("java.version"); + if (strOSVersion.startsWith(ver)) { + return true; + } else { + return false; + } + } + + /** + * Implementation of the cleanup method defined in both the SigTest and + * SigTestEE class. + */ + public void cleanupImpl() throws Exception { + + try { + logger.log(Logger.Level.INFO,"cleanup"); + } catch (Exception e) { + logger.log(Logger.Level.ERROR,"Exception in cleanup method" + e); + throw e; + } + + } // END cleanupImpl + + /** + *

+ * Execute the signature test. By default, this method passes the result of + * {@link #createTestArguments(String, String, String, String, String)} and + * passes the result to {@link #runSignatureTest(String, String[])}. + * + * @param packageListFile + * - file containing the packages/classes that are to be verified + * @param mapFile + * sig-test.map file + * @param signatureRepositoryDir + * directory containing the recorded signatures + * @param packagesUnderTest + * packages, defined by the test client, that should be tested + * @param classesUnderTest + * classes, defined by the test client, that should be tested + * @param classpath + * The location of the API being verified. Normally the checked API + * will be available in the test environment and testClasspath will + * be null. In some rare cases the tested API may not be part of the + * test environment and will have to specified using this parameter. + * @param unaccountedTechPkgs + * packages that should not exist within the technology under test. + * These will be searched for and if found, will be flagged as error + * since they were not explicitly declared as being under test. Their + * existence requires explicit testing. + * + * @return a {@link SigTestResult} containing the result of the test execution + */ + public SigTestResult executeSigTest(String packageListFile, String mapFile, + String signatureRepositoryDir, String[] packagesUnderTest, + String[] classesUnderTest, String classpath, + ArrayList unaccountedTechPkgs, String optionalPkgToIgnore) + throws Exception { + + SigTestResult result = new SigTestResult(); + + logger.log(Logger.Level.INFO,"optionalPkgToIgnore = " + optionalPkgToIgnore); + String[] arrayOptionalPkgsToIgnore = null; + if (optionalPkgToIgnore != null) { + arrayOptionalPkgsToIgnore = optionalPkgToIgnore.split(","); + } + + if (packagesUnderTest != null && packagesUnderTest.length > 0) { + logger.log(Logger.Level.INFO,"********** BEGIN PACKAGE LEVEL SIGNATURE " + + "VALIDATION **********\n\n"); + for (int i = 0; i < packagesUnderTest.length; i++) { + + String packageName = packagesUnderTest[i]; + + logger.log(Logger.Level.INFO,"********** BEGIN VALIDATE PACKAGE '" + + packagesUnderTest[i] + "' **********\n"); + + logger.log(Logger.Level.INFO, + "********** VALIDATE IN STATIC MODE - TO CHECK CONSANT VALUES ****"); + logger.log(Logger.Level.INFO,"Static mode supports checks of static constants values "); + + String[] args = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, packageName, classpath, true); + dumpTestArguments(args); + + if (runSignatureTest(packageName, args)) { + logger.log(Logger.Level.INFO,"********** Package '" + packageName + + "' - PASSED (STATIC MODE) **********"); + result.addPassedPkg(packageName + "(static mode)"); + } else { + result.addFailedPkg(packageName + "(static mode)"); + logger.log(Logger.Level.INFO,"********** Package '" + packageName + + "' - FAILED (STATIC MODE) **********"); + } + + logger.log(Logger.Level.INFO,"\n\n"); + logger.log(Logger.Level.INFO,"********** VALIDATE IN REFLECTIVE MODE ****"); + logger.log(Logger.Level.INFO, + "Reflective mode supports verification within containers (ie ejb, servlet, etc)"); + + String[] args2 = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, packageName, classpath, false); + dumpTestArguments(args2); + + if (runSignatureTest(packageName, args2)) { + logger.log(Logger.Level.INFO,"********** Package '" + packageName + + "' - PASSED (REFLECTION MODE) **********"); + result.addPassedPkg(packageName + "(reflection mode)"); + } else { + result.addFailedPkg(packageName + "(reflection mode)"); + logger.log(Logger.Level.INFO,"********** Package '" + packageName + + "' - FAILED (REFLECTION MODE) **********"); + } + + logger.log(Logger.Level.INFO,"********** END VALIDATE PACKAGE '" + + packagesUnderTest[i] + "' **********\n"); + + logger.log(Logger.Level.INFO,"\n"); + logger.log(Logger.Level.INFO,"\n"); + + } + } + + if (classesUnderTest != null && classesUnderTest.length > 0) { + logger.log(Logger.Level.INFO,"********** BEGIN CLASS LEVEL SIGNATURE " + + "VALIDATION **********\n\n"); + + for (int i = 0; i < classesUnderTest.length; i++) { + + String className = classesUnderTest[i]; + + logger.log(Logger.Level.INFO,"********** BEGIN VALIDATE CLASS '" + + classesUnderTest[i] + "' **********\n"); + + logger.log(Logger.Level.INFO, + "********** VALIDATE IN STATIC MODE - TO CHECK CONSANT VALUES ****"); + logger.log(Logger.Level.INFO,"Static mode supports checks of static constants values "); + + String[] args = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, className, classpath, true); + dumpTestArguments(args); + + if (runSignatureTest(className, args)) { + logger.log(Logger.Level.INFO,"********** Class '" + className + + "' - PASSED (STATIC MODE) **********"); + result.addPassedClass(className + "(static mode)"); + } else { + logger.log(Logger.Level.INFO,"********** Class '" + className + + "' - FAILED (STATIC MODE) **********"); + result.addFailedClass(className + "(static mode)"); + } + + logger.log(Logger.Level.INFO,"\n\n"); + logger.log(Logger.Level.INFO,"********** VALIDATE IN REFLECTIVE MODE ****"); + logger.log(Logger.Level.INFO, + "Reflective mode supports verification within containers (ie ejb, servlet, etc)"); + + String[] args2 = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, className, classpath, false); + dumpTestArguments(args2); + + if (runSignatureTest(className, args2)) { + logger.log(Logger.Level.INFO,"********** Class '" + className + + "' - PASSED (REFLECTION MODE) **********"); + result.addPassedClass(className + "(reflection mode)"); + } else { + logger.log(Logger.Level.INFO,"********** Class '" + className + + "' - FAILED (REFLECTION MODE) **********"); + result.addFailedClass(className + "(reflection mode)"); + } + + logger.log(Logger.Level.INFO,"********** END VALIDATE CLASS '" + classesUnderTest[i] + + "' **********\n"); + + logger.log(Logger.Level.INFO,"\n"); + logger.log(Logger.Level.INFO,"\n"); + + } + } + + /* + * The following will check if there are Optional Technologies being + * implemented but not explicitly defined thru (ts.jte) javaee.level + * property. This is a problem because if an optional technolgy is defined + * (either whole or partially) than the TCK tests (and sig tests) for those + * Optional Technology(s) MUST be run according to related specs. + */ + if (unaccountedTechPkgs != null) { + for (int ii = 0; ii < unaccountedTechPkgs.size(); ii++) { + // 'unaccountedTechPkgs' are t hose packages which do not beling to + // base technology nor one of the *declared* optionalal technologies. + // 'unaccountedTechPkgs' refers to packages for Optional Technologies + // which were not defined thru (ts.jte) javaee.level property. + // So, make sure there are no whole or partial implementations of + // undeclared optional technologies in the implementation + + String packageName = unaccountedTechPkgs.get(ii); + + // this is a special case exception to our validation of Optional + // Technologies. Normally any partial technology implementations + // would be a compatibility failure. HOWEVER, EE 7 Spec (see section + // EE 6.1.2 of the Platform spec in the footnote on p. 156.) + // requires us to add special handling to avoid testing 'certain' pkgs + // within an optional technology. + if (isIgnorePackageUnderTest(packageName, arrayOptionalPkgsToIgnore)) { + logger.log(Logger.Level.INFO, + "Ignoring special optional technology package: " + packageName); + continue; + } + + logger.log(Logger.Level.INFO,"\n\n"); + logger.log(Logger.Level.INFO, + "********** CHECK IF OPTIONAL TECHNOLOGIES EXIST IN REFLECTIVE MODE ****"); + logger.log(Logger.Level.INFO, + "Reflective mode supports verification within containers (ie ejb, servlet, etc)"); + + String[] args3 = createTestArguments(packageListFile, mapFile, + signatureRepositoryDir, packageName, classpath, false); + dumpTestArguments(args3); + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // - - - - + // NOTE: this is the opposite of above in that *if* we find that an + // undeclared + // optional technology package exists - then we want to raise a red + // flag. + // The user would have to either remove the technology from the impl if + // they do not want to include it in their impl -OR- they must + // explicitly + // set javaee.level (in ts.jte) to include that Optional Technology AND + // after setting this property, they have to pass all related TCK tests. + if (runPackageSearch(packageName, args3)) { + // if this passed we have an issue because it should not exist - thus + // should NOT pass. + logger.log(Logger.Level.INFO,"********** Package '" + packageName + + "' - WAS FOUND BUT SHOULD NOT BE (REFLECTION MODE) **********"); + String err = "ERROR: An area of concern has been identified. "; + err += "You must run sigtests with (ts.jte) javaee.level set to "; + err += "include all optional technology keywords. Whole and/or "; + err += "partial implementations of Optional Technologies "; + err += "must be implemented according to the specs AND must pass "; + err += "all related TCK tests. To properly pass the "; + err += "signature tests - you must identify all Optional Technology "; + err += "areas (via javaee.level) that you wish to pass signature tests for."; + logger.log(Logger.Level.INFO,err); + result.addFailedPkg(packageName + + " (Undeclared Optional Technology package found in reflection mode)"); + } else { + logger.log(Logger.Level.INFO,"********** Undeclared Optional Technology package '" + + packageName + "' - PASSED (REFLECTION MODE) **********"); + } + } + } + + return result; + + } // END executeSigTest + + // ------------------------------------------------------- Protected Methods + + /** + * Using a common set of information, create arguments that are appropriate to + * be used with the underlying signature test framework. + * + * @param packageListFile + * - file containing the packages/classes that are to be verified + * @param mapFile + * sig-test.map file + * @param signatureRepositoryDir + * directory containing the recorded signatures + * @param packageOrClassUnderTest + * the class or package + * @param classpath + * The location of the API being verified. Normally the checked API + * will be available in the test environment and testClasspath will + * be null. In some rare cases the tested API may not be part of the + * test environment and will have to specified using this parameter. + */ + protected abstract String[] createTestArguments(String packageListFile, + String mapFile, String signatureRepositoryDir, + String packageOrClassUnderTest, String classpath, boolean bStaticMode) + throws Exception; + + /** + * Invoke the underlying signature test framework for the specified package or + * class. + * + * @param packageOrClassName + * the package or class to be validated + * @param testArguments + * the arguments necessary to invoke the signature test framework + * + * @return true if the test passed, otherwise false + */ + protected abstract boolean runSignatureTest(String packageOrClassName, + String[] testArguments) throws Exception; + + /** + * This checks if a class exists or not within the impl. + * + * @param packageOrClassName + * the package or class to be validated + * + * @return true if the package was found to exist, otherwise + * false + */ + protected abstract boolean runPackageSearch(String packageOrClassName, + String[] testArguments) throws Exception; + + + /** + * Loads the specified file into a Properties object provided the specified + * file exists and is a regular file. The call to new FileInputStream verifies + * that the specfied file is a regular file and exists. + * + * @param mapFile + * the path and name of the map file to be loaded + * + * @return Properties The Properties object initialized with the contents of + * the specified file + * + * @throws java.io.IOException + * If the specified map file does not exist or is not a regular + * file, can also be thrown if there is an error creating an input + * stream from the specified file. + */ + public Properties loadMapFile(String mapFile) + throws IOException, FileNotFoundException { + + FileInputStream in = null; + try { + File map = new File(mapFile); + Properties props = new Properties(); + in = new FileInputStream(map); + props.load(in); + return props; + } finally { + try { + if (in != null) { + in.close(); + } + } catch (Throwable t) { + // do nothing + } + } + + } // END loadMapFile + + /** + * This method will attempt to build a fully-qualified filename in the format + * of respositoryDir + baseName + + * .sig_ + version. + * + * @param baseName + * the base portion of the signature filename + * @param repositoryDir + * the directory in which the signatures are stored + * @param version + * the version of the signature file + * @throws FileNotFoundException + * if the file cannot be validated as existing and is in fact a file + * @return a valid, fully qualified filename, appropriate for the system the + * test is being run on + */ + protected String getSigFileName(String baseName, String repositoryDir, + String version) throws FileNotFoundException { + + String sigFile; + if (repositoryDir.endsWith(File.separator)) { + sigFile = repositoryDir + baseName + SIG_FILE_EXT + SIG_FILE_VER_SEP + + version; + } else { + sigFile = repositoryDir + File.separator + baseName + SIG_FILE_EXT + + SIG_FILE_VER_SEP + version; + } + + File testFile = new File(sigFile); + + if (!testFile.exists() && !testFile.isFile()) { + throw new FileNotFoundException( + "Signature file \"" + sigFile + "\" does not exist."); + } + + // we are actually requiring this normalizeFileName call to get + // things working on Windows. Without this, if we just return the + // testFile; we will fail on windows. (Solaris works either way) + // IMPORTANT UPDATE!! (4/5/2011) + // in sigtest 2.2: they stopped supporting the normalized version which + // created a string filename = + // "file://com/sun/ts/tests/signaturetest/foo.sig" + // so now use file path and name only. + // return normalizeFileName(testFile); + return testFile.toString(); + + } // END getSigFileName + + protected abstract String normalizeFileName(File f); + + /** + * Returns the name and path to the signature file that contains the specified + * package's signatures. + * + * @param packageName + * The package under test + * @param mapFile + * The name of the file that maps package names to versions + * @param repositoryDir + * The directory that conatisn all signature files + * + * @return String The path and name of the siganture file that contains the + * specified package's signatures + * + * @throws Exception + * if the determined signature file is not a regular file or does + * not exist + */ + protected SignatureFileInfo getSigFileInfo(String packageName, String mapFile, + String repositoryDir) throws Exception { + + String originalPackage = packageName; + String name = null; + String version = null; + Properties props = loadMapFile(mapFile); + + while (true) { + boolean packageFound = false; + for (Enumeration e = props.propertyNames(); e.hasMoreElements();) { + name = (String) (e.nextElement()); + if (name.equals(packageName)) { + version = props.getProperty(name); + packageFound = true; + break; + } // end if + } // end for + + if (packageFound) { + break; + } + + /* + * If we get here we did not find a package name in the properties file + * that matches the package name under test. So we look for a package name + * in the properties file that could be the parent package for the package + * under test. We do this by removing the specified packages last package + * name section. So jakarta.ejb.spi would become jakarta.ejb + */ + int index = packageName.lastIndexOf("."); + if (index <= 0) { + throw new Exception("Package \"" + originalPackage + + "\" not specified in mapping file \"" + mapFile + "\"."); + } + packageName = packageName.substring(0, index); + } // end while + + /* Return the expected name of the signature file */ + + return new SignatureFileInfo(getSigFileName(name, repositoryDir, version), + version); + + } // END getSigFileInfo + + // --------------------------------------------------------- Private Methods + + /* + * This returns true is the passed in packageName matches one of the packages + * that are listed in the arrayOptionalPkgsToIgnore. arrayOptionalPkgsToIgnore + * is ultimately defined in the ts.jte property + * 'optional.tech.packages.to.ignore' If one of the entries in + * arrayOptionalPkgsToIgnore matches the packageName then that means we return + * TRUE to indicate we should ignore and NOT TEST that particular package. + */ + private static boolean isIgnorePackageUnderTest(String packageName, + String[] arrayOptionalPkgsToIgnore) { + + // if anything is null - consider no match + if ((packageName == null) || (arrayOptionalPkgsToIgnore == null)) { + return false; + } + + for (int ii = 0; ii < arrayOptionalPkgsToIgnore.length; ii++) { + if (packageName.equals(arrayOptionalPkgsToIgnore[ii])) { + // we found a match - + return true; + } + } + + return false; + } + + /** + * Prints the specified list of parameters to the message log. Used for + * debugging purposes only. + * + * @param params + * The list of parameters to dump. + */ + private static void dumpTestArguments(String[] params) { + + if (params != null && params.length > 0) { + logger.log(Logger.Level.TRACE, "----------------- BEGIN SIG PARAM DUMP -----------------"); + for (int i = 0; i < params.length; i++) { + logger.log(Logger.Level.TRACE," Param[" + i + "]: " + params[i]); + } + logger.log(Logger.Level.TRACE, "------------------ END SIG PARAM DUMP ------------------"); + } + + } // END dumpTestArguments + + // ----------------------------------------------------------- Inner Classes + + /** + * A simple data structure containing the fully qualified path to the + * signature file as well as the version being tested. + */ + protected static class SignatureFileInfo { + + private String file; + + private String version; + + // -------------------------------------------------------- Constructors + + public SignatureFileInfo(String file, String version) { + + if (file == null) { + throw new IllegalArgumentException("'file' argument cannot be null"); + } + + if (version == null) { + throw new IllegalArgumentException("'version' argument cannot be null"); + } + + this.file = file; + this.version = version; + + } // END SignatureFileInfo + + // ------------------------------------------------------ Public Methods + + public String getFile() { + + return file; + + } // END getFileIncludingPath + + public String getVersion() { + + return version; + + } // END getVersion + + } + +} // END SigTestDriver diff --git a/tck/src/main/java/com/sun/ts/tests/annotations/SignatureTestDriverFactory.java b/tck/src/main/java/com/sun/ts/tests/annotations/SignatureTestDriverFactory.java new file mode 100644 index 0000000..f8ff45a --- /dev/null +++ b/tck/src/main/java/com/sun/ts/tests/annotations/SignatureTestDriverFactory.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.annotations; + +/** + *

+ * Factory to obtain SignatureTestDriver implementations. + *

+ */ +public class SignatureTestDriverFactory { + + /** + *

+ * Identifier for the driver that uses API Check to perform signature + * validation. + *

+ */ + public static final String API_CHECK = "apicheck"; + + /** + *

+ * Identifier for the driver that uses the Signature Test framwork for + * signature validation. + *

+ */ + public static final String SIG_TEST = "sigtest"; + + // ------------------------------------------------------------ Constructors + + // Access via factory method + private SignatureTestDriverFactory() { + } // END SignatureTestDriverFactory + + // ---------------------------------------------------------- Public Methods + + /** + *

+ * Obtain a {@link SignatureTestDriver} instance based on the + * type argument. + * + * @param type + * the driver type to create + * @return a {@link SignatureTestDriver} implementation + */ + public static SignatureTestDriver getInstance(String type) { + + if (type == null || type.length() == 0) { + throw new IllegalArgumentException("Type was null or empty"); + } + + if (SIG_TEST.equals(type)) { + return new SigTestDriver(); + } else { + throw new IllegalArgumentException("Unknown Type: '" + type + '\''); + } + + } // END getInstance + +} // END SignatureTestDriverFactory diff --git a/tck/src/main/resources/LICENSE_EFTL.md b/tck/src/main/resources/LICENSE_EFTL.md new file mode 100644 index 0000000..a210682 --- /dev/null +++ b/tck/src/main/resources/LICENSE_EFTL.md @@ -0,0 +1,83 @@ +# Eclipse Foundation Technology Compatibility Kit License - v 1.0 + +Copyright (c) 2018, Eclipse Foundation, Inc. and its licensors. + +Redistribution and use in binary form is permitted provided that the +following conditions are met: + +1. Use of the Technology Compatibility Kit accompanying this license + (the "TCK") and its documentation is permitted solely for the + purpose of testing compatibility of an implementation (the + "Product") of a specification (the "Specification") made available + by the Eclipse Foundation, Inc. ("Eclipse"). + +2. Only those modifications expressly permitted by the TCK and its + documentation are permitted. Except in these limited circumstances, + no modifications to the TCK are permitted under this license. + +3. A Product will be deemed to be "compatible" with the Specification + if it fully and completely meets and satisfies all requirements of + the TCK. + +4. Before any claim of compatibility (or any similar claim suggesting + compatibility) is made based on the TCK, the testing party must: + + a. use the TCK to demonstrate that the Product fully and + completely meets and satisfies all requirements of the TCK; + + b. make TCK test results showing full and complete satisfaction of + all requirements of the TCK publicly available on the testing + party's website and send a link to such test results to Eclipse + at [tck@eclipse.org](mailto:tck@eclipse.org); and + + c. comply with any requirements stated in the Specification with + regard to subsetting, supersetting, modifying or extending the + Specification in any Product claimed to be compatible with the + Specification. + +5. The test results must be continuously available and the link must + be live for at least as long as the Product is available in the + marketplace. + +6. The TCK may not be used as a basis for any statements of partial + compatibility. The TCK may only be used as a basis for true, + factual statements of full compatibility of Products that fully + meet and satisfy all requirements of the TCK. + +7. A determination that a Product is compatible with the TCK does not, + in itself, give rise to the right to use any name, mark, logo + associated with the TCK, Eclipse, or Eclipse's contributors or + licensors. + +8. Upon the request of Eclipse, a tester will retract any statements + of compatibility (or any similar claim suggesting compatibility) + which Eclipse reasonably determines to be false or misleading or in + violation of the terms of this license. + +9. Redistribution of the TCK must be under this Eclipse Foundation + Technology Compatibility Kit License and must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +10. Neither the name, trademarks or logos of Eclipse, nor the names, + trademarks or logos of its contributors or licensors may be used to + endorse or promote products tested with this software without + specific prior written permission. + +11. The source code for the TCK accompanying this license is available + from Eclipse. + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED ON +AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER +EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR +CONDITIONS OF TITLE, NON- INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR +A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY APPLICABLE LAW, +NEITHER THE COPYRIGHT OWNER OR ANY CONTRIBUTORS SHALL HAVE ANY +LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/tck/src/main/resources/LICENSE_EPL.md b/tck/src/main/resources/LICENSE_EPL.md new file mode 100644 index 0000000..1d428ed --- /dev/null +++ b/tck/src/main/resources/LICENSE_EPL.md @@ -0,0 +1,637 @@ +# Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + + 1. DEFINITIONS + + "Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + + "Contributor" means any person or entity that Distributes the Program. + + "Licensed Patents" mean patent claims licensable by a Contributor which + are necessarily infringed by the use or sale of its Contribution alone + or when combined with the Program. + + "Program" means the Contributions Distributed in accordance with this + Agreement. + + "Recipient" means anyone who receives the Program under this Agreement + or any Secondary License (as applicable), including Contributors. + + "Derivative Works" shall mean any work, whether in Source Code or other + form, that is based on (or derived from) the Program and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. + + "Modified Works" shall mean any work in Source Code or other form that + results from an addition to, deletion from, or modification of the + contents of the Program, including, for purposes of clarity any new file + in Source Code form that contains any contents of the Program. Modified + Works shall not include works that contain only declarations, + interfaces, types, classes, structures, or files of the Program solely + in each case in order to link to, bind by name, or subclass the Program + or Modified Works thereof. + + "Distribute" means the acts of a) distributing or b) making available + in any manner that enables the transfer of a copy. + + "Source Code" means the form of a Program preferred for making + modifications, including but not limited to software source code, + documentation source, and configuration files. + + "Secondary License" means either the GNU General Public License, + Version 2.0, or any later versions of that license, including any + exceptions or additional permissions as identified by the initial + Contributor. + + 2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + + 3. REQUIREMENTS + + 3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + + 3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + + 3.3 Contributors may not remove or alter any copyright, patent, + trademark, attribution notices, disclaimers of warranty, or limitations + of liability ("notices") contained within the Program from any copy of + the Program which they Distribute, provided that Contributors may add + their own appropriate notices. + + 4. COMMERCIAL DISTRIBUTION + + Commercial distributors of software may accept certain responsibilities + with respect to end users, business partners and the like. While this + license is intended to facilitate the commercial use of the Program, + the Contributor who includes the Program in a commercial product + offering should do so in a manner which does not create potential + liability for other Contributors. Therefore, if a Contributor includes + the Program in a commercial product offering, such Contributor + ("Commercial Contributor") hereby agrees to defend and indemnify every + other Contributor ("Indemnified Contributor") against any losses, + damages and costs (collectively "Losses") arising from claims, lawsuits + and other legal actions brought by a third party against the Indemnified + Contributor to the extent caused by the acts or omissions of such + Commercial Contributor in connection with its distribution of the Program + in a commercial product offering. The obligations in this section do not + apply to any claims or Losses relating to any actual or alleged + intellectual property infringement. In order to qualify, an Indemnified + Contributor must: a) promptly notify the Commercial Contributor in + writing of such claim, and b) allow the Commercial Contributor to control, + and cooperate with the Commercial Contributor in, the defense and any + related settlement negotiations. The Indemnified Contributor may + participate in any such claim at its own expense. + + For example, a Contributor might include the Program in a commercial + product offering, Product X. That Contributor is then a Commercial + Contributor. If that Commercial Contributor then makes performance + claims, or offers warranties related to Product X, those performance + claims and warranties are such Commercial Contributor's responsibility + alone. Under this section, the Commercial Contributor would have to + defend claims against the other Contributors related to those performance + claims and warranties, and if a court requires any other Contributor to + pay any damages as a result, the Commercial Contributor must pay + those damages. + + 5. NO WARRANTY + + EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT + PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR + IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF + TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR + PURPOSE. Each Recipient is solely responsible for determining the + appropriateness of using and distributing the Program and assumes all + risks associated with its exercise of rights under this Agreement, + including but not limited to the risks and costs of program errors, + compliance with applicable laws, damage to or loss of data, programs + or equipment, and unavailability or interruption of operations. + + 6. DISCLAIMER OF LIABILITY + + EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT + PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS + SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST + PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE + EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. + + 7. GENERAL + + If any provision of this Agreement is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this Agreement, and without further + action by the parties hereto, such provision shall be reformed to the + minimum extent necessary to make such provision valid and enforceable. + + If Recipient institutes patent litigation against any entity + (including a cross-claim or counterclaim in a lawsuit) alleging that the + Program itself (excluding combinations of the Program with other software + or hardware) infringes such Recipient's patent(s), then such Recipient's + rights granted under Section 2(b) shall terminate as of the date such + litigation is filed. + + All Recipient's rights under this Agreement shall terminate if it + fails to comply with any of the material terms or conditions of this + Agreement and does not cure such failure in a reasonable period of + time after becoming aware of such noncompliance. If all Recipient's + rights under this Agreement terminate, Recipient agrees to cease use + and distribution of the Program as soon as reasonably practicable. + However, Recipient's obligations under this Agreement and any licenses + granted by Recipient relating to the Program shall continue and survive. + + Everyone is permitted to copy and distribute copies of this Agreement, + but in order to avoid inconsistency the Agreement is copyrighted and + may only be modified in the following manner. The Agreement Steward + reserves the right to publish new versions (including revisions) of + this Agreement from time to time. No one other than the Agreement + Steward has the right to modify this Agreement. The Eclipse Foundation + is the initial Agreement Steward. The Eclipse Foundation may assign the + responsibility to serve as the Agreement Steward to a suitable separate + entity. Each new version of the Agreement will be given a distinguishing + version number. The Program (including Contributions) may always be + Distributed subject to the version of the Agreement under which it was + received. In addition, after a new version of the Agreement is published, + Contributor may elect to Distribute the Program (including its + Contributions) under the new version. + + Except as expressly stated in Sections 2(a) and 2(b) above, Recipient + receives no rights or licenses to the intellectual property of any + Contributor under this Agreement, whether expressly, by implication, + estoppel or otherwise. All rights in the Program not expressly granted + under this Agreement are reserved. Nothing in this Agreement is intended + to be enforceable by any entity that is not a Contributor or Recipient. + No third-party beneficiary rights are created under this Agreement. + + Exhibit A - Form of Secondary Licenses Notice + + "This Source Code may also be made available under the following + Secondary Licenses when the conditions for such availability set forth + in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), + version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. + +--- + +## The GNU General Public License (GPL) Version 2, June 1991 + + Copyright (C) 1989, 2022 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor + Boston, MA 02110-1335 + USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your freedom to + share and change it. By contrast, the GNU General Public License is + intended to guarantee your freedom to share and change free software--to + make sure the software is free for all its users. This General Public + License applies to most of the Free Software Foundation's software and + to any other program whose authors commit to using it. (Some other Free + Software Foundation software is covered by the GNU Library General + Public License instead.) You can apply it to your programs, too. + + When we speak of free software, we are referring to freedom, not price. + Our General Public Licenses are designed to make sure that you have the + freedom to distribute copies of free software (and charge for this + service if you wish), that you receive source code or can get it if you + want it, that you can change the software or use pieces of it in new + free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid anyone + to deny you these rights or to ask you to surrender the rights. These + restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether gratis + or for a fee, you must give the recipients all the rights that you have. + You must make sure that they, too, receive or can get the source code. + And you must show them these terms so they know their rights. + + We protect your rights with two steps: (1) copyright the software, and + (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software patents. + We wish to avoid the danger that redistributors of a free program will + individually obtain patent licenses, in effect making the program + proprietary. To prevent this, we have made it clear that any patent must + be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains a + notice placed by the copyright holder saying it may be distributed under + the terms of this General Public License. The "Program", below, refers + to any such program or work, and a "work based on the Program" means + either the Program or any derivative work under copyright law: that is + to say, a work containing the Program or a portion of it, either + verbatim or with modifications and/or translated into another language. + (Hereinafter, translation is included without limitation in the term + "modification".) Each licensee is addressed as "you". + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of running + the Program is not restricted, and the output from the Program is + covered only if its contents constitute a work based on the Program + (independent of having been made by running the Program). Whether that + is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's source + code as you receive it, in any medium, provided that you conspicuously + and appropriately publish on each copy an appropriate copyright notice + and disclaimer of warranty; keep intact all the notices that refer to + this License and to the absence of any warranty; and give any other + recipients of the Program a copy of this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion of + it, thus forming a work based on the Program, and copy and distribute + such modifications or work under the terms of Section 1 above, provided + that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any part + thereof, to be licensed as a whole at no charge to all third parties + under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this License. + (Exception: if the Program itself is interactive but does not + normally print such an announcement, your work based on the Program + is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, and + can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based on + the Program, the distribution of the whole must be on the terms of this + License, whose permissions for other licensees extend to the entire + whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of a + storage or distribution medium does not bring the other work under the + scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your cost + of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed + only for noncommercial distribution and only if you received the + program in object code or executable form with such an offer, in + accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source code + means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to control + compilation and installation of the executable. However, as a special + exception, the source code distributed need not include anything that is + normally distributed (in either source or binary form) with the major + components (compiler, kernel, and so on) of the operating system on + which the executable runs, unless that component itself accompanies the + executable. + + If distribution of executable or object code is made by offering access + to copy from a designated place, then offering equivalent access to copy + the source code from the same place counts as distribution of the source + code, even though third parties are not compelled to copy the source + along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt otherwise + to copy, modify, sublicense or distribute the Program is void, and will + automatically terminate your rights under this License. However, parties + who have received copies, or rights, from you under this License will + not have their licenses terminated so long as such parties remain in + full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and all + its terms and conditions for copying, distributing or modifying the + Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further restrictions + on the recipients' exercise of the rights granted herein. You are not + responsible for enforcing compliance by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot distribute + so as to satisfy simultaneously your obligations under this License and + any other pertinent obligations, then as a consequence you may not + distribute the Program at all. For example, if a patent license would + not permit royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only way you + could satisfy both it and this License would be to refrain entirely from + distribution of the Program. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is implemented + by public license practices. Many people have made generous + contributions to the wide range of software distributed through that + system in reliance on consistent application of that system; it is up to + the author/donor to decide if he or she is willing to distribute + software through any other system and a licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed to be + a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License may + add an explicit geographical distribution limitation excluding those + countries, so that distribution is permitted only in or among countries + not thus excluded. In such case, this License incorporates the + limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Program does not specify a version + number of this License, you may choose any version ever published by the + Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the + author to ask for permission. For software which is copyrighted by the + Free Software Foundation, write to the Free Software Foundation; we + sometimes make exceptions for this. Our decision will be guided by the + two goals of preserving the free status of all derivatives of our free + software and of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, + EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE + ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH + YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL + NECESSARY SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR + DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL + DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM + (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED + INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF + THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR + OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest to + attach them to the start of each source file to most effectively convey + the exclusion of warranty; and each file should have at least the + "copyright" line and a pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type + `show w'. This is free software, and you are welcome to redistribute + it under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the + appropriate parts of the General Public License. Of course, the commands + you use may be called something other than `show w' and `show c'; they + could even be mouse-clicks or menu items--whatever suits your program. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a "copyright disclaimer" for the program, if + necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (which makes passes at compilers) written by + James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your program + into proprietary programs. If your program is a subroutine library, you + may consider it more useful to permit linking proprietary applications + with the library. If this is what you want to do, use the GNU Library + General Public License instead of this License. + +--- + +## CLASSPATH EXCEPTION + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License version 2 cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from or + based on this library. If you modify this library, you may extend this + exception to your version of the library, but you are not obligated to + do so. If you do not wish to do so, delete this exception statement + from your version. diff --git a/tck/src/main/resources/com/sun/ts/tests/annotations/jakarta.annotation.sig_3.0 b/tck/src/main/resources/com/sun/ts/tests/annotations/jakarta.annotation.sig_3.0 new file mode 100644 index 0000000..8b10ef8 --- /dev/null +++ b/tck/src/main/resources/com/sun/ts/tests/annotations/jakarta.annotation.sig_3.0 @@ -0,0 +1,223 @@ +#Signature file v4.1 +#Version 3.0.0 + +CLSS public abstract interface !annotation jakarta.annotation.Generated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String comments() +meth public abstract !hasdefault java.lang.String date() +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.ManagedBean + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String value() + +CLSS public abstract interface !annotation jakarta.annotation.Nonnull + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.Nullable + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.PostConstruct + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.PreDestroy + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.Priority + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation +meth public abstract int value() + +CLSS public abstract interface !annotation jakarta.annotation.Resource + anno 0 java.lang.annotation.Repeatable(java.lang.Class value=class jakarta.annotation.Resources) + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, FIELD, METHOD]) +innr public final static !enum AuthenticationType +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean shareable() +meth public abstract !hasdefault jakarta.annotation.Resource$AuthenticationType authenticationType() +meth public abstract !hasdefault java.lang.Class type() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String lookup() +meth public abstract !hasdefault java.lang.String mappedName() +meth public abstract !hasdefault java.lang.String name() + +CLSS public final static !enum jakarta.annotation.Resource$AuthenticationType + outer jakarta.annotation.Resource +fld public final static jakarta.annotation.Resource$AuthenticationType APPLICATION +fld public final static jakarta.annotation.Resource$AuthenticationType CONTAINER +meth public static jakarta.annotation.Resource$AuthenticationType valueOf(java.lang.String) +meth public static jakarta.annotation.Resource$AuthenticationType[] values() +supr java.lang.Enum + +CLSS public abstract interface !annotation jakarta.annotation.Resources + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract jakarta.annotation.Resource[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.DeclareRoles + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.DenyAll + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.security.PermitAll + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.security.RolesAllowed + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.RunAs + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String value() + +CLSS public abstract interface !annotation jakarta.annotation.sql.DataSourceDefinition + anno 0 java.lang.annotation.Repeatable(java.lang.Class value=class jakarta.annotation.sql.DataSourceDefinitions) + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean transactional() +meth public abstract !hasdefault int initialPoolSize() +meth public abstract !hasdefault int isolationLevel() +meth public abstract !hasdefault int loginTimeout() +meth public abstract !hasdefault int maxIdleTime() +meth public abstract !hasdefault int maxPoolSize() +meth public abstract !hasdefault int maxStatements() +meth public abstract !hasdefault int minPoolSize() +meth public abstract !hasdefault int portNumber() +meth public abstract !hasdefault java.lang.String databaseName() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String password() +meth public abstract !hasdefault java.lang.String serverName() +meth public abstract !hasdefault java.lang.String url() +meth public abstract !hasdefault java.lang.String user() +meth public abstract !hasdefault java.lang.String[] properties() +meth public abstract java.lang.String className() +meth public abstract java.lang.String name() + +CLSS public abstract interface !annotation jakarta.annotation.sql.DataSourceDefinitions + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract jakarta.annotation.sql.DataSourceDefinition[] value() + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object> +meth public abstract int compareTo({java.lang.Comparable%0}) + +CLSS public abstract interface !annotation java.lang.Deprecated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() + +CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>> +cons protected init(java.lang.String,int) +innr public final static EnumDesc +intf java.io.Serializable +intf java.lang.Comparable<{java.lang.Enum%0}> +intf java.lang.constant.Constable +meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected final void finalize() +meth public final boolean equals(java.lang.Object) +meth public final int compareTo({java.lang.Enum%0}) +meth public final int hashCode() +meth public final int ordinal() +meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass() +meth public final java.lang.String name() +meth public final java.util.Optional> describeConstable() +meth public java.lang.String toString() +meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String) +supr java.lang.Object +hfds name,ordinal + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public abstract interface java.lang.annotation.Annotation +meth public abstract boolean equals(java.lang.Object) +meth public abstract int hashCode() +meth public abstract java.lang.Class annotationType() +meth public abstract java.lang.String toString() + +CLSS public abstract interface !annotation java.lang.annotation.Documented + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Repeatable + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.Class value() + +CLSS public abstract interface !annotation java.lang.annotation.Retention + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.RetentionPolicy value() + +CLSS public abstract interface !annotation java.lang.annotation.Target + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.ElementType[] value() + +CLSS public abstract interface java.lang.constant.Constable +meth public abstract java.util.Optional describeConstable() + diff --git a/tck/src/main/resources/com/sun/ts/tests/annotations/sig-test-pkg-list.txt b/tck/src/main/resources/com/sun/ts/tests/annotations/sig-test-pkg-list.txt new file mode 100644 index 0000000..0c1e9d0 --- /dev/null +++ b/tck/src/main/resources/com/sun/ts/tests/annotations/sig-test-pkg-list.txt @@ -0,0 +1,26 @@ +# +# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +## +# This file contains a list of all the packages +# contained in the signature files for this +# deliverable. This file is used to exclude valid +# sub-packages from being verified when their +# parent package's signature is checked. +## +jakarta.annotation +jakarta.annotation.security +jakarta.annotation.sql diff --git a/tck/src/main/resources/com/sun/ts/tests/annotations/sig-test.map b/tck/src/main/resources/com/sun/ts/tests/annotations/sig-test.map new file mode 100644 index 0000000..85f8760 --- /dev/null +++ b/tck/src/main/resources/com/sun/ts/tests/annotations/sig-test.map @@ -0,0 +1,16 @@ +# +# Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# +jakarta.annotation=3.0 diff --git a/tck/src/main/resources/jakarta.annotation.sig_2.1 b/tck/src/main/resources/jakarta.annotation.sig_2.1 new file mode 100644 index 0000000..e6a1bfa --- /dev/null +++ b/tck/src/main/resources/jakarta.annotation.sig_2.1 @@ -0,0 +1,216 @@ +#Signature file v4.1 +#Version 2.1 + +CLSS public abstract interface !annotation jakarta.annotation.Generated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String comments() +meth public abstract !hasdefault java.lang.String date() +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.ManagedBean + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String value() + +CLSS public abstract interface !annotation jakarta.annotation.Nonnull + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.Nullable + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.PostConstruct + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.PreDestroy + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.Priority + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation +meth public abstract int value() + +CLSS public abstract interface !annotation jakarta.annotation.Resource + anno 0 java.lang.annotation.Repeatable(java.lang.Class value=class jakarta.annotation.Resources) + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, FIELD, METHOD]) +innr public final static !enum AuthenticationType +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean shareable() +meth public abstract !hasdefault jakarta.annotation.Resource$AuthenticationType authenticationType() +meth public abstract !hasdefault java.lang.Class type() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String lookup() +meth public abstract !hasdefault java.lang.String mappedName() +meth public abstract !hasdefault java.lang.String name() + +CLSS public final static !enum jakarta.annotation.Resource$AuthenticationType + outer jakarta.annotation.Resource +fld public final static jakarta.annotation.Resource$AuthenticationType APPLICATION +fld public final static jakarta.annotation.Resource$AuthenticationType CONTAINER +meth public static jakarta.annotation.Resource$AuthenticationType valueOf(java.lang.String) +meth public static jakarta.annotation.Resource$AuthenticationType[] values() +supr java.lang.Enum + +CLSS public abstract interface !annotation jakarta.annotation.Resources + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract jakarta.annotation.Resource[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.DeclareRoles + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.DenyAll + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.security.PermitAll + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.security.RolesAllowed + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.RunAs + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String value() + +CLSS public abstract interface !annotation jakarta.annotation.sql.DataSourceDefinition + anno 0 java.lang.annotation.Repeatable(java.lang.Class value=class jakarta.annotation.sql.DataSourceDefinitions) + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean transactional() +meth public abstract !hasdefault int initialPoolSize() +meth public abstract !hasdefault int isolationLevel() +meth public abstract !hasdefault int loginTimeout() +meth public abstract !hasdefault int maxIdleTime() +meth public abstract !hasdefault int maxPoolSize() +meth public abstract !hasdefault int maxStatements() +meth public abstract !hasdefault int minPoolSize() +meth public abstract !hasdefault int portNumber() +meth public abstract !hasdefault java.lang.String databaseName() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String password() +meth public abstract !hasdefault java.lang.String serverName() +meth public abstract !hasdefault java.lang.String url() +meth public abstract !hasdefault java.lang.String user() +meth public abstract !hasdefault java.lang.String[] properties() +meth public abstract java.lang.String className() +meth public abstract java.lang.String name() + +CLSS public abstract interface !annotation jakarta.annotation.sql.DataSourceDefinitions + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract jakarta.annotation.sql.DataSourceDefinition[] value() + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object> +meth public abstract int compareTo({java.lang.Comparable%0}) + +CLSS public abstract interface !annotation java.lang.Deprecated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() + +CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>> +cons protected init(java.lang.String,int) +intf java.io.Serializable +intf java.lang.Comparable<{java.lang.Enum%0}> +meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected final void finalize() +meth public final boolean equals(java.lang.Object) +meth public final int compareTo({java.lang.Enum%0}) +meth public final int hashCode() +meth public final int ordinal() +meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass() +meth public final java.lang.String name() +meth public java.lang.String toString() +meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String) +supr java.lang.Object + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public abstract interface java.lang.annotation.Annotation +meth public abstract boolean equals(java.lang.Object) +meth public abstract int hashCode() +meth public abstract java.lang.Class annotationType() +meth public abstract java.lang.String toString() + +CLSS public abstract interface !annotation java.lang.annotation.Documented + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Repeatable + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.Class value() + +CLSS public abstract interface !annotation java.lang.annotation.Retention + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.RetentionPolicy value() + +CLSS public abstract interface !annotation java.lang.annotation.Target + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.ElementType[] value() + diff --git a/tck/src/main/resources/jakarta.annotation.sig_3.0 b/tck/src/main/resources/jakarta.annotation.sig_3.0 new file mode 100644 index 0000000..8b10ef8 --- /dev/null +++ b/tck/src/main/resources/jakarta.annotation.sig_3.0 @@ -0,0 +1,223 @@ +#Signature file v4.1 +#Version 3.0.0 + +CLSS public abstract interface !annotation jakarta.annotation.Generated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=SOURCE) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, LOCAL_VARIABLE, PARAMETER]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String comments() +meth public abstract !hasdefault java.lang.String date() +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.ManagedBean + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault java.lang.String value() + +CLSS public abstract interface !annotation jakarta.annotation.Nonnull + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.Nullable + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.PostConstruct + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.PreDestroy + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.Priority + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) +intf java.lang.annotation.Annotation +meth public abstract int value() + +CLSS public abstract interface !annotation jakarta.annotation.Resource + anno 0 java.lang.annotation.Repeatable(java.lang.Class value=class jakarta.annotation.Resources) + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, FIELD, METHOD]) +innr public final static !enum AuthenticationType +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean shareable() +meth public abstract !hasdefault jakarta.annotation.Resource$AuthenticationType authenticationType() +meth public abstract !hasdefault java.lang.Class type() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String lookup() +meth public abstract !hasdefault java.lang.String mappedName() +meth public abstract !hasdefault java.lang.String name() + +CLSS public final static !enum jakarta.annotation.Resource$AuthenticationType + outer jakarta.annotation.Resource +fld public final static jakarta.annotation.Resource$AuthenticationType APPLICATION +fld public final static jakarta.annotation.Resource$AuthenticationType CONTAINER +meth public static jakarta.annotation.Resource$AuthenticationType valueOf(java.lang.String) +meth public static jakarta.annotation.Resource$AuthenticationType[] values() +supr java.lang.Enum + +CLSS public abstract interface !annotation jakarta.annotation.Resources + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract jakarta.annotation.Resource[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.DeclareRoles + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.DenyAll + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.security.PermitAll + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation jakarta.annotation.security.RolesAllowed + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE, METHOD]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String[] value() + +CLSS public abstract interface !annotation jakarta.annotation.security.RunAs + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.String value() + +CLSS public abstract interface !annotation jakarta.annotation.sql.DataSourceDefinition + anno 0 java.lang.annotation.Repeatable(java.lang.Class value=class jakarta.annotation.sql.DataSourceDefinitions) + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean transactional() +meth public abstract !hasdefault int initialPoolSize() +meth public abstract !hasdefault int isolationLevel() +meth public abstract !hasdefault int loginTimeout() +meth public abstract !hasdefault int maxIdleTime() +meth public abstract !hasdefault int maxPoolSize() +meth public abstract !hasdefault int maxStatements() +meth public abstract !hasdefault int minPoolSize() +meth public abstract !hasdefault int portNumber() +meth public abstract !hasdefault java.lang.String databaseName() +meth public abstract !hasdefault java.lang.String description() +meth public abstract !hasdefault java.lang.String password() +meth public abstract !hasdefault java.lang.String serverName() +meth public abstract !hasdefault java.lang.String url() +meth public abstract !hasdefault java.lang.String user() +meth public abstract !hasdefault java.lang.String[] properties() +meth public abstract java.lang.String className() +meth public abstract java.lang.String name() + +CLSS public abstract interface !annotation jakarta.annotation.sql.DataSourceDefinitions + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[TYPE]) +intf java.lang.annotation.Annotation +meth public abstract jakarta.annotation.sql.DataSourceDefinition[] value() + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract interface java.lang.Comparable<%0 extends java.lang.Object> +meth public abstract int compareTo({java.lang.Comparable%0}) + +CLSS public abstract interface !annotation java.lang.Deprecated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() + +CLSS public abstract java.lang.Enum<%0 extends java.lang.Enum<{java.lang.Enum%0}>> +cons protected init(java.lang.String,int) +innr public final static EnumDesc +intf java.io.Serializable +intf java.lang.Comparable<{java.lang.Enum%0}> +intf java.lang.constant.Constable +meth protected final java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected final void finalize() +meth public final boolean equals(java.lang.Object) +meth public final int compareTo({java.lang.Enum%0}) +meth public final int hashCode() +meth public final int ordinal() +meth public final java.lang.Class<{java.lang.Enum%0}> getDeclaringClass() +meth public final java.lang.String name() +meth public final java.util.Optional> describeConstable() +meth public java.lang.String toString() +meth public static <%0 extends java.lang.Enum<{%%0}>> {%%0} valueOf(java.lang.Class<{%%0}>,java.lang.String) +supr java.lang.Object +hfds name,ordinal + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public abstract interface java.lang.annotation.Annotation +meth public abstract boolean equals(java.lang.Object) +meth public abstract int hashCode() +meth public abstract java.lang.Class annotationType() +meth public abstract java.lang.String toString() + +CLSS public abstract interface !annotation java.lang.annotation.Documented + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Repeatable + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.Class value() + +CLSS public abstract interface !annotation java.lang.annotation.Retention + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.RetentionPolicy value() + +CLSS public abstract interface !annotation java.lang.annotation.Target + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.ElementType[] value() + +CLSS public abstract interface java.lang.constant.Constable +meth public abstract java.util.Optional describeConstable() +