├── .github └── workflows │ └── maven.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── NOTICE.md ├── README.md ├── SECURITY.md ├── api ├── pom.xml └── src │ └── main │ ├── java │ ├── jakarta │ │ └── annotation │ │ │ ├── Generated.java │ │ │ ├── Nonnull.java │ │ │ ├── Nullable.java │ │ │ ├── PostConstruct.java │ │ │ ├── PreDestroy.java │ │ │ ├── Priority.java │ │ │ ├── Resource.java │ │ │ ├── Resources.java │ │ │ ├── package-info.java │ │ │ ├── security │ │ │ ├── DeclareRoles.java │ │ │ ├── DenyAll.java │ │ │ ├── PermitAll.java │ │ │ ├── RolesAllowed.java │ │ │ ├── RunAs.java │ │ │ └── package-info.java │ │ │ └── sql │ │ │ ├── DataSourceDefinition.java │ │ │ └── DataSourceDefinitions.java │ └── module-info.java │ └── javadoc │ └── doc-files │ └── EFSL.html ├── jenkins └── scripts │ └── tck.sh ├── spec ├── README.md ├── pom.xml └── src │ ├── assembly │ └── assembly.xml │ └── main │ ├── asciidoc │ ├── annotations-spec.adoc │ ├── images │ │ ├── annotations-10.png │ │ ├── annotations-3.png │ │ ├── annotations-4.png │ │ ├── annotations-5.png │ │ ├── annotations-6.png │ │ ├── annotations-7.png │ │ ├── annotations-8.png │ │ ├── annotations-9.png │ │ └── jakarta_ee_logo_schooner_color_stacked_default.png │ ├── license-efsl.adoc │ ├── scope.adoc │ └── spec.adoc │ └── theme │ └── jakartaee-theme.yml └── tck ├── docs ├── CAJ2.1-ReleaseNotes.html ├── CAJ3.0-ReleaseNotes.html ├── LICENSE_EFTL.md ├── TCK-Exclude-List.txt ├── index.html ├── tck-runner │ └── pom.xml └── userguide │ ├── README.md │ ├── pom.xml │ └── src │ ├── main │ └── jbake │ │ ├── assets │ │ ├── README.md │ │ ├── _config.yml │ │ ├── css │ │ │ └── style.css │ │ └── img │ │ │ └── eclipse_foundation_logo_tiny.png │ │ ├── content │ │ ├── README │ │ ├── attributes.conf │ │ ├── config.adoc │ │ ├── config.inc │ │ ├── debug-tips.inc │ │ ├── debug.adoc │ │ ├── defns.inc │ │ ├── faq.adoc │ │ ├── install-server-vi.inc │ │ ├── install-server.inc │ │ ├── install.adoc │ │ ├── intro.adoc │ │ ├── intro.inc │ │ ├── packages.inc │ │ ├── platforms.inc │ │ ├── preface.adoc │ │ ├── rebuild.adoc │ │ ├── rebuild.inc │ │ ├── req-software.inc │ │ ├── rules.adoc │ │ ├── rules.inc │ │ ├── tck-packages.inc │ │ ├── title.adoc │ │ ├── title.inc │ │ ├── using-examples.inc │ │ ├── using.adoc │ │ └── using.inc │ │ ├── jbake.properties │ │ └── templates │ │ ├── footer.ftl │ │ ├── header.ftl │ │ ├── menu.ftl │ │ └── page.ftl │ └── theme │ └── jakartaee-theme.yml ├── pom.xml └── src └── main ├── assembly └── assembly.xml ├── dist ├── README └── artifacts │ └── artifact-install.sh ├── java └── ee │ └── jakarta │ └── tck │ └── annotations │ └── signaturetest │ ├── CAJSigTestIT.java │ ├── PackageList.java │ ├── SigTest.java │ ├── SigTestData.java │ ├── SigTestDriver.java │ ├── SigTestResult.java │ ├── SignatureTestDriver.java │ └── SignatureTestDriverFactory.java └── resources ├── LICENSE_EFTL.md ├── LICENSE_EPL.md ├── ee └── jakarta │ └── tck │ └── annotations │ └── signaturetest │ ├── jakarta.annotation.sig_3.0 │ ├── sig-test-pkg-list.txt │ └── sig-test.map ├── jakarta.annotation.sig_2.1 └── jakarta.annotation.sig_3.0 /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0, which is available at 6 | # http://www.eclipse.org/legal/epl-2.0. 7 | # 8 | # This Source Code may also be made available under the following Secondary 9 | # Licenses when the conditions for such availability set forth in the 10 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | # version 2 with the GNU Classpath Exception, which is available at 12 | # https://www.gnu.org/software/classpath/license.html. 13 | # 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | # 16 | 17 | name: Jakarta Annotations API 18 | 19 | on: 20 | pull_request: 21 | push: 22 | 23 | jobs: 24 | build: 25 | name: Test on JDK ${{ matrix.java_version }} 26 | runs-on: ubuntu-latest 27 | 28 | strategy: 29 | matrix: 30 | java_version: [ 21 ] 31 | 32 | steps: 33 | - name: Checkout for build 34 | uses: actions/checkout@v3 35 | - name: Set up JDK 36 | uses: actions/setup-java@v3 37 | with: 38 | distribution: 'zulu' 39 | java-version: ${{ matrix.java_version }} 40 | cache: maven 41 | - name: Verify 42 | # GH runs against the merge done in the current year, so let's just check modified files do have some copyright 43 | run: | 44 | cd api 45 | mvn -B -U -C -V clean verify org.glassfish.copyright:glassfish-copyright-maven-plugin:check -Poss-release -Dgpg.skip=true -Dcopyright.ignoreyear=true 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Maven noise 2 | target/ 3 | 4 | # OSX noise 5 | .DS_Store 6 | 7 | # IntelliJ Idea noise 8 | .idea 9 | *.iws 10 | *.ipr 11 | *.iml 12 | 13 | # Eclipse noise 14 | .settings/ 15 | .classpath 16 | .project 17 | 18 | # NetBeans noise 19 | nbproject/ 20 | 21 | # Java noise 22 | *.class 23 | *err_pid*.log 24 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Community Code of Conduct 2 | 3 | **Version 2.0 4 | January 1, 2023** 5 | 6 | ## Our Pledge 7 | 8 | In the interest of fostering an open and welcoming environment, we as community members, contributors, Committers[^1], and Project Leads (collectively "Contributors") pledge to make participation in our projects and our community a harassment-free and inclusive experience for everyone. 9 | 10 | This Community Code of Conduct ("Code") outlines our behavior expectations as members of our community in all Eclipse Foundation activities, both offline and online. It is not intended to govern scenarios or behaviors outside of the scope of Eclipse Foundation activities. Nor is it intended to replace or supersede the protections offered to all our community members under the law. Please follow both the spirit and letter of this Code and encourage other Contributors to follow these principles into our work. Failure to read or acknowledge this Code does not excuse a Contributor from compliance with the Code. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contribute to creating a positive and professional environment include: 15 | 16 | - Using welcoming and inclusive language; 17 | - Actively encouraging all voices; 18 | - Helping others bring their perspectives and listening actively. If you find yourself dominating a discussion, it is especially important to encourage other voices to join in; 19 | - Being respectful of differing viewpoints and experiences; 20 | - Gracefully accepting constructive criticism; 21 | - Focusing on what is best for the community; 22 | - Showing empathy towards other community members; 23 | - Being direct but professional; and 24 | - Leading by example by holding yourself and others accountable 25 | 26 | Examples of unacceptable behavior by Contributors include: 27 | 28 | - The use of sexualized language or imagery; 29 | - Unwelcome sexual attention or advances; 30 | - Trolling, insulting/derogatory comments, and personal or political attacks; 31 | - Public or private harassment, repeated harassment; 32 | - Publishing others' private information, such as a physical or electronic address, without explicit permission; 33 | - Violent threats or language directed against another person; 34 | - Sexist, racist, or otherwise discriminatory jokes and language; 35 | - Posting sexually explicit or violent material; 36 | - Sharing private content, such as emails sent privately or non-publicly, or unlogged forums such as IRC channel history; 37 | - Personal insults, especially those using racist or sexist terms; 38 | - Excessive or unnecessary profanity; 39 | - Advocating for, or encouraging, any of the above behavior; and 40 | - Other conduct which could reasonably be considered inappropriate in a professional setting 41 | 42 | ## Our Responsibilities 43 | 44 | With the support of the Eclipse Foundation employees, consultants, officers, and directors (collectively, the "Staff"), Committers, and Project Leads, the Eclipse Foundation Conduct Committee (the "Conduct Committee") is responsible for clarifying the standards of acceptable behavior. The Conduct Committee takes appropriate and fair corrective action in response to any instances of unacceptable behavior. 45 | 46 | ## Scope 47 | 48 | This Code applies within all Project, Working Group, and Interest Group spaces and communication channels of the Eclipse Foundation (collectively, "Eclipse spaces"), within any Eclipse-organized event or meeting, and in public spaces when an individual is representing an Eclipse Foundation Project, Working Group, Interest Group, or their communities. Examples of representing a Project or community include posting via an official social media account, personal accounts, or acting as an appointed representative at an online or offline event. Representation of Projects, Working Groups, and Interest Groups may be further defined and clarified by Committers, Project Leads, or the Staff. 49 | 50 | ## Enforcement 51 | 52 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Conduct Committee via conduct@eclipse-foundation.org. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Without the explicit consent of the reporter, the Conduct Committee is obligated to maintain confidentiality with regard to the reporter of an incident. The Conduct Committee is further obligated to ensure that the respondent is provided with sufficient information about the complaint to reply. If such details cannot be provided while maintaining confidentiality, the Conduct Committee will take the respondent‘s inability to provide a defense into account in its deliberations and decisions. Further details of enforcement guidelines may be posted separately. 53 | 54 | Staff, Committers and Project Leads have the right to report, remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code, or to block temporarily or permanently any Contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Any such actions will be reported to the Conduct Committee for transparency and record keeping. 55 | 56 | Any Staff (including officers and directors of the Eclipse Foundation), Committers, Project Leads, or Conduct Committee members who are the subject of a complaint to the Conduct Committee will be recused from the process of resolving any such complaint. 57 | 58 | ## Responsibility 59 | 60 | The responsibility for administering this Code rests with the Conduct Committee, with oversight by the Executive Director and the Board of Directors. For additional information on the Conduct Committee and its process, please write to . 61 | 62 | ## Investigation of Potential Code Violations 63 | 64 | All conflict is not bad as a healthy debate may sometimes be necessary to push us to do our best. It is, however, unacceptable to be disrespectful or offensive, or violate this Code. If you see someone engaging in objectionable behavior violating this Code, we encourage you to address the behavior directly with those involved. If for some reason, you are unable to resolve the matter or feel uncomfortable doing so, or if the behavior is threatening or harassing, please report it following the procedure laid out below. 65 | 66 | Reports should be directed to . It is the Conduct Committee’s role to receive and address reported violations of this Code and to ensure a fair and speedy resolution. 67 | 68 | The Eclipse Foundation takes all reports of potential Code violations seriously and is committed to confidentiality and a full investigation of all allegations. The identity of the reporter will be omitted from the details of the report supplied to the accused. Contributors who are being investigated for a potential Code violation will have an opportunity to be heard prior to any final determination. Those found to have violated the Code can seek reconsideration of the violation and disciplinary action decisions. Every effort will be made to have all matters disposed of within 60 days of the receipt of the complaint. 69 | 70 | ## Actions 71 | Contributors who do not follow this Code in good faith may face temporary or permanent repercussions as determined by the Conduct Committee. 72 | 73 | This Code does not address all conduct. It works in conjunction with our [Communication Channel Guidelines](https://www.eclipse.org/org/documents/communication-channel-guidelines/), [Social Media Guidelines](https://www.eclipse.org/org/documents/social_media_guidelines.php), [Bylaws](https://www.eclipse.org/org/documents/eclipse-foundation-be-bylaws-en.pdf), and [Internal Rules](https://www.eclipse.org/org/documents/ef-be-internal-rules.pdf) which set out additional protections for, and obligations of, all contributors. The Foundation has additional policies that provide further guidance on other matters. 74 | 75 | It’s impossible to spell out every possible scenario that might be deemed a violation of this Code. Instead, we rely on one another’s good judgment to uphold a high standard of integrity within all Eclipse Spaces. Sometimes, identifying the right thing to do isn’t an easy call. In such a scenario, raise the issue as early as possible. 76 | 77 | ## No Retaliation 78 | 79 | The Eclipse community relies upon and values the help of Contributors who identify potential problems that may need to be addressed within an Eclipse Space. Any retaliation against a Contributor who raises an issue honestly is a violation of this Code. That a Contributor has raised a concern honestly or participated in an investigation, cannot be the basis for any adverse action, including threats, harassment, or discrimination. If you work with someone who has raised a concern or provided information in an investigation, you should continue to treat the person with courtesy and respect. If you believe someone has retaliated against you, report the matter as described by this Code. Honest reporting does not mean that you have to be right when you raise a concern; you just have to believe that the information you are providing is accurate. 80 | 81 | False reporting, especially when intended to retaliate or exclude, is itself a violation of this Code and will not be accepted or tolerated. 82 | 83 | Everyone is encouraged to ask questions about this Code. Your feedback is welcome, and you will get a response within three business days. Write to . 84 | 85 | ## Amendments 86 | 87 | The Eclipse Foundation Board of Directors may amend this Code from time to time and may vary the procedures it sets out where appropriate in a particular case. 88 | 89 | ### Attribution 90 | 91 | This Code was inspired by the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.4, available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct/). 92 | 93 | [^1]: Capitalized terms used herein without definition shall have the meanings assigned to them in the Bylaws. 94 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Jakarta Annotations 2 | 3 | Thanks for your interest in this project. 4 | 5 | ## Project description 6 | 7 | Jakarta Annotations™ defines a collection of annotations representing common 8 | semantic concepts that enable a declarative style of programming that applies 9 | across a variety of Java technologies. 10 | 11 | * https://projects.eclipse.org/projects/ee4j.ca 12 | 13 | ## Terms of Use 14 | 15 | This repository is subject to the Terms of Use of the Eclipse Foundation 16 | 17 | * https://www.eclipse.org/legal/termsofuse.php 18 | 19 | ## Developer resources 20 | 21 | Information regarding source code management, builds, coding standards, and 22 | more. 23 | 24 | * https://projects.eclipse.org/projects/ee4j.ca/developer 25 | 26 | The project maintains the following source code repositories 27 | 28 | * https://github.com/jakartaee/common-annotations-api 29 | 30 | ## Eclipse Development Process 31 | 32 | This Eclipse Foundation open project is governed by the Eclipse Foundation 33 | Development Process and operates under the terms of the Eclipse IP Policy. 34 | 35 | The Jakarta EE Specification Committee has adopted the Jakarta EE Specification 36 | Process (JESP) in accordance with the Eclipse Foundation Specification Process 37 | v1.2 (EFSP) to ensure that the specification process is complied with by all 38 | Jakarta EE specification projects. 39 | 40 | * https://eclipse.org/projects/dev_process 41 | * https://www.eclipse.org/org/documents/Eclipse_IP_Policy.pdf 42 | * https://jakarta.ee/about/jesp/ 43 | * https://www.eclipse.org/legal/efsp_non_assert.php 44 | 45 | ## Eclipse Contributor Agreement 46 | 47 | In order to be able to contribute to Eclipse Foundation projects you must 48 | electronically sign the Eclipse Contributor Agreement (ECA). 49 | 50 | * https://www.eclipse.org/legal/ECA.php 51 | 52 | The ECA provides the Eclipse Foundation with a permanent record that you agree 53 | that each of your contributions will comply with the commitments documented in 54 | the Developer Certificate of Origin (DCO). Having an ECA on file associated with 55 | the email address matching the "Author" field of your contribution's Git commits 56 | fulfills the DCO's requirement that you sign-off on your contributions. 57 | 58 | For more information, please see the Eclipse Committer Handbook: 59 | https://www.eclipse.org/projects/handbook/#resources-commit 60 | 61 | ## Contact 62 | 63 | Contact the project developers via the project's "dev" list. 64 | 65 | * https://accounts.eclipse.org/mailing-list/ca-dev 66 | -------------------------------------------------------------------------------- /NOTICE.md: -------------------------------------------------------------------------------- 1 | # Notices for Jakarta Annotations 2 | 3 | This content is produced and maintained by the Jakarta Annotations project. 4 | 5 | * Project home: https://projects.eclipse.org/projects/ee4j.ca 6 | 7 | ## Trademarks 8 | 9 | Jakarta Annotations™ is a trademark of the Eclipse Foundation. 10 | 11 | ## Copyright 12 | 13 | All content is the property of the respective authors or their employers. For 14 | more information regarding authorship of content, please consult the listed 15 | source code repository logs. 16 | 17 | ## Declared Project Licenses 18 | 19 | This program and the accompanying materials are made available under the terms 20 | of the Eclipse Public License v. 2.0 which is available at 21 | https://www.eclipse.org/legal/epl-2.0. This Source Code may also be made 22 | available under the following Secondary Licenses when the conditions for such 23 | availability set forth in the Eclipse Public License v. 2.0 are satisfied: 24 | GPL-2.0 with Classpath-exception-2.0 which is available at 25 | https://openjdk.java.net/legal/gplv2+ce.html. 26 | 27 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only with Classpath-exception-2.0 28 | 29 | ## Source Code 30 | 31 | The project maintains the following source code repositories: 32 | 33 | * https://github.com/jakartaee/common-annotations-api 34 | 35 | ## Cryptography 36 | 37 | Content may contain encryption software. The country in which you are currently 38 | may have restrictions on the import, possession, and use, and/or re-export to 39 | another country, of encryption software. BEFORE using any encryption software, 40 | please check the country's laws, regulations and policies concerning the import, 41 | possession, or use, and re-export of encryption software, to see if this is 42 | permitted. 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jakarta annotations 2 | 3 | [![Build Status](https://github.com/jakartaee/common-annotations-api/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/jakartaee/common-annotations-api/actions/workflows/maven.yml?branch=master) 4 | [![Jakarta Staging (Snapshots)](https://img.shields.io/nexus/s/https/jakarta.oss.sonatype.org/jakarta.annotation/jakarta.annotation-api.svg)](https://jakarta.oss.sonatype.org/content/repositories/staging/jakarta/annotation/jakarta.annotation-api/) 5 | 6 | 7 | **Jakarta Annotations** defines a collection of annotations representing common 8 | semantic concepts that enable a declarative style of programming that applies 9 | across a variety of Java technologies. 10 | 11 | Jakarta Annotations uses a [Java Platform Module System](http://openjdk.java.net/projects/jigsaw/spec/) 12 | module name `jakarta.annotation`. 13 | 14 | ## Contributing 15 | 16 | We use [contribution policy](CONTRIBUTING.md), which means we can only accept contributions under 17 | the terms of [Eclipse Contributor Agreement](http://www.eclipse.org/legal/ECA.php). 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | This project implements the Eclipse Foundation Security Policy 4 | 5 | * https://www.eclipse.org/security 6 | 7 | ## Supported Versions 8 | 9 | These versions of Jakarta Annotations are currently being supported with 10 | security updates. 11 | 12 | | Version | Released | Supported | 13 | | ------- | ---------- | --------- | 14 | | 3.0 | 2023-09-01 | Yes | 15 | | 2.1.1 | 2022-06-15 | Yes | 16 | | < 2.1 | 2022-01-31 | No | 17 | 18 | ## Reporting a Vulnerability 19 | 20 | Please report vulnerabilities to the Eclipse Foundation Security Team at 21 | security@eclipse.org -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/Generated.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * The {@code Generated} annotation is used to mark source code 24 | * that has been generated. 25 | * It can also be used to differentiate user written code from generated code 26 | * in a single file. 27 | *

The {@code value} element must have the name of the 28 | * code generator. The recommended convention is to use the fully qualified 29 | * name of the code generator in the value field, 30 | * for example {@code com.company.package.classname}.

31 | *

The {@code date} element is used to indicate the date the 32 | * source was generated. 33 | * The {@code date} element must follow the ISO 8601 standard. 34 | * For example, the {@code date} element could have the 35 | * value {@code 2001-07-04T12:08:56.235-0700}, 36 | * which represents 2001-07-04 12:08:56 local time in the U.S. Pacific 37 | * time zone.

38 | *

The {@code comment} element is a place holder for any comments 39 | * that the code generator may want to include in the generated code.

40 | * 41 | * @since 1.6, Common Annotations 1.0 42 | */ 43 | 44 | @Documented 45 | @Retention(SOURCE) 46 | @Target({PACKAGE, TYPE, ANNOTATION_TYPE, METHOD, CONSTRUCTOR, FIELD, 47 | LOCAL_VARIABLE, PARAMETER}) 48 | public @interface Generated { 49 | /** 50 | * The value element must have the name of the code generator. 51 | * The recommended convention is to use the fully qualified name of the 52 | * code generator. For example: {@code com.acme.generator.CodeGen}. 53 | */ 54 | String[] value(); 55 | 56 | /** 57 | * Date when the source was generated. 58 | */ 59 | String date() default ""; 60 | 61 | /** 62 | * A place holder for any comments that the code generator may want to 63 | * include in the generated code. 64 | */ 65 | String comments() default ""; 66 | } 67 | 68 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/Nonnull.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | 19 | import java.lang.annotation.Documented; 20 | import java.lang.annotation.Retention; 21 | 22 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 23 | 24 | /** 25 | * The annotated element must not be null. 26 | *

27 | * Annotated fields must not be null after construction has completed. 28 | *

29 | * When this annotation is applied to a method it applies to the method return value. 30 | * 31 | * @see jakarta.annotation.Nullable 32 | * @since 2.0 33 | */ 34 | @Documented 35 | @Retention(RUNTIME) 36 | public @interface Nonnull { 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/Nullable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | 19 | import java.lang.annotation.Documented; 20 | import java.lang.annotation.Retention; 21 | 22 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 23 | 24 | /** 25 | * The annotated element could be null under some circumstances. 26 | *

27 | * In general, this means developers will have to read the documentation to 28 | * determine when a null value is acceptable and whether it is necessary to 29 | * check for a null value. 30 | *

31 | * This annotation is useful mostly for overriding a {@link Nonnull} annotation. 32 | * Static analysis tools should generally treat the annotated items as though they 33 | * had no annotation, unless they are configured to minimize false negatives. 34 | *

35 | * When this annotation is applied to a method it applies to the method return value. 36 | * 37 | * @see jakarta.annotation.Nonnull 38 | * @since 2.0 39 | */ 40 | @Documented 41 | @Retention(RUNTIME) 42 | public @interface Nullable { 43 | } 44 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/PostConstruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | 19 | import java.lang.annotation.*; 20 | import static java.lang.annotation.ElementType.*; 21 | import static java.lang.annotation.RetentionPolicy.*; 22 | 23 | /** 24 | * The {@code PostConstruct} annotation is used on a method that 25 | * needs to be executed after dependency injection is done to perform 26 | * any initialization. This method must be invoked before the class 27 | * is put into service. This annotation must be supported on all classes 28 | * that support dependency injection. The method annotated with 29 | * {@code PostConstruct} must be invoked even if the class does 30 | * not request any resources to be injected. Only one 31 | * method in a given class can be annotated with this annotation. 32 | * The method on which the {@code PostConstruct} annotation is 33 | * applied must fulfill all the following criteria: 34 | *

    35 | *
  • The method must not have any parameters except in the case of 36 | * interceptors in which case it takes an {@code InvocationContext} 37 | * object as defined by the Jakarta Interceptors specification.
  • 38 | *
  • The method defined on an interceptor class or superclass of an 39 | * interceptor class must have one of the following signatures: 40 | *

    41 | * {@code void (InvocationContext)} 42 | *

    43 | * {@code Object (InvocationContext) throws Exception} 44 | *

    45 | * Note: A PostConstruct interceptor method must not throw application 46 | * exceptions, but it may be declared to throw checked exceptions including 47 | * the java.lang.Exception if the same interceptor method interposes on 48 | * business or timeout methods in addition to lifecycle events. If a 49 | * PostConstruct interceptor method returns a value, it is ignored by 50 | * the container. 51 | *

  • 52 | *
  • The method defined on a non-interceptor class must have the 53 | * following signature: 54 | *

    55 | * {@code void ()} 56 | *

  • 57 | *
  • The method on which the {@code PostConstruct} annotation 58 | * is applied may be public, protected, package private or private.
  • 59 | *
  • The method must not be static except for the application client.
  • 60 | *
  • The method should not be final.
  • 61 | *
  • If the method throws an unchecked exception the class must not be put into 62 | * service except in the case where the exception is handled by an 63 | * interceptor.
64 | * 65 | * @see jakarta.annotation.PreDestroy 66 | * @see jakarta.annotation.Resource 67 | * @since 1.6, Common Annotations 1.0 68 | */ 69 | @Documented 70 | @Retention (RUNTIME) 71 | @Target(METHOD) 72 | public @interface PostConstruct { 73 | } 74 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/PreDestroy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | 19 | import java.lang.annotation.*; 20 | import static java.lang.annotation.ElementType.*; 21 | import static java.lang.annotation.RetentionPolicy.*; 22 | 23 | /** 24 | * The {@code PreDestroy} annotation is used on a method as a 25 | * callback notification to signal that the instance is in the 26 | * process of being removed by the container. The method annotated 27 | * with {@code PreDestroy} is typically used to 28 | * release resources that it has been holding. This annotation must be 29 | * supported by all container-managed objects that support the use of 30 | * the {@code PostConstruct} annotation except the Jakarta EE application 31 | * client. The method on which the {@code PreDestroy} annotation 32 | * is applied must fulfill all of the following criteria: 33 | *
    34 | *
  • The method must not have any parameters except in the case of 35 | * interceptors in which case it takes an {@code InvocationContext} 36 | * object as defined by the Jakarta Interceptors specification.
  • 37 | *
  • The method defined on an interceptor class or superclass of an 38 | * interceptor class must have one of the following signatures: 39 | *

    40 | * {@code void (InvocationContext)} 41 | *

    42 | * {@code Object (InvocationContext) throws Exception} 43 | *

    44 | * Note: A PreDestroy interceptor method must not throw application 45 | * exceptions, but it may be declared to throw checked exceptions including 46 | * the java.lang.Exception if the same interceptor method interposes on 47 | * business or timeout methods in addition to lifecycle events. If a 48 | * PreDestroy interceptor method returns a value, it is ignored by 49 | * the container. 50 | *

  • 51 | *
  • The method defined on a non-interceptor class must have the 52 | * following signature: 53 | *

    54 | * {@code void ()} 55 | *

  • 56 | *
  • The method on which PreDestroy is applied may be public, protected, 57 | * package private or private.
  • 58 | *
  • The method must not be static.
  • 59 | *
  • The method should not be final.
  • 60 | *
  • If the method throws an unchecked exception it is ignored by 61 | * the container.
  • 62 | *
63 | * 64 | * @see jakarta.annotation.PostConstruct 65 | * @see jakarta.annotation.Resource 66 | * @since 1.6, Common Annotations 1.0 67 | */ 68 | 69 | @Documented 70 | @Retention (RUNTIME) 71 | @Target(METHOD) 72 | public @interface PreDestroy { 73 | } 74 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/Priority.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | 19 | import java.lang.annotation.Documented; 20 | import java.lang.annotation.Retention; 21 | 22 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 23 | 24 | /** 25 | * The {@code Priority} annotation can be applied to any program elements 26 | * to indicate in what order they should be used. 27 | * The effect of using the {@code Priority} annotation in 28 | * any particular instance is defined by other specifications that 29 | * define the use of a specific class. 30 | *

31 | * For example, the Jakarta Interceptors specification defines the use of 32 | * priorities on interceptors to control the order in which 33 | * interceptors are called.

34 | *

35 | * Priority values should generally be non-negative, with negative values 36 | * reserved for special meanings such as "undefined" or "not specified". 37 | * A specification that defines use of the {@code Priority} annotation may define 38 | * the range of allowed priorities and any priority values with special 39 | * meaning.

40 | * 41 | * @since Common Annotations 1.2 42 | */ 43 | @Retention(RUNTIME) 44 | @Documented 45 | public @interface Priority { 46 | /** 47 | * The priority value. 48 | */ 49 | int value(); 50 | } 51 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/Resource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | 19 | import java.lang.annotation.*; 20 | import static java.lang.annotation.ElementType.*; 21 | import static java.lang.annotation.RetentionPolicy.*; 22 | 23 | /** 24 | * The {@code Resource} annotation marks a resource that is needed 25 | * by the application. This annotation may be applied to an 26 | * application component class, or to fields or methods of the 27 | * component class. When the annotation is applied to a 28 | * field or method, the container will inject an instance 29 | * of the requested resource into the application component 30 | * when the component is initialized. If the annotation is 31 | * applied to the component class, the annotation declares a 32 | * resource that the application will look up at runtime. 33 | *

34 | * Even though this annotation is not marked {@code Inherited}, deployment 35 | * tools are required to examine all superclasses of any component 36 | * class to discover all uses of this annotation in all superclasses. 37 | * All such annotation instances specify resources that are needed 38 | * by the application component. Note that this annotation may 39 | * appear on private fields and methods of superclasses; the container 40 | * is required to perform injection in these cases as well.

41 | * 42 | * @since 1.6, Common Annotations 1.0 43 | */ 44 | @Target({TYPE, FIELD, METHOD}) 45 | @Retention(RUNTIME) 46 | @Repeatable(Resources.class) 47 | public @interface Resource { 48 | /** 49 | * The JNDI name of the resource. For field annotations, 50 | * the default is the field name. For method annotations, 51 | * the default is the JavaBeans property name corresponding 52 | * to the method. For class annotations, there is no default 53 | * and this must be specified. 54 | */ 55 | String name() default ""; 56 | 57 | /** 58 | * The name of the resource that the reference points to. It can 59 | * link to any compatible resource using the global JNDI names. 60 | * 61 | * @since 1.7, Common Annotations 1.1 62 | */ 63 | 64 | String lookup() default ""; 65 | 66 | /** 67 | * The Java type of the resource. For field annotations, 68 | * the default is the type of the field. For method annotations, 69 | * the default is the type of the JavaBeans property. 70 | * For class annotations, there is no default and this must be 71 | * specified. 72 | */ 73 | Class type() default java.lang.Object.class; 74 | 75 | /** 76 | * The two possible authentication types for a resource. 77 | */ 78 | enum AuthenticationType { 79 | CONTAINER, 80 | APPLICATION 81 | } 82 | 83 | /** 84 | * The authentication type to use for this resource. 85 | * This may be specified for resources representing a 86 | * connection factory of any supported type, and must 87 | * not be specified for resources of other types. 88 | */ 89 | AuthenticationType authenticationType() default AuthenticationType.CONTAINER; 90 | 91 | /** 92 | * Indicates whether this resource can be shared between 93 | * this component and other components. 94 | * This may be specified for resources representing a 95 | * connection factory of any supported type, and must 96 | * not be specified for resources of other types. 97 | */ 98 | boolean shareable() default true; 99 | 100 | /** 101 | * A product-specific name that this resource should be mapped to. 102 | * The {@code mappedName} element provides for mapping the 103 | * resource reference to the name of a resource known to the 104 | * applicaiton server. The mapped name could be of any form. 105 | *

Application servers are not required to support any particular 106 | * form or type of mapped name, nor the ability to use mapped names. 107 | * The mapped name is product-dependent and often installation-dependent. 108 | * No use of a mapped name is portable.

109 | */ 110 | String mappedName() default ""; 111 | 112 | /** 113 | * Description of this resource. The description is expected 114 | * to be in the default language of the system on which the 115 | * application is deployed. The description can be presented 116 | * to the Deployer to help in choosing the correct resource. 117 | */ 118 | String description() default ""; 119 | } 120 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/Resources.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * This class is used to allow multiple resources declarations. 24 | * 25 | * @see jakarta.annotation.Resource 26 | * @since 1.6, Common Annotations 1.0 27 | */ 28 | 29 | @Documented 30 | @Retention(RUNTIME) 31 | @Target(TYPE) 32 | public @interface Resources { 33 | /** 34 | * Array used for multiple resource declarations. 35 | */ 36 | Resource[] value(); 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /** 18 | * This package defines the common annotations. 19 | */ 20 | package jakarta.annotation; 21 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/security/DeclareRoles.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.security; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * Used by application to declare security roles. It can be 24 | * specified on a class. The value of the {@code DeclareRoles} 25 | * annotation is a list of security role names. 26 | * 27 | * @since Common Annotations 1.0 28 | */ 29 | @Documented 30 | @Retention (RUNTIME) 31 | @Target(TYPE) 32 | public @interface DeclareRoles { 33 | /** 34 | * List of security role names. 35 | */ 36 | String[] value(); 37 | } 38 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/security/DenyAll.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.security; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * Specifies that no security roles are allowed to invoke the specified 24 | * method(s). 25 | * 26 | * @see jakarta.annotation.security.RolesAllowed 27 | * @see jakarta.annotation.security.PermitAll 28 | * @since Common Annotations 1.0 29 | */ 30 | @Documented 31 | @Retention (RUNTIME) 32 | @Target({TYPE, METHOD}) 33 | public @interface DenyAll { 34 | } 35 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/security/PermitAll.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.security; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * Specifies that all security roles are allowed to invoke the specified 24 | * method(s) — i.e., that the specified method(s) are "unchecked". 25 | * It can be specified on a class or on methods. Specifying it on the class 26 | * means that it applies to all methods of the class. If specified at the 27 | * method level, it only affects that method. If the {@code RolesAllowed} 28 | * annotation is specified at the class level and this annotation is 29 | * applied at the method level, the {@code PermitAll} 30 | * annotation overrides the {@code RolesAllowed} annotation for 31 | * the specified method. 32 | * 33 | * @see jakarta.annotation.security.RolesAllowed 34 | * @see jakarta.annotation.security.DenyAll 35 | * 36 | * @since Common Annotations 1.0 37 | */ 38 | @Documented 39 | @Retention (RUNTIME) 40 | @Target({TYPE, METHOD}) 41 | public @interface PermitAll { 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/security/RolesAllowed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.security; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * Specifies the list of security roles permitted to access method(s) in an 24 | * application. The value of the {@code RolesAllowed} annotation 25 | * is a list of security role names. 26 | * This annotation can be specified on a class or on method(s). Specifying it 27 | * at a class level means that it applies to all the methods in the class. 28 | * Specifying it on a method means that it is applicable to that method only. 29 | * If applied at both the class and methods level, the method value overrides 30 | * the class value if the two conflict. 31 | * 32 | * @since Common Annotations 1.0 33 | */ 34 | @Documented 35 | @Retention (RUNTIME) 36 | @Target({TYPE, METHOD}) 37 | public @interface RolesAllowed { 38 | /** 39 | * List of roles that are permitted access. 40 | */ 41 | String[] value(); 42 | } 43 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/security/RunAs.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.security; 18 | import java.lang.annotation.*; 19 | import static java.lang.annotation.ElementType.*; 20 | import static java.lang.annotation.RetentionPolicy.*; 21 | 22 | /** 23 | * Defines the identity of the application during execution. 24 | * This allows developers to execute an application under a particular role. 25 | * The role must map to the user / group information in the container's 26 | * security realm. Its value is the name of a security role. 27 | * 28 | * @since Common Annotations 1.0 29 | */ 30 | @Documented 31 | @Retention (RUNTIME) 32 | @Target(TYPE) 33 | public @interface RunAs { 34 | /** 35 | * Name of a security role. 36 | */ 37 | String value(); 38 | } 39 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/security/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /** 18 | * This package contains the security common annotations. 19 | */ 20 | package jakarta.annotation.security; 21 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/sql/DataSourceDefinition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.sql; 18 | 19 | import java.lang.annotation.Repeatable; 20 | import java.lang.annotation.Target; 21 | import java.lang.annotation.Retention; 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.RetentionPolicy; 24 | 25 | /** 26 | * Annotation used to define a container {@code DataSource} to 27 | * be registered with JNDI. The {@code DataSource} may be configured by 28 | * setting the annotation elements for commonly used {@code DataSource} 29 | * properties. Additional standard and vendor-specific properties may be 30 | * specified using the {@code properties} element. 31 | *

32 | * 33 | * The data source will be registered under the name specified in the 34 | * {@code name} element. It may be defined to be in any valid 35 | * Jakarta EE namespace, which will determine the accessibility of 36 | * the data source from other components. 37 | *

38 | * A JDBC driver implementation class of the appropriate type, either 39 | * {@code DataSource}, {@code ConnectionPoolDataSource}, or 40 | * {@code XADataSource}, must be indicated by the {@code className} 41 | * element. The availability of the driver class will be assumed at runtime. 42 | *

43 | * DataSource properties should not be specified more than once. If 44 | * the url annotation element contains a DataSource property that was also 45 | * specified using the corresponding annotation element or was specified in 46 | * the properties annotation element, the precedence order is undefined 47 | * and implementation specific: 48 | *

49 | * {@snippet : 50 | * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", 51 | * className="org.apache.derby.jdbc.ClientDataSource", 52 | * url="jdbc:derby://localhost:1527/myDB;user=bill", 53 | * user="lance", 54 | * password="secret", 55 | * databaseName="testDB", 56 | * serverName="luckydog" 57 | * )// DO NOT DO THIS!!! 58 | * } 59 | *

60 | * In the above example, the {@code databaseName}, {@code user} 61 | * and {@code serverName} properties were specified as part of the 62 | * {@code url} property and using the corresponding 63 | * annotation elements. This should be avoided. 64 | *

65 | * If the {@code properties} annotation element is used and contains a 66 | * DataSource property that was also specified using the corresponding 67 | * annotation element, the annotation element value takes precedence. 68 | * For example: 69 | *

70 | * {@snippet : 71 | * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", 72 | * className="org.apache.derby.jdbc.ClientDataSource", 73 | * user="lance", 74 | * password="secret", 75 | * databaseName="testDB", 76 | * serverName="luckydog", 77 | * properties= {"databaseName=myDB", "databaseProp=doThis"} 78 | * )// DO NOT DO THIS!!! 79 | * } 80 | *

81 | * This would result in the following values being used when configuring 82 | * the DataSource: 83 | *

    84 | *
  • serverName=luckydog
  • 85 | *
  • portNumber=1527
  • 86 | *
  • databaseName=testDB
  • 87 | *
  • user=lance
  • 88 | *
  • password=secret
  • 89 | *
  • databaseProp=doThis
  • 90 | *
91 | *

92 | * Vendors are not required to support properties that do not normally 93 | * apply to a specific data source type. For example, specifying the 94 | * {@code transactional} property to be {@code true} but supplying 95 | * a value for {@code className} that implements a data source class 96 | * other than {@code XADataSource} may not be supported. 97 | *

98 | * Vendor-specific properties may be combined with or used to 99 | * override standard data source properties defined using this annotation. 100 | *

101 | * {@code DataSource} properties that are specified and are not supported 102 | * in a given configuration or cannot be mapped to a vendor specific 103 | * configuration property may be ignored. 104 | *

105 | * Examples: 106 | *
107 | * {@snippet : 108 | * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", 109 | * className="com.foobar.MyDataSource", 110 | * portNumber=6689, 111 | * serverName="myserver.com", 112 | * user="lance", 113 | * password="secret" 114 | * ) 115 | * } 116 | *

117 | * Using a {@code URL}: 118 | *
119 | * {@snippet : 120 | * @DataSourceDefinition(name="java:global/MyApp/MyDataSource", 121 | * className="org.apache.derby.jdbc.ClientDataSource", 122 | * url="jdbc:derby://localhost:1527/myDB", 123 | * user="lance", 124 | * password="secret" 125 | * ) 126 | * } 127 | *

128 | * An example lookup of the DataSource from an Jakarta Enterprise Beans: 129 | * {@snippet : 130 | * @Stateless 131 | * public class MyStatelessEJB { 132 | * @Resource(lookup="java:global/MyApp/myDataSource") 133 | * DataSource myDB; 134 | * ... 135 | * } 136 | * } 137 | * 138 | * @see javax.sql.DataSource 139 | * @see javax.sql.XADataSource 140 | * @see javax.sql.ConnectionPoolDataSource 141 | * @since Common Annotations 1.1 142 | */ 143 | @Target({ElementType.TYPE}) 144 | @Retention(RetentionPolicy.RUNTIME) 145 | @Repeatable(DataSourceDefinitions.class) 146 | public @interface DataSourceDefinition { 147 | 148 | /** 149 | * JNDI name by which the data source will be registered. 150 | * @since 1.1 151 | */ 152 | String name(); 153 | 154 | /** 155 | * Name of a DataSource class that implements 156 | * {@code javax.sql.DataSource} or {@code javax.sql.XADataSource} 157 | * or {@code javax.sql.ConnectionPoolDataSource}. 158 | * @since 1.1 159 | */ 160 | String className(); 161 | 162 | /** 163 | * Description of this data source 164 | * @since 1.1 165 | */ 166 | String description() default ""; 167 | 168 | /** 169 | * A JDBC URL. If the {@code url} annotation element contains a 170 | * DataSource property that was also specified using the corresponding 171 | * annotation element, the precedence order is undefined and 172 | * implementation specific. 173 | * @since 1.1 174 | */ 175 | String url() default ""; 176 | 177 | /** 178 | * User name to use for connection authentication. 179 | * @since 1.1 180 | */ 181 | String user() default ""; 182 | 183 | /** 184 | * Password to use for connection authentication. 185 | * @since 1.1 186 | */ 187 | String password() default ""; 188 | 189 | /** 190 | * Name of a database on a server. 191 | * @since 1.1 192 | */ 193 | String databaseName() default ""; 194 | 195 | /** 196 | * Port number where a server is listening for requests. 197 | * @since 1.1 198 | */ 199 | int portNumber() default -1; 200 | 201 | /** 202 | * Database server name. 203 | * @since 1.1 204 | */ 205 | String serverName() default "localhost"; 206 | 207 | /** 208 | * Isolation level for connections. The Isolation level 209 | * must be one of the following: 210 | * 211 | *

    212 | *
  • Connection.TRANSACTION_NONE, 213 | *
  • Connection.TRANSACTION_READ_ UNCOMMITTED, 214 | *
  • Connection.TRANSACTION_READ_COMMITTED, 215 | *
  • Connection.TRANSACTION_REPEATABLE_READ, 216 | *
  • Connection.TRANSACTION_SERIALIZABLE 217 | *
218 | * 219 | * Default is vendor-specific. 220 | * @since 1.1 221 | */ 222 | int isolationLevel() default -1; 223 | 224 | /** 225 | * Set to {@code false} if connections should not participate 226 | * in transactions. 227 | *

228 | * Default is to enlist in a transaction when one is active or becomes 229 | * active. 230 | * @since 1.1 231 | */ 232 | boolean transactional() default true; 233 | 234 | /** 235 | * Number of connections that should be created when a connection pool 236 | * is initialized. 237 | *

238 | * Default is vendor-specific 239 | * @since 1.1 240 | */ 241 | int initialPoolSize() default -1; 242 | 243 | /** 244 | * Maximum number of connections that should be concurrently allocated for a 245 | * connection pool. 246 | *

247 | * Default is vendor-specific. 248 | * @since 1.1 249 | */ 250 | int maxPoolSize() default -1; 251 | 252 | /** 253 | * Minimum number of connections that should be allocated for a 254 | * connection pool. 255 | *

256 | * Default is vendor-specific. 257 | * @since 1.1 258 | */ 259 | int minPoolSize() default -1; 260 | 261 | /** 262 | * The number of seconds that a physical connection 263 | * should remain unused in the pool before the 264 | * connection is closed for a connection pool. 265 | *

266 | * Default is vendor-specific 267 | * @since 1.1 268 | */ 269 | int maxIdleTime() default -1; 270 | 271 | /** 272 | * The total number of statements that a connection pool should keep open. 273 | * A value of 0 indicates that the caching of statements is disabled for 274 | * a connection pool. 275 | *

276 | * Default is vendor-specific 277 | * @since 1.1 278 | */ 279 | int maxStatements() default -1; 280 | /** 281 | * Used to specify vendor-specific properties and less commonly 282 | * used {@code DataSource} properties such as: 283 | * 284 | *

    285 | *
  • dataSourceName 286 | *
  • networkProtocol 287 | *
  • propertyCycle 288 | *
  • roleName 289 | *
290 | * 291 | * Properties are specified using the format: 292 | * propertyName=propertyValue with one property per array element. 293 | *

294 | * If a DataSource property is specified in the {@code properties} 295 | * element and the annotation element for the property is also 296 | * specified, the annotation element value takes precedence. 297 | * @since 1.1 298 | */ 299 | String[] properties() default {}; 300 | 301 | 302 | /** 303 | * Sets the maximum time in seconds that this data source will wait while 304 | * attempting to connect to a database. A value of zero specifies that 305 | * the timeout is the default system timeout if there is one; otherwise, 306 | * it specifies that there is no timeout. 307 | *

308 | * Default is vendor-specific. 309 | * @since 1.1 310 | */ 311 | int loginTimeout() default 0; 312 | } 313 | -------------------------------------------------------------------------------- /api/src/main/java/jakarta/annotation/sql/DataSourceDefinitions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, 2023 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package jakarta.annotation.sql; 18 | 19 | import java.lang.annotation.Target; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.ElementType; 22 | import java.lang.annotation.RetentionPolicy; 23 | 24 | /** 25 | * Declares one or more {@code DataSourceDefinition} annotations. 26 | * 27 | * @see jakarta.annotation.sql.DataSourceDefinition 28 | * @since Common Annotations 1.1 29 | */ 30 | @Target({ElementType.TYPE}) 31 | @Retention(RetentionPolicy.RUNTIME) 32 | public @interface DataSourceDefinitions { 33 | DataSourceDefinition[] value (); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /api/src/main/java/module-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | 18 | module jakarta.annotation { 19 | 20 | exports jakarta.annotation; 21 | exports jakarta.annotation.security; 22 | exports jakarta.annotation.sql; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /api/src/main/javadoc/doc-files/EFSL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20 | 21 | Eclipse Foundation Specification License - v1.0 22 | 23 | 24 |

Eclipse Foundation Specification License - v1.0

25 |

By using and/or copying this document, or the Eclipse Foundation 26 | document from which this statement is linked, you (the licensee) agree 27 | that you have read, understood, and will comply with the following 28 | terms and conditions:

29 | 30 |

Permission to copy, and distribute the contents of this document, or 31 | the Eclipse Foundation document from which this statement is linked, in 32 | any medium for any purpose and without fee or royalty is hereby 33 | granted, provided that you include the following on ALL copies of the 34 | document, or portions thereof, that you use:

35 | 36 |
    37 |
  • link or URL to the original Eclipse Foundation document.
  • 38 |
  • All existing copyright notices, or if one does not exist, a notice 39 | (hypertext is preferred, but a textual representation is permitted) 40 | of the form: "Copyright © [$date-of-document] 41 | “Eclipse Foundation, Inc. <<url to this license>> 42 | " 43 |
  • 44 |
45 | 46 |

Inclusion of the full text of this NOTICE must be provided. We 47 | request that authorship attribution be provided in any software, 48 | documents, or other items or products that you create pursuant to the 49 | implementation of the contents of this document, or any portion 50 | thereof.

51 | 52 |

No right to create modifications or derivatives of Eclipse Foundation 53 | documents is granted pursuant to this license, except anyone may 54 | prepare and distribute derivative works and portions of this document 55 | in software that implements the specification, in supporting materials 56 | accompanying such software, and in documentation of such software, 57 | PROVIDED that all such works include the notice below. HOWEVER, the 58 | publication of derivative works of this document for use as a technical 59 | specification is expressly prohibited.

60 | 61 |

The notice is:

62 | 63 |

"Copyright © 2018 Eclipse Foundation. This software or 64 | document includes material copied from or derived from [title and URI 65 | of the Eclipse Foundation specification document]."

66 | 67 |

Disclaimers

68 | 69 |

THIS DOCUMENT IS PROVIDED "AS IS," AND THE COPYRIGHT 70 | HOLDERS AND THE ECLIPSE FOUNDATION MAKE NO REPRESENTATIONS OR 71 | WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 72 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 73 | NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE 74 | SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS 75 | WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 76 | OTHER RIGHTS.

77 | 78 |

THE COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION WILL NOT BE LIABLE 79 | FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT 80 | OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE 81 | CONTENTS THEREOF.

82 | 83 |

The name and trademarks of the copyright holders or the Eclipse 84 | Foundation may NOT be used in advertising or publicity pertaining to 85 | this document or its contents without specific, written prior 86 | permission. Title to copyright in this document will at all times 87 | remain with copyright holders.

88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /jenkins/scripts/tck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -xe 2 | # 3 | # Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program and the accompanying materials are made available under the 6 | # terms of the Eclipse Distribution License v. 1.0, which is available at 7 | # http://www.eclipse.org/org/documents/edl-v10.php. 8 | # 9 | # SPDX-License-Identifier: BSD-3-Clause 10 | # 11 | 12 | [[ -z ${1} ]] && SUMMARY_FILE_NAME='SUMMARY.TXT' || SUMMARY_FILE_NAME=${1} 13 | 14 | 15 | wget --no-cache -nv ${TCK_URL} -O jakarta-annotations-tck-3.0.0.zip 16 | unzip jakarta-annotations-tck-3.0.0.zip 17 | 18 | cd annotations-tck/artifacts 19 | 20 | ./artifact-install.sh 21 | 22 | cd .. 23 | 24 | mvn -Pstaging -Dglassfish.toplevel.dir=${GF_TOP_LEVEL_DIR} -Dglassfish.container.version=${GF_VERSION} verify -f tck-runner/pom.xml | tee ${WORKSPACE}/tck.log 25 | 26 | cd ${WORKSPACE} 27 | 28 | export NAME=${TCK_URL##*/} 29 | 30 | echo '***********************************************************************************' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 31 | echo '*** TCK bundle information ***' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 32 | echo "*** Name: ${NAME} ***" >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 33 | echo "*** Download URL: ${TCK_URL} ***" >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 34 | echo '*** Date and size: '`stat -c "date: %y, size(b): %s" ${NAME}`' ***'>> ${WORKSPACE}/${SUMMARY_FILE_NAME} 35 | echo "*** SHA256SUM: "`sha256sum ${NAME} | awk '{print $1}'`' ***' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 36 | echo '*** ***' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 37 | echo '*** MVN/JDK info ***' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 38 | mvn -v | tee -a ${WORKSPACE}/${SUMMARY_FILE_NAME} || true 39 | echo '***********************************************************************************' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 40 | echo '*** TCK results summary ***' >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 41 | grep 'Tests run: ' ${WORKSPACE}/tck.log >> ${WORKSPACE}/${SUMMARY_FILE_NAME} 42 | 43 | cat ${WORKSPACE}/${SUMMARY_FILE_NAME} 44 | -------------------------------------------------------------------------------- /spec/README.md: -------------------------------------------------------------------------------- 1 | Jakarta Annotations Specification 2 | ============================ 3 | 4 | This project generates the Jakarta Annotations Specification. 5 | 6 | Building 7 | -------- 8 | 9 | Prerequisites: 10 | 11 | * JDK8+ 12 | * Maven 3.0.3+ 13 | 14 | Run the full build: 15 | 16 | `mvn install` 17 | 18 | Generate specification with given status (ex. "Final Release"): 19 | 20 | `mvn clean install -Dstatus="Final Release"` 21 | 22 | Locate the html files: 23 | - `target/generated-docs/annotations-spec-.html` 24 | 25 | Locate the PDF files: 26 | - `target/generated-docs/annotations-spec-.pdf` 27 | -------------------------------------------------------------------------------- /spec/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | org.eclipse.ee4j 23 | project 24 | 1.0.9 25 | 26 | 27 | 28 | 4.0.0 29 | annotations-spec 30 | 3.0-SNAPSHOT 31 | pom 32 | 33 | Jakarta Annotations Specification 34 | Jakarta Annotations Specification 35 | 36 | https://projects.eclipse.org/projects/ee4j.ca 37 | 38 | 39 | ${project.build.directory}/staging 40 | true 41 | 2.2.4 42 | 2.3.9 43 | 44 | DRAFT 45 | MMMM dd, yyyy 46 | 2023-10-28T00:00:00Z 47 | ${maven.build.timestamp} 48 | 49 | 50 | 51 | package 52 | 53 | 54 | org.apache.maven.plugins 55 | maven-enforcer-plugin 56 | 3.4.1 57 | 58 | 59 | enforce-versions 60 | 61 | enforce 62 | 63 | 64 | 65 | 66 | [1.8.0,) 67 | You need JDK8 or higher 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | org.asciidoctor 76 | asciidoctor-maven-plugin 77 | ${asciidoctor.maven.plugin.version} 78 | 79 | 80 | org.asciidoctor 81 | asciidoctorj-pdf 82 | ${asciidoctorj.pdf.version} 83 | 84 | 85 | 86 | 87 | asciidoc-to-html 88 | generate-resources 89 | 90 | process-asciidoc 91 | 92 | 93 | html5 94 | ${project.build.directory}/generated-docs/annotations-spec-${project.version}.html 95 | 96 | book 97 | ${status} 98 | 99 | font 100 | left 101 | font 102 | true 103 | 104 | - 105 | true 106 | 107 | 108 | 109 | 110 | asciidoc-to-pdf 111 | generate-resources 112 | 113 | process-asciidoc 114 | 115 | 116 | pdf 117 | ${project.build.directory}/generated-docs/annotations-spec-${project.version}.pdf 118 | 119 | ${project.basedir}/src/main/theme 120 | jakartaee 121 | book 122 | ${status} 123 | 124 | font 125 | 126 | 127 | font 128 | true 129 | 130 | - 131 | true 132 | true 133 | 134 | 135 | 136 | 137 | 138 | annotations-spec.adoc 139 | 140 | ${project.version} 141 | ${status} 142 | ${revisiondate} 143 | 144 | 145 | 146 | 147 | 148 | 151 | 152 | org.apache.maven.plugins 153 | maven-assembly-plugin 154 | 3.6.0 155 | false 156 | 157 | 158 | package 159 | 160 | single 161 | 162 | 163 | false 164 | 165 | src/assembly/assembly.xml 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /spec/src/assembly/assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | spec 22 | 23 | zip 24 | 25 | annotations-spec 26 | 27 | 28 | target/generated-docs 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/annotations-spec.adoc: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017, 2023 Contributors to the Eclipse Foundation 3 | // 4 | 5 | = Jakarta Annotations 6 | :pdf-theme: ../theme/jakartaee-theme.yml 7 | :authors: Jakarta Annotations Team, https://projects.eclipse.org/projects/ee4j.ca 8 | :email: https://dev.eclipse.org/mailman/listinfo/ca-dev 9 | :version-label!: 10 | :doctype: book 11 | :license: Eclipse Foundation Specification License v1.0 12 | :source-highlighter: coderay 13 | :toc: left 14 | :toclevels: 4 15 | :sectnumlevels: 4 16 | :sectanchors: 17 | ifdef::backend-pdf[] 18 | :pagenums: 19 | :numbered: 20 | :title-logo-image: image:images/jakarta_ee_logo_schooner_color_stacked_default.png[pdfwidth=4.25in,align=right] 21 | endif::[] 22 | 23 | // == License 24 | :sectnums!: 25 | include::license-efsl.adoc[] 26 | 27 | // == Scope 28 | :sectnums: 29 | include::scope.adoc[] 30 | 31 | // == Spec 32 | :sectnums: 33 | include::spec.adoc[] 34 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-10.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-3.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-4.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-5.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-6.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-7.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-8.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/annotations-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/annotations-9.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/images/jakarta_ee_logo_schooner_color_stacked_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/spec/src/main/asciidoc/images/jakarta_ee_logo_schooner_color_stacked_default.png -------------------------------------------------------------------------------- /spec/src/main/asciidoc/license-efsl.adoc: -------------------------------------------------------------------------------- 1 | [subs="normal"] 2 | .... 3 | Specification: {doctitle} 4 | 5 | Version: {revnumber} 6 | 7 | ifeval::["{revremark}" != ""] 8 | Status: {revremark} 9 | endif::[] 10 | ifeval::["{revremark}" == ""] 11 | Status: Final Release 12 | endif::[] 13 | 14 | Release: {revdate} 15 | .... 16 | Copyright (c) 2021, 2024 Eclipse Foundation. 17 | 18 | === Eclipse Foundation Specification License 19 | 20 | By using and/or copying this document, or the Eclipse Foundation 21 | document from which this statement is linked, you (the licensee) agree 22 | that you have read, understood, and will comply with the following 23 | terms and conditions: 24 | 25 | Permission to copy, and distribute the contents of this document, or 26 | the Eclipse Foundation document from which this statement is linked, in 27 | any medium for any purpose and without fee or royalty is hereby 28 | granted, provided that you include the following on ALL copies of the 29 | document, or portions thereof, that you use: 30 | 31 | * link or URL to the original Eclipse Foundation document. 32 | * All existing copyright notices, or if one does not exist, a notice 33 | (hypertext is preferred, but a textual representation is permitted) 34 | of the form: "Copyright (c) [$date-of-document] 35 | Eclipse Foundation, Inc. <>" 36 | 37 | Inclusion of the full text of this NOTICE must be provided. We 38 | request that authorship attribution be provided in any software, 39 | documents, or other items or products that you create pursuant to the 40 | implementation of the contents of this document, or any portion 41 | thereof. 42 | 43 | No right to create modifications or derivatives of Eclipse Foundation 44 | documents is granted pursuant to this license, except anyone may 45 | prepare and distribute derivative works and portions of this document 46 | in software that implements the specification, in supporting materials 47 | accompanying such software, and in documentation of such software, 48 | PROVIDED that all such works include the notice below. HOWEVER, the 49 | publication of derivative works of this document for use as a technical 50 | specification is expressly prohibited. 51 | 52 | The notice is: 53 | 54 | "Copyright (c) 2018 Eclipse Foundation. This software or 55 | document includes material copied from or derived from [title and URI 56 | of the Eclipse Foundation specification document]." 57 | 58 | ==== Disclaimers 59 | 60 | THIS DOCUMENT IS PROVIDED "AS IS," AND THE COPYRIGHT 61 | HOLDERS AND THE ECLIPSE FOUNDATION MAKE NO REPRESENTATIONS OR 62 | WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 63 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, 64 | NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE DOCUMENT ARE 65 | SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS 66 | WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR 67 | OTHER RIGHTS. 68 | 69 | THE COPYRIGHT HOLDERS AND THE ECLIPSE FOUNDATION WILL NOT BE LIABLE 70 | FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT 71 | OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE 72 | CONTENTS THEREOF. 73 | 74 | The name and trademarks of the copyright holders or the Eclipse 75 | Foundation may NOT be used in advertising or publicity pertaining to 76 | this document or its contents without specific, written prior 77 | permission. Title to copyright in this document will at all times 78 | remain with copyright holders. 79 | -------------------------------------------------------------------------------- /spec/src/main/asciidoc/scope.adoc: -------------------------------------------------------------------------------- 1 | == Specification Scope 2 | 3 | Jakarta Annotations defines a collection of annotations representing common semantic concepts that enable a declarative style of programming that applies across a variety of Java technologies. 4 | -------------------------------------------------------------------------------- /spec/src/main/theme/jakartaee-theme.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2017, 2023 Contributors to the Eclipse Foundation 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0, which is available at 6 | # http://www.eclipse.org/legal/epl-2.0. 7 | # 8 | # This Source Code may also be made available under the following Secondary 9 | # Licenses when the conditions for such availability set forth in the 10 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | # version 2 with the GNU Classpath Exception, which is available at 12 | # https://www.gnu.org/software/classpath/license.html. 13 | # 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | # 16 | 17 | extends: base 18 | page: 19 | margin: [30,50,30,50] 20 | size: Letter 21 | font: 22 | catalog: 23 | # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols 24 | Noto Serif: 25 | normal: GEM_FONTS_DIR/notoserif-regular-subset.ttf 26 | bold: GEM_FONTS_DIR/notoserif-bold-subset.ttf 27 | italic: GEM_FONTS_DIR/notoserif-italic-subset.ttf 28 | bold_italic: GEM_FONTS_DIR/notoserif-bold_italic-subset.ttf 29 | # M+ 1mn supports ASCII and the circled numbers used for conums 30 | M+ 1mn: 31 | normal: GEM_FONTS_DIR/mplus1mn-regular-subset.ttf 32 | bold: GEM_FONTS_DIR/mplus1mn-bold-subset.ttf 33 | italic: GEM_FONTS_DIR/mplus1mn-italic-subset.ttf 34 | bold_italic: GEM_FONTS_DIR/mplus1mn-bold_italic-subset.ttf 35 | # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols 36 | # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font 37 | M+ 1p Fallback: 38 | normal: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf 39 | bold: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf 40 | italic: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf 41 | bold_italic: GEM_FONTS_DIR/mplus1p-regular-fallback.ttf 42 | fallbacks: 43 | - M+ 1p Fallback 44 | base: 45 | font: 46 | color: #151e3d 47 | family: Noto Serif 48 | size: 9 49 | line-height-length: 11.5 50 | line-height: $base-line-height-length / $base-font-size 51 | prose: 52 | margin-bottom: 8 53 | image: 54 | width: 70% 55 | align: center 56 | codespan: 57 | font: 58 | size: 0.94em 59 | family: M+ 1mn 60 | color: #281e5d 61 | code: 62 | font: 63 | size: 0.94em 64 | color: #281e5d 65 | family: M+ 1mn 66 | border-width: 0 67 | padding: [4,4,4,20] 68 | # background-color: #f7f7f7 69 | sidebar: 70 | border-width: 0 71 | title: 72 | align: center 73 | admonition: 74 | label: 75 | vertical-align: top 76 | padding: [4, 8, 4, 8] 77 | column-rule: 78 | style: solid 79 | width: 1 80 | color: #f0f0f0 81 | icon: 82 | tip: 83 | stroke-color: #FFC300 84 | warning: 85 | stroke-color: #FF5733 86 | caution: 87 | stroke-color: #FF5733 88 | heading: 89 | font: 90 | color: #001861 91 | size: 11 92 | style: bold 93 | line-height: 1.2 94 | h2-font-size: $base-font-size * 1.3 95 | h3-font-size: $base-font-size * 1.2 96 | h4-font-size: $base-font-size * 1.1 97 | h5-font-size: $base-font-size * 1.0 98 | margin-bottom: $base-line-height-length 99 | link: 100 | font-color: #002FA7 101 | list: 102 | indent: $base-font-size * 1.5 103 | item-spacing: 2 104 | table: 105 | font-size: 0.94em 106 | caption: 107 | text-align: center 108 | side: top 109 | font-size: 0.94em 110 | grid: 111 | color: #f0f0f0 112 | style: solid 113 | width: 1 114 | border: 115 | width: 1 116 | color: #f0f0f0 117 | head: 118 | background-color: #f0f0f0 119 | cell: 120 | padding: 6 121 | footer: 122 | border-width: 0 123 | quote: 124 | font-style: italic 125 | font-color: #001861 126 | font-size: 1.1em 127 | # background-color: #f1f1f1 128 | border-color: #000000 129 | border-radius: 2 130 | border-style: dotted 131 | padding: [10,20,10,25] 132 | title_page: 133 | align: right 134 | logo: 135 | top: 10% 136 | title: 137 | top: 55% 138 | font_size: $heading-h1-font-size 139 | font_color: 999999 140 | line_height: 0.9 141 | subtitle: 142 | font_size: $heading-h3-font-size 143 | font_style: bold_italic 144 | line_height: 1 145 | authors: 146 | margin_top: $base-font-size * 1.25 147 | font_size: $base-font-size * 1.25 148 | font_color: 181818 149 | revision: 150 | margin_top: $base_font_size * 1.25 151 | -------------------------------------------------------------------------------- /tck/docs/CAJ2.1-ReleaseNotes.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/CAJ2.1-ReleaseNotes.html -------------------------------------------------------------------------------- /tck/docs/CAJ3.0-ReleaseNotes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Jakarta Annotations TCK, Version 2.1 Release Notes, December 2021 6 | 11 | 28 | 29 |
30 |

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

32 |
33 |

Kit Contents

34 |

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

36 |
    37 |
  • 38 |

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

    42 |
  • 43 |
44 |
45 |

Platform Notes

46 |

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

48 |

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

50 |
    51 |
  • Debian Linux 10
  • 52 |
53 |

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

55 |
    56 |
  • Jakarta Annotations for Java Compatible Implementation Version 3.0
  • 57 |
58 |
59 |

Installing, Setting Up, and Running the 60 | Jakarta Annotations TCK

61 |

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


65 |

66 |
Copyright (c) 2013, 2024 Oracle and/or its affiliates. All 67 | rights reserved.
68 | 69 |

70 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /tck/docs/LICENSE_EFTL.md: -------------------------------------------------------------------------------- 1 | # Eclipse Foundation Technology Compatibility Kit License - v 1.0 2 | 3 | Copyright (c) 2018, Eclipse Foundation, Inc. and its licensors. 4 | 5 | Redistribution and use in binary form is permitted provided that the 6 | following conditions are met: 7 | 8 | 1. Use of the Technology Compatibility Kit accompanying this license 9 | (the "TCK") and its documentation is permitted solely for the 10 | purpose of testing compatibility of an implementation (the 11 | "Product") of a specification (the "Specification") made available 12 | by the Eclipse Foundation, Inc. ("Eclipse"). 13 | 14 | 2. Only those modifications expressly permitted by the TCK and its 15 | documentation are permitted. Except in these limited circumstances, 16 | no modifications to the TCK are permitted under this license. 17 | 18 | 3. A Product will be deemed to be "compatible" with the Specification 19 | if it fully and completely meets and satisfies all requirements of 20 | the TCK. 21 | 22 | 4. Before any claim of compatibility (or any similar claim suggesting 23 | compatibility) is made based on the TCK, the testing party must: 24 | 25 | a. use the TCK to demonstrate that the Product fully and 26 | completely meets and satisfies all requirements of the TCK; 27 | 28 | b. make TCK test results showing full and complete satisfaction of 29 | all requirements of the TCK publicly available on the testing 30 | party's website and send a link to such test results to Eclipse 31 | at [tck@eclipse.org](mailto:tck@eclipse.org); and 32 | 33 | c. comply with any requirements stated in the Specification with 34 | regard to subsetting, supersetting, modifying or extending the 35 | Specification in any Product claimed to be compatible with the 36 | Specification. 37 | 38 | 5. The test results must be continuously available and the link must 39 | be live for at least as long as the Product is available in the 40 | marketplace. 41 | 42 | 6. The TCK may not be used as a basis for any statements of partial 43 | compatibility. The TCK may only be used as a basis for true, 44 | factual statements of full compatibility of Products that fully 45 | meet and satisfy all requirements of the TCK. 46 | 47 | 7. A determination that a Product is compatible with the TCK does not, 48 | in itself, give rise to the right to use any name, mark, logo 49 | associated with the TCK, Eclipse, or Eclipse's contributors or 50 | licensors. 51 | 52 | 8. Upon the request of Eclipse, a tester will retract any statements 53 | of compatibility (or any similar claim suggesting compatibility) 54 | which Eclipse reasonably determines to be false or misleading or in 55 | violation of the terms of this license. 56 | 57 | 9. Redistribution of the TCK must be under this Eclipse Foundation 58 | Technology Compatibility Kit License and must reproduce the above 59 | copyright notice, this list of conditions and the following 60 | disclaimer in the documentation and/or other materials provided 61 | with the distribution. 62 | 63 | 10. Neither the name, trademarks or logos of Eclipse, nor the names, 64 | trademarks or logos of its contributors or licensors may be used to 65 | endorse or promote products tested with this software without 66 | specific prior written permission. 67 | 68 | 11. The source code for the TCK accompanying this license is available 69 | from Eclipse. 70 | 71 | TO THE EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED ON 72 | AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER 73 | EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR 74 | CONDITIONS OF TITLE, NON- INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR 75 | A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY APPLICABLE LAW, 76 | NEITHER THE COPYRIGHT OWNER OR ANY CONTRIBUTORS SHALL HAVE ANY 77 | LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 78 | CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 79 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 80 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 81 | IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 82 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 83 | POSSIBILITY OF SUCH DAMAGES. 84 | -------------------------------------------------------------------------------- /tck/docs/TCK-Exclude-List.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0, which is available at 6 | # http://www.eclipse.org/legal/epl-2.0. 7 | # 8 | # This Source Code may also be made available under the following Secondary 9 | # Licenses when the conditions for such availability set forth in the 10 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | # version 2 with the GNU Classpath Exception, which is available at 12 | # https://www.gnu.org/software/classpath/license.html. 13 | # 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | # 16 | 17 | # This file lists the excluded tests from Jakarta Annotations TCK. 18 | # This is intended only for documentation purpose and is not used to exclude any tests. 19 | # No tests are excluded in this version 20 | -------------------------------------------------------------------------------- /tck/docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | Welcome to the Jakarta Annotations TCK, Version 2.0 11 | 24 | 25 |
26 |

Welcome to the Jakarta Annotations
27 | Technology Compatibility Kit, Version 3.0
28 | Your Starting Point

29 |
30 |
31 |

Guide to Jakarta Annotations TCK 3.0 Documentation

32 |

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

34 |
    35 |
  • The Jakarta Annotations 3.0 36 | TCK Release Notes provides the information on the test 37 | harness, the test suite and the platforms tested. 38 | 42 |
  • 43 |
  • The Jakarta Annotations TCK Users Guide provides the 44 | information that you need to install, set up, and run the Jakarta 45 | Annotations TCK, Version 3.0. In addition, the guide provides the rules 46 | you must comply with to pass the Jakarta Annotations TCK.
  • 47 |
48 |
49 |

50 |
Copyright (c) 2016, 2024 Oracle and/or its affiliates. All 51 | rights reserved.
52 | 53 |

54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /tck/docs/tck-runner/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 4.0.0 19 | 20 | 21 | org.eclipse.ee4j 22 | project 23 | 1.0.9 24 | 25 | 26 | jakarta.annotation 27 | jakarta.annotation-tck-impl 28 | 3.0.0 29 | jar 30 | 31 | 32 | 8.0.0-M1 33 | glassfish7 34 | 5.10.2 35 | jakarta-annotations-tck 36 | 3.0.0 37 | ${project.build.directory}/jdk-bundle 38 | 39 | 40 | 41 | 42 | 43 | org.junit 44 | junit-bom 45 | ${junit.jupiter.version} 46 | pom 47 | import 48 | 49 | 50 | jakarta.tck 51 | sigtest-maven-plugin 52 | 2.2 53 | 54 | 55 | jakarta.annotation 56 | ${tck.artifactId} 57 | ${tck.version} 58 | 59 | 60 | 61 | 62 | 63 | 64 | org.junit.jupiter 65 | junit-jupiter 66 | 67 | 68 | jakarta.annotation 69 | ${tck.artifactId} 70 | 71 | 72 | jakarta.tck 73 | sigtest-maven-plugin 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | org.apache.maven.plugins 82 | maven-dependency-plugin 83 | 3.3.0 84 | 85 | 86 | org.apache.maven.plugins 87 | maven-failsafe-plugin 88 | 3.2.5 89 | 90 | 91 | 92 | 93 | 94 | 95 | org.apache.maven.plugins 96 | maven-dependency-plugin 97 | 98 | 99 | unpack-server 100 | 101 | unpack 102 | 103 | pre-integration-test 104 | 105 | 106 | 107 | org.glassfish.main.distributions 108 | ${glassfish-artifact-id} 109 | ${glassfish.container.version} 110 | zip 111 | true 112 | ${project.build.directory} 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | org.apache.maven.plugins 122 | maven-failsafe-plugin 123 | 124 | 125 | sig-test 126 | 127 | integration-test 128 | verify 129 | 130 | 131 | jakarta.annotation:${tck.artifactId} 132 | 133 | ${jimage.dir} 134 | ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.annotation-api.jar:${jimage.dir}/java.base:${jimage.dir}/java.rmi:${jimage.dir}/java.sql:${jimage.dir}/java.naming 135 | true 136 | true 137 | true 138 | true 139 | true 140 | true 141 | true 142 | true 143 | true 144 | true 145 | true 146 | true 147 | true 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | full 159 | 160 | true 161 | 162 | 163 | glassfish 164 | 165 | 166 | 167 | web 168 | 169 | web 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /tck/docs/userguide/README.md: -------------------------------------------------------------------------------- 1 | # A JBake project template 2 | 3 | ## About JBake 4 | 5 | JBake is a static site generator, it's inspired from jekyll and written 6 | in java. The basic idea is to have templates for the structure of the 7 | page, and the body generated from asciidoc content. 8 | 9 | ## Pre requisites 10 | 11 | - Maven 12 | - JDK8+ 13 | 14 | Deploying to Github will require password less authentication. 15 | 16 | This is done by exporting your SSH public key into your Github account. 17 | 18 | ## Build the site locally 19 | 20 | The site is generated under target/staging. 21 | 22 | Open file:///PATH_TO_PROJECT_DIR/target/staging in a browser to view the site. 23 | 24 | ``` 25 | mvn generate-resources 26 | ``` 27 | 28 | Or you can invoke the JBake plugin directly. 29 | 30 | ``` 31 | mvn jbake:build 32 | ``` 33 | 34 | ### Rebuild the site on changes 35 | 36 | ``` 37 | mvn jbake:watch 38 | ``` 39 | 40 | If you keep this command running, changes to the sources will be 41 | detected and the site will be rendered incrementally. 42 | 43 | This is convenient when writing content. 44 | 45 | ### Serve the site locally 46 | 47 | ``` 48 | mvn jbake:serve 49 | ``` 50 | 51 | If a webserver is required (e.g. absolute path are used), this command 52 | will start a webserver (jetty) at http://localhost:8820. It will also 53 | watch for changes and rebuild incrementally. 54 | 55 | ## Deploy the site to Github Pages 56 | 57 | ``` 58 | mvn deploy 59 | ``` 60 | 61 | ## Produce a zip file for download 62 | 63 | To produce a zip file containing the generated html files, use: 64 | 65 | ``` 66 | mvn package 67 | ``` 68 | 69 | When making a release on GitHub, this zip file should be added to the release. 70 | 71 | ## Links 72 | 73 | - [JBake maven plugin documentation](https://github.com/Blazebit/jbake-maven-plugin) 74 | - [JBake documentation](http://jbake.org/docs/2.5.1) 75 | - [Freemarker documentation](http://freemarker.org/docs) 76 | - [AsciiDoc User Guide](http://asciidoc.org/userguide.html) 77 | - [Asciidoctor quick reference](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference) 78 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/assets/README.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | The {{site.title}} project contains the [AsciiDoc](http://asciidoc.org/) 4 | source code for the ... 5 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/assets/_config.yml: -------------------------------------------------------------------------------- 1 | remote_theme: jakartaee/jekyll-theme-jakarta-ee 2 | 3 | title: [tck_coa_v1_3] 4 | description: [Jakarta EE Technology Compatibility Kit User's Guide for Jakarta Annotations, Release 3.0] 5 | 6 | # sidebar links url 7 | links: 8 | source: https://github.com/jakartaee/common-annotations-api 9 | download: https://github.com/jakartaee/common-annotations-api/releases 10 | #mailinglist: https://javaee.groups.io/g/tck_coa_v1_3 11 | #javadocs: 12 | docs: https://jakarta.ee/specifications/annotations/3.0 13 | #faq: 14 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/README: -------------------------------------------------------------------------------- 1 | The file attributes.conf defines several attributes (variables) that 2 | need to be customized for each technology. 3 | 4 | The *.adoc files should not be modified. 5 | 6 | The following "include" files should be customized as necessary 7 | for the specific technology: 8 | 9 | - rules.inc 10 | 11 | Additional compatibility rules needed by some technologies. 12 | The rules in rules.adoc should NOT be changed. 13 | 14 | - defns.inc 15 | 16 | Additional definitions needed by additional compatibility 17 | rules in rules.inc. 18 | 19 | - config.inc 20 | 21 | Detailed instructions for configuring the TCK, included in 22 | Chapter 4. Unfortunately, these are sections 4.1 - 4.3, 23 | so even if the TCK doesn't require 3 sections you need to 24 | make up something, or else change the sections to "N/A". 25 | 26 | - packages.inc 27 | 28 | A simple list of Jakarta EE package names for the technology. 29 | 30 | - tck-packages.inc 31 | 32 | A list of additional software packages included in the TCK. 33 | 34 | - req-software.inc 35 | 36 | A list of software required in addition to the TCK and CI. 37 | 38 | - install-server.inc 39 | 40 | Steps to install the Jakarta EE CI, if needed. 41 | For standalone technologies, no server may be required, 42 | and this file can be empty. 43 | This is used in install.adoc in section 3.2. 44 | 45 | - install-server-vi.inc 46 | 47 | Steps to install a Vendor's web server, if needed. 48 | For standalone technologies, no web server may be required, 49 | and this file can be empty. 50 | This is used in install.adoc in section 3.2. 51 | 52 | - using-examples.inc 53 | 54 | Command line examples showing how to run the TCK. 55 | 56 | - using.inc 57 | 58 | Optional additional instructions for running the TCK. 59 | 60 | - debug-tips.inc 61 | 62 | Technology-specific troubleshooting tips for Chapter 6. 63 | If this isn't needed, it can be an empty file, but toc.adoc 64 | will need to be fixed. 65 | 66 | - rebuild.inc 67 | 68 | Special instructions for rebuilding the WAR files used by some TCKs. 69 | If needed, customize it appropriately and define the "rebuild" 70 | attribute in attributes.conf. 71 | 72 | - title.inc 73 | Add acronym references as required do distinguish between legacy and 74 | current APIs. 75 | 76 | Note that this template is NOT sufficient for the Jakarta EE platform 77 | or Jakarta EE Web Profile. 78 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/attributes.conf: -------------------------------------------------------------------------------- 1 | :TechnologyFullName: Jakarta Annotations 2 | :TechnologyShortName: Annotations 3 | :LegacyAcronym: CAJ 4 | :TechnologyVersion: 3.0 5 | :TechnologyRI: Jakarta Annotations 3.0 6 | :ReleaseDate: February 2024 7 | :CopyrightDates: 2018, 2024 8 | :TechnologyRIURL: https://projects.eclipse.org/projects/ee4j.ca 9 | :SpecificationURL: https://jakarta.ee/specifications/annotations/3.0/ 10 | :TCKInquiryList: mailto:ca-dev@eclipse.org[ca-dev@eclipse.org] 11 | :SpecificationInquiryList: mailto:ca-dev@eclipse.org[ca-dev@eclipse.org] 12 | :techID: Annotations 13 | // Define this attribute (uncomment it) if the TCK includes no API tests. (Rare.) 14 | // :no-api-tests: 15 | // Define this attribute (uncomment it) if the TCK includes end-to-end tests. 16 | // :end-to-end-tests: 17 | // Define this attribute (uncomment it) if subsets of the API are allowed. 18 | // (Common Annotations only) 19 | // :subset-allowed: 20 | // 21 | // The environment variable used to specify the home directory 22 | // for the technology. Used in config.inc. 23 | :TechnologyHomeEnv: CAJ_HOME 24 | // Java SE version required. 25 | :SEversion: 17+ 26 | :MavenVersion: 3.6.3+ 27 | :JakartaEEVersion: 11 28 | :JavaTestVersion: 5.0 29 | 30 | :excludeListFileName: TCK-Exclude-List.txt 31 | :TCKPackageName: jakarta-annotations-tck-x.y.z.zip 32 | // Directory names used in examples in using.adoc. 33 | :sigTestDirectoryExample: ee.jakarta.tck.annotations.signaturetest 34 | :singleTestDirectoryExample: ee.jakarta.tck.annotations.signaturetest 35 | :subsetTestDirectoryExample: ee.jakarta.tck.annotations.signaturetest 36 | // Define this attribute (uncomment it) if the TCK needs the rebuild appendix. 37 | // :rebuild: 38 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/config.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Setup and Configuration 4 | next=using.html 5 | prev=install.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | Setup and Configuration 9 | ======================= 10 | 11 | [[GBFVV]] 12 | 13 | 14 | 15 | [[setup-and-configuration]] 16 | 4 Setup and Configuration 17 | ------------------------- 18 | 19 | 20 | [NOTE] 21 | ==== 22 | The Jakarta EE Specification process provides for any number of compatible implementations. 23 | As additional implementations become available, refer to project or product documentation from 24 | those vendors for specific TCK setup and operational guidance. 25 | 26 | ==== 27 | 28 | This chapter describes how to set up the {TechnologyShortName} TCK. 29 | Before proceeding with the instructions in 30 | this chapter, be sure to install all required software, as described in 31 | link:install.html#GBFTP[Chapter 3, "Installation."] 32 | 33 | After completing the instructions in this chapter, proceed to 34 | link:using.html#GBFWO[Chapter 5, "Executing Tests,"] for instructions on 35 | running the {TechnologyShortName} TCK. 36 | 37 | [NOTE] 38 | ==== 39 | The {TechnologyShortName} TCK is not depended on any particular build 40 | tool to run the tests. It will be convenient and advisable to create a 41 | Apache Maven project to setup and run the TCK. 42 | This chapter will henceforth use instructions and steps to provide setup 43 | with Apache Maven as a build tool. 44 | ==== 45 | 46 | include::config.inc[] 47 | 48 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/config.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | The following sections should be customized for the technology. 4 | This text was originally from the JAX-RS TCK. Most references 5 | to JAX-RS have been parameterized to serve as a simple starting 6 | point for customization. There are still many details that will 7 | need to be changed or removed. The major sections 4.1, 4.2, and 8 | 4.3 should be preserved. If their titles are changed, the links 9 | at the top of config.adoc will need to be changed as well as well 10 | as toc.adoc. 11 | /////////////////////////////////////////////////////////////////////// 12 | 13 | [[GBFVU]][[configuring-your-environment-to-run-the-tck-against-the-reference-implementation]] 14 | 15 | 4.1 Configuring Your Environment to Run the TCK Against a Compatible Implementation 16 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 17 | 18 | After configuring your environment as described in this section, 19 | continue with the instructions in link:using.html#GBFWO[Chapter 5, "Executing Tests."] 20 | 21 | 22 | [NOTE] 23 | ======================================================================= 24 | 25 | In these instructions, variables in angle brackets need to be expanded 26 | for each platform. For example, `` becomes `$JAVA_HOME` on 27 | Solaris/Linux and `%JAVA_HOME%` on Windows. In addition, the forward 28 | slashes (`/`) used in all of the examples need to be replaced with 29 | backslashes (`\`) for Windows. Finally, be sure to use the appropriate 30 | separator for your operating system when specifying multiple path 31 | entries (`;` on Windows, `:` on UNIX/Linux). 32 | 33 | On Windows, you must escape any backslashes with an extra backslash in 34 | path separators used in any of the following properties, or use forward 35 | slashes as a path separator instead. 36 | 37 | ======================================================================= 38 | 39 | 40 | 1. Set the following environment variables in your shell environment: 41 | a. `JAVA_HOME` to the directory in which Java SE {SEversion} is installed 42 | b. `M2_HOME` to the directory in which the Apache Maven build tool is installed. 43 | c. `PATH` to include the following directories: `JAVA_HOME/bin`, 44 | and `M2_HOME/bin` 45 | 2. Set the following System properties: 46 | a. Set the `sigTestClassPath` 47 | property to point to a Jakarta Annotations CI classes/jars that contain the 48 | annotations being supported in Step link:#BABJHHAJ[c], below. 49 | b. Set the `jimage.dir` property to the location where JDK modules will be extracted. 50 | c. [[BABJHHAJ]] Depending on the annotations that are supported or unsupported in your 51 | Jakarta Annotations implementation, the following properties 52 | should be set to `true` or `false` respectively. + 53 | By default, all of these annotations are supported in the Jakarta Annotations CI. + 54 | [source,oac_no_warn] 55 | ---- 56 | #jakarta.annotation.Generated 57 | ca.sig.generated=true 58 | 59 | #jakarta.annotation.PostConstruct 60 | ca.sig.postconstruct=true 61 | 62 | #jakarta.annotation.PreDestroy 63 | ca.sig.predestroy=true 64 | 65 | #jakarta.annotation.Priorityca.sig.priority=true 66 | 67 | #jakarta.annotation.Resource 68 | ca.sig.resource=true 69 | 70 | #jakarta.annotation.Resources 71 | ca.sig.resources=true 72 | 73 | #jakarta.annotation.security.DeclareRoles 74 | ca.sig.securitydeclareroles=true 75 | 76 | #jakarta.annotation.security.DenyAll 77 | ca.sig.securitydenyall=true 78 | 79 | #jakarta.annotation.security.PermitAll 80 | ca.sig.securitypermitall=true 81 | 82 | #jakarta.annotation.security.RolesAllowed 83 | ca.sig.securityrolesallowed=true 84 | 85 | #jakarta.annotation.security.RunAs 86 | ca.sig.securityrunas=true 87 | 88 | #jakarta.annotation.sql.DataSourceDefinition 89 | ca.sig.sqldatasourcedefinition=true 90 | 91 | #jakarta.annotation.sql.DataSourceDefinitions 92 | ca.sig.sqldatasourcedefinitions=true 93 | ---- 94 | 3. Set the below jars to the classpath 95 | a. JAR file for the {TechnologyShortName} {TechnologyVersion} API. + 96 | eg. `${web.home}/modules/jakarta.annotations-api.jar`. 97 | b. JUnit 5 jars (5.10.2+) 98 | Maven cordinates : 99 | + 100 | [source,oac_no_warn] 101 | ---- 102 | 103 | org.junit 104 | junit-bom 105 | 5.10.2 106 | pom 107 | import 108 | 109 | ---- 110 | + 111 | c. sigtest-maven-plugin (2.2) to run the signature tests. 112 | Maven cordinates : 113 | + 114 | [source,oac_no_warn] 115 | ---- 116 | 117 | jakarta.tck 118 | sigtest-maven-plugin 119 | 2.2 120 | 121 | ---- 122 | 123 | [[GCLHU]][[configuring-your-environment-to-repackage-and-run-the-tck-against-the-vendor-implementation]] 124 | 125 | 4.2 Configuring Your Environment to Repackage and Run the TCK Against the Vendor Implementation 126 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 127 | 128 | This is not required for the Jakarta Annotations TCK. 129 | 130 | [[GHGDG]][[publishing-the-test-applications]] 131 | 132 | 4.3 Publishing the Test Applications 133 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 134 | 135 | This is not required for the Jakarta Annotations TCK. 136 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/debug-tips.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | The following sections should be customized for the technology. 4 | This text was originally from the JACC TCK. Some references 5 | to JACC have been parameterized to serve as a simple starting 6 | point for customization. There are still many details that will 7 | need to be changed or removed. 8 | /////////////////////////////////////////////////////////////////////// 9 | 10 | [[GBFHA]][[troubleshooting-tips]] 11 | 12 | 6.7 Troubleshooting Tips 13 | ~~~~~~~~~~~~~~~~~~~~~~~~ 14 | 15 | None for the Jakarta Annotations TCK. 16 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/debug.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Debugging Test Problems 4 | next=faq.html 5 | prev=using.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | Debugging Test Problems 9 | ======================= 10 | 11 | [[GBFUV]] 12 | 13 | 14 | [[debugging-test-problems]] 15 | 6 Debugging Test Problems 16 | ------------------------- 17 | 18 | There are a number of reasons that tests can fail to execute properly. 19 | This chapter provides some approaches for dealing with these failures. 20 | 21 | 22 | This chapter includes the following topics: 23 | 24 | * link:#GBFYP[Overview] 25 | * link:#GBFVP[Test Information] 26 | * link:#GBFYF[Configuration Failures] 27 | 28 | [[GBFYP]][[overview]] 29 | 30 | 6.1 Overview 31 | ~~~~~~~~~~~~ 32 | 33 | The goal of a test run is for all tests in the test suite that are not 34 | filtered out to have passing results. If the root test suite folder 35 | contains tests with errors or failing results, you must troubleshoot and 36 | correct the cause to satisfactorily complete the test run. 37 | 38 | * Errors: Tests with errors could not be executed by the JUnit 39 | framework. These errors usually occur because the test environment is not 40 | properly configured. 41 | * Failures: Tests that fail were executed but had failing results. 42 | 43 | 44 | For every test run, the JUnit framework creates a set of report files 45 | in the target directory. 46 | 47 | 48 | If a large number of tests failed, you should read 49 | link:#GBFYF[Configuration Failures] to see if a 50 | configuration issue is the cause of the failures. 51 | 52 | 53 | 54 | [[GBFVP]][[test-information]] 55 | 56 | 6.2 Test Information 57 | ~~~~~~~~~~~~~~~~~~~~ 58 | 59 | If you need more information to identify the cause of the error or 60 | failure, use the JUnit reports generated after running the tests. 61 | 62 | 63 | [[GBFYF]][[configuration-failures]] 64 | 65 | 6.3 Configuration Failures 66 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 67 | 68 | Configuration failures are easily recognized because many tests fail the 69 | same way. When all your tests begin to fail, you may want to stop the 70 | run immediately and start viewing individual test output. 71 | 72 | include::debug-tips.inc[] 73 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/defns.inc: -------------------------------------------------------------------------------- 1 | // NOTE TO WRITERS: 2 | // Most technologies will only need the compatibility rules in rules.adoc. 3 | // Some technologies will need additional definitions to go with additional 4 | // rules. If they're needed, remove the comment characters below 5 | // and update the definitions as appropriate. 6 | // 7 | // The first block below is additional definitions needed by 8 | // Jakarta XML Web Services. 9 | // 10 | // The second block below is additional defintions needed by 11 | // Jakarta Server Pages. 12 | // 13 | // NOTE: This set of examples is NOT complete, but should be. 14 | // 15 | // 16 | // Jakarta XML Web Services 17 | // 18 | // |Development Kit |A software product that implements or incorporates a 19 | // Compiler, a Schema Compiler, a Schema Generator, a Java-to-WSDL Tool, a 20 | // WSDL-to-Java Tool, and/or an RMI Compiler. 21 | // 22 | // |Java-to-WSDL Output |Output of a Java-to-WSDL Tool that is required for 23 | // Web service deployment and invocation. 24 | // 25 | // |Java-to-WSDL Tool |A software development tool that implements or 26 | // incorporates a function that generates web service endpoint descriptions 27 | // in WSDL and XML schema format from Source Code as specified by the 28 | // Jakarta XML Web Services Specification. 29 | // 30 | // |WSDL-to-Java Output |Output of a WSDL-to-Java tool that is required for 31 | // Web service deployment and invocation. 32 | // 33 | // |WSDL-to-Java Tool |A software development tool that implements or 34 | // incorporates a function that generates web service interfaces for 35 | // clients and endpoints from a WSDL description as specified by the 36 | // Jakarta XML Web Services Specification. 37 | // 38 | // 39 | // Jakarta Server Pages 40 | // 41 | // |Jakarta Server Page |A text-based document that uses Jakarta Server 42 | // Pages technology. 43 | // 44 | // |Jakarta Server Page Implementation Class |A program constructed by 45 | // transforming the Jakarta Server Page text into a Java language program 46 | // using the transformation rules described in the Specifications. 47 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/faq.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Appendix A: Frequently Asked Questions 4 | next=rebuild.html 5 | prev=debug.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | Appendix A: Frequently Asked Questions 9 | ====================================== 10 | 11 | [[GBFYD]] 12 | 13 | 14 | [[a-frequently-asked-questions]] 15 | A Frequently Asked Questions 16 | ---------------------------- 17 | 18 | This appendix contains the following questions. 19 | 20 | * link:#GBFYQ[Where do I start to debug a test failure?] 21 | * link:#GBFYR[How do I restart a crashed test run?] 22 | * link:#GBFWU[What would cause tests be added to the exclude list?] 23 | 24 | [[GBFYQ]][[a.1-where-do-i-start-to-debug-a-test-failure]] 25 | 26 | A.1 Where do I start to debug a test failure? 27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 | 29 | See link:debug.html#GBFUV[Chapter 6, "Debugging Test Problems,"] for more 30 | information. 31 | 32 | [[GBFYR]][[a.2-how-do-i-restart-a-crashed-test-run]] 33 | 34 | A.2 How do I restart a crashed test run? 35 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 | 37 | If you need to restart a test run, you can figure out which test crashed 38 | the test suite by looking at the logs. 39 | 40 | [[GBFWU]][[a.3-what-would-cause-tests-be-added-to-the-exclude-list]] 41 | 42 | A.3 What would cause tests be added to the exclude list? 43 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 44 | 45 | The exclude file (+{excludeListFileName}+) contains all tests that are not 46 | required to be run. The file is used only for documentation purpose. The tests are excluded using 47 | @Disabled tag in JUnit when necessary. The following is a list of reasons for a test to be 48 | included in the Exclude List: 49 | 50 | * An error in a Compatible Implementation that does not allow the test to 51 | execute properly has been discovered. 52 | * An error in the specification that was used as the basis of the test 53 | has been discovered. 54 | * An error in the test has been discovered. 55 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/install-server-vi.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/userguide/src/main/jbake/content/install-server-vi.inc -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/install-server.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/userguide/src/main/jbake/content/install-server.inc -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/install.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Installation 4 | next=config.html 5 | prev=rules.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | Installation 9 | ============ 10 | 11 | [[GBFTP]] 12 | 13 | 14 | [[installation]] 15 | 3 Installation 16 | -------------- 17 | 18 | This chapter explains how to install the {TechnologyFullName} TCK software. 19 | 20 | After installing the software according to the instructions in this 21 | chapter, proceed to link:config.html#GBFVV[Chapter 4, "Setup and 22 | Configuration,"] for instructions on configuring your test environment. 23 | 24 | [[GBFUD]][[obtaining-the-reference-implementation]] 25 | 26 | 3.1 Obtaining a Compatible Implementation 27 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 28 | 29 | Each compatible implementation (CI) will provide instructions for obtaining 30 | their implementation. 31 | {TechnologyRI} is a compatible implementation which may be obtained 32 | from {TechnologyRIURL} 33 | 34 | [[GBFTS]][[installing-the-software]] 35 | 36 | 3.2 Installing the Software 37 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 | 39 | Before you can run the {TechnologyShortName} TCK tests, you must 40 | install and set up the following software components: 41 | 42 | include::req-software.inc[] 43 | * Java SE {SEversion} 44 | * A CI for {TechnologyShortName} {TechnologyVersion}, one example is {TechnologyRI} 45 | * {TechnologyShortName} TCK version {TechnologyVersion} 46 | * The {TechnologyShortName} {TechnologyVersion} Vendor Implementation (VI) 47 | * Any Jupiter API compatible test runner (eg. Apache Maven {MavenVersion}) 48 | 49 | Follow these steps: 50 | 51 | . Install the Java SE {SEversion} software, if it is not already installed. + 52 | Download and install the Java SE {SEversion} software from 53 | http://www.oracle.com/technetwork/java/javase/downloads/index.html. 54 | Refer to the installation instructions that accompany the software for 55 | additional information. 56 | 57 | . Install the build tool that will be used to run the TCK, if it is not already installed. + 58 | It will be convenient to use Apache Maven {MavenVersion} for running the tests. The test kit 59 | is not depended on Maven, any build tool compatible with Jupiter API is suffitient. 60 | 61 | . Install the {TechnologyShortName} TCK {TechnologyVersion} software. 62 | a. Copy or download the {TechnologyShortName} TCK software to your 63 | local system. + 64 | You can obtain the {TechnologyShortName} TCK software from the 65 | Jakarta EE site {SpecificationURL}. 66 | b. Use the `unzip` command to extract the bundle in the directory of 67 | your choice: + 68 | +unzip {TCKPackageName}+ + 69 | 70 | include::install-server.inc[] 71 | . Install a {TechnologyShortName} {TechnologyVersion} Compatible 72 | Implementation. + 73 | A Compatible Implementation is used to validate your initial 74 | configuration and setup of the {TechnologyShortName} TCK 75 | {TechnologyVersion} tests, which are explained further in 76 | link:config.html#GBFVV[Chapter 4, "Setup and Configuration."] + 77 | The Compatible Implementations for {TechnologyShortName} are listed on 78 | the Jakarta EE Specifications web site: {SpecificationURL}. 79 | include::install-server-vi.inc[] 80 | . Install the {TechnologyShortName} VI to be tested. + 81 | Follow the installation instructions for the particular VI under test. 82 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/intro.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/userguide/src/main/jbake/content/intro.inc -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/packages.inc: -------------------------------------------------------------------------------- 1 | ** `jakarta.annotation` 2 | 3 | ** `jakarta.annotation.security` 4 | 5 | ** `jakarta.annotation.sql` 6 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/platforms.inc: -------------------------------------------------------------------------------- 1 | * Debian GNU/Linux 10 -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/preface.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Preface 4 | next=intro.html 5 | prev=title.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | Preface 9 | ======= 10 | 11 | [[TCJRS00001]][[GBFTI]] 12 | 13 | 14 | [[preface]] 15 | Preface 16 | ------- 17 | 18 | This guide describes how to install, configure, and run the Technology 19 | Compatibility Kit (TCK) that is used to test the {TechnologyFullName} 20 | ({TechnologyShortName} {TechnologyVersion}) technology. 21 | 22 | The {TechnologyShortName} TCK is a portable, configurable automated 23 | test suite for verifying the compatibility of a vendor's 24 | implementation of the {TechnologyShortName} {TechnologyVersion} 25 | Specification (hereafter referred to as the vendor implementation or VI). 26 | The {TechnologyShortName} TCK uses the JUnit framework to run the test suite. 27 | 28 | 29 | [NOTE] 30 | ======================================================================= 31 | 32 | Note All references to specific Web URLs are given for the sake of your 33 | convenience in locating the resources quickly. These references are 34 | always subject to changes that are in many cases beyond the control of 35 | the authors of this guide. 36 | 37 | ======================================================================= 38 | 39 | Jakarta EE is a community sponsored and community run program. 40 | Organizations contribute, along side individual contributors who use, evolve 41 | and assist others. 42 | Commercial support is not available through the Eclipse Foundation resources. 43 | Please refer to the Eclipse EE4J project site 44 | (https://projects.eclipse.org/projects/ee4j). 45 | There, you will find additional details as well as a list of all the associated sub-projects 46 | (Implementations and APIs), that make up Jakarta EE and define these specifications. 47 | If you have questions about this Specification you may 48 | send inquiries to {SpecificationInquiryList}. 49 | If you have questions about this TCK, you may send inquiries to 50 | {TCKInquiryList}. 51 | 52 | [[TCJRS00034]][[GBFUS]] 53 | 54 | 55 | [[who-should-use-this-book]] 56 | Who Should Use This Book 57 | ~~~~~~~~~~~~~~~~~~~~~~~~ 58 | 59 | This guide is for vendors that implement the {TechnologyShortName} 60 | {TechnologyVersion} technology to assist them in running the test suite 61 | that verifies compatibility of their implementation of the 62 | {TechnologyShortName} {TechnologyVersion} Specification. 63 | 64 | 65 | [[TCJRS00035]][[GBFPO]] 66 | 67 | 68 | [[before-you-read-this-book]] 69 | Before You Read This Book 70 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 71 | 72 | You should be familiar with the {TechnologyShortName} 73 | {TechnologyVersion}, version {TechnologyVersion} Specification, 74 | which can be found at {SpecificationURL}. 75 | 76 | 77 | [[TCJRS00036]][[GBFWF]] 78 | 79 | 80 | [[typographic-conventions]] 81 | Typographic Conventions 82 | ~~~~~~~~~~~~~~~~~~~~~~~ 83 | 84 | The following table describes the typographic conventions that are used 85 | in this book. 86 | 87 | [width="100%",cols="15%,40%,45%",options="header",] 88 | |======================================================================= 89 | |Convention |Meaning |Example 90 | |*Boldface* |Boldface type indicates graphical user interface elements 91 | associated with an action, terms defined in text, or what you type, 92 | contrasted with onscreen computer output. a| 93 | From the *File* menu, select *Open Project*. 94 | 95 | A *cache* is a copy that is stored locally. 96 | 97 | `machine_name% *su*` + 98 | `Password:` 99 | 100 | |`Monospace` |Monospace type indicates the names of files and 101 | directories, commands within a paragraph, URLs, code in examples, text 102 | that appears on the screen, or text that you enter. a| 103 | Edit your `.login` file. 104 | 105 | Use `ls` `-a` to list all files. 106 | 107 | `machine_name% you have mail.` 108 | 109 | |_Italic_ |Italic type indicates book titles, emphasis, or placeholder 110 | variables for which you supply particular values. a| 111 | Read Chapter 6 in the _User's Guide_. 112 | 113 | Do _not_ save the file. 114 | 115 | The command to remove a file is `rm` _filename_. 116 | 117 | |======================================================================= 118 | 119 | 120 | [[TCJRS00037]][[FWBSD]] 121 | 122 | 123 | [[shell-prompts-in-command-examples]] 124 | Shell Prompts in Command Examples 125 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 126 | 127 | The following table shows the default UNIX system prompt and superuser 128 | prompt for the C shell, Bourne shell, and Korn shell. 129 | 130 | [width="100%",cols="50%,50%",options="header",] 131 | |===================================================== 132 | |Shell |Prompt 133 | |C shell |`machine_name%` 134 | |C shell for superuser |`machine_name#` 135 | |Bourne shell and Korn shell |`$` + 136 | |Bourne shell and Korn shell for superuser |`#` + 137 | |Bash shell |`shell_name-shell_version$` 138 | |Bash shell for superuser |`shell_name-shell_version#` 139 | |===================================================== 140 | 141 | 142 | 143 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/rebuild.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Appendix B: Rebuild Rules 4 | prev=faq.html 5 | ~~~~~~ 6 | include::attributes.conf[] 7 | 8 | Appendix B: Rebuild Rules 9 | ========================= 10 | 11 | 12 | ifdef::rebuild[] 13 | include::rebuild.inc[] 14 | endif::rebuild[] 15 | ifndef::rebuild[] 16 | 17 | <<< 18 | Appendix B is not used for the {TechnologyShortName} TCK. 19 | 20 | endif::rebuild[] 21 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/rebuild.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | The following sections should be customized for the technology. 4 | This is not required for Jakarta Annotations 5 | /////////////////////////////////////////////////////////////////////// 6 | 7 | [[GCLIZ]] 8 | 9 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/req-software.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | This is a list of software required in addition to the TCK and the RI. 4 | For many Java EE APIs, the Java EE RI will be required, as described below. 5 | For standalone technologies, no other software may be required, and the 6 | below line can be removed. 7 | 8 | This is used in intro.adoc in section 1.3 and install.adoc in section 3.2. 9 | /////////////////////////////////////////////////////////////////////// 10 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/rules.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | Most technologies will only need the compatibility rules in rules.adoc. 4 | Some technologies will need additional rules. If they're needed, 5 | remove the comment block delimiters below and update the rules as 6 | appropriate. You may need to adjust the rule numbers to avoid gaps. 7 | 8 | The first comment block below is additional rules needed by JPA. 9 | 10 | The second comment block below is additional rules needed by 11 | JSP and Servlet. (And EJB, if it had a standalone TCK.) 12 | 13 | The third comment block below is additional rules that apply 14 | to any technology that defines deployment descriptors. 15 | 16 | The fourth comment block is special rules that apply only to JSP. 17 | 18 | NOTE: This set of examples is NOT complete, but should be. 19 | /////////////////////////////////////////////////////////////////////// 20 | 21 | /////////////////////////////////////////////////////////////////////// 22 | *{techID}10* The Runtime must report an error when processing a 23 | Configuration Descriptor that does not conform to the Specifications. 24 | 25 | *{techID}11* An error must be reported when processing a configuration 26 | descriptor that includes a Java Persistence QL expression that does not 27 | conform to the Specifications. 28 | 29 | *{techID}12* The presence of an XML comment in a Configuration 30 | Descriptor, when processed by the Runtime, must not cause the 31 | functional programmatic behavior of the Runtime to vary from the 32 | functional programmatic behavior of the Runtime in the absence of that 33 | comment. 34 | /////////////////////////////////////////////////////////////////////// 35 | 36 | /////////////////////////////////////////////////////////////////////// 37 | *{techID}10* Each Container must make technically accessible all Java SE 38 | Runtime interfaces and functionality, as defined by the Specifications, 39 | to programs running in the Container, except only as specifically 40 | exempted by these Rules. 41 | 42 | *{techID}10.1* Containers may impose security constraints, as defined by 43 | the Specifications. 44 | /////////////////////////////////////////////////////////////////////// 45 | 46 | /////////////////////////////////////////////////////////////////////// 47 | *{techID}11* A Deployment Tool must report an error when processing a 48 | Configuration Descriptor that does not conform to the Specifications. 49 | 50 | *{techID}12* The presence of an XML comment in a Configuration 51 | Descriptor, when processed by a Deployment Tool, must not cause the 52 | functional programmatic behavior of the Deployment Tool to vary from 53 | the functional programmatic behavior of the Deployment Tool in the 54 | absence of that comment. 55 | /////////////////////////////////////////////////////////////////////// 56 | 57 | /////////////////////////////////////////////////////////////////////// 58 | *{techID}11* A web Container must report an error, as defined by the 59 | Specifications, when processing a JSP Page that does not conform to the 60 | Specifications. 61 | 62 | *{techID}12* The presence of a Java language comment or Java language 63 | directive in a JSP Page that specifies ”java” as the scripting 64 | language, when processed by a web Container, must not cause the 65 | functional programmatic behavior of that JSP Page to vary from the 66 | functional programmatic behavior of that JSP Page in the absence of 67 | that Java language comment or Java language directive. 68 | 69 | *{techID}13* The contents of any fixed template data (defined by the 70 | Specifications) in a JSP Page, when processed by a web Container, must 71 | not affect the functional programmatic behavior of that JSP Page, 72 | except as defined by the Specifications. 73 | 74 | *{techID}14* The functional programmatic behavior of a JSP Page that 75 | specifies ”java” as the scripting language must be equivalent to the 76 | functional programmatic behavior of the JSP Page Implementation Class 77 | constructed from that JSP Page. 78 | /////////////////////////////////////////////////////////////////////// 79 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/tck-packages.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/userguide/src/main/jbake/content/tck-packages.inc -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/title.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=TCK User's Guide for Technology Implementors 4 | next=preface.html 5 | prev=toc.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | 9 | TCK User's Guide for {TechnologyFullName}, Release {TechnologyVersion} for Jakarta EE 10 | ===================================================================================== 11 | 12 | [[eclipse-foundation]] 13 | Eclipse Foundation 14 | ------------------ 15 | 16 | Technology Compatibility Kit User's Guide for {TechnologyFullName} 17 | 18 | Release {TechnologyVersion} for Jakarta EE 19 | 20 | {ReleaseDate} 21 | 22 | [[sthref1]] 23 | 24 | ''''' 25 | 26 | Technology Compatibility Kit User's Guide for {TechnologyFullName}, 27 | Release {TechnologyVersion} for Jakarta EE 28 | 29 | Copyright © {CopyrightDates} Oracle and/or its affiliates. All rights reserved. 30 | 31 | This program and the accompanying materials are made available under 32 | the terms of the Eclipse Public License v. 2.0, which is available at 33 | http://www.eclipse.org/legal/epl-2.0. 34 | 35 | SPDX-License-Identifier: EPL-2.0 36 | 37 | Oracle and Java are registered trademarks of Oracle and/or its 38 | affiliates. Other names may be trademarks of their respective owners. 39 | 40 | include::title.inc[] 41 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/title.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | This is included at the tail end of the Title page. 4 | The following section should be customized for the technology. 5 | This is provided to allow each technology to customize legacy acronym names 6 | that are used in this TCK. 7 | Be sure to customize LegacyAcronym in attributes.conf 8 | Add additional lines as needed for acronyms found in your TCK user guide. 9 | /////////////////////////////////////////////////////////////////////// 10 | 11 | References in this document to {LegacyAcronym} refer to the {TechnologyFullName} unless otherwise noted. 12 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/using-examples.inc: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////// 2 | NOTE TO WRITERS: 3 | These CLI examples can be customized as necessary. 4 | /////////////////////////////////////////////////////////////////////// 5 | 6 | Start the JUnit tests using the following command: 7 | 8 | -- 9 | [source,oac_no_warn] 10 | ---- 11 | mvn verify 12 | ---- 13 | -- 14 | 15 | [[GCMCU]] 16 | 17 | Example 5-1 {TechnologyShortName} TCK Signature Tests 18 | 19 | To run the {TechnologyShortName} TCK signature tests, enter the 20 | following commands: 21 | 22 | [source,subs="attributes"] 23 | ---- 24 | mvn verify -Dit.test=ee.jakarta.tck.annotations.signaturetest.** 25 | ---- 26 | 27 | [[GCMBV]] 28 | 29 | 30 | Example 5-2 Single Test Directory 31 | 32 | To run a single test directory, enter the following commands: 33 | 34 | [source,subs="attributes"] 35 | ---- 36 | mvn verify -Dit.test={singleTestDirectoryExample}.** 37 | ---- 38 | 39 | [[GCMCA]] 40 | 41 | 42 | Example 5-3 Subset of Test Directories 43 | 44 | To run a subset of test directories, enter the following commands: 45 | 46 | [source,subs="attributes"] 47 | ---- 48 | mvn verify -Dit.test={subsetTestDirectoryExample}.** 49 | ---- 50 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/using.adoc: -------------------------------------------------------------------------------- 1 | type=page 2 | status=published 3 | title=Executing Tests 4 | next=debug.html 5 | prev=config.html 6 | ~~~~~~ 7 | include::attributes.conf[] 8 | Executing Tests 9 | =============== 10 | 11 | [[GBFWO]] 12 | 13 | 14 | [[executing-tests]] 15 | 5 Executing Tests 16 | ----------------- 17 | 18 | The {TechnologyShortName} TCK uses the JUnit framework 19 | to execute the tests. 20 | 21 | This chapter includes the following topics: 22 | 23 | * link:#GBFUZ[Starting the tests] 24 | * link:#GBFWM[Running a Subset of the Tests] 25 | * link:#GCLRR[Running the TCK Against your selected CI] 26 | * link:#GCLRZ[Running the TCK Against a Vendor's Implementation] 27 | * link:#GBFVK[Test Reports] 28 | 29 | 30 | [NOTE] 31 | ======================================================================= 32 | 33 | The instructions in this chapter assume that you have installed and 34 | configured your test environment as described in 35 | link:install.html#GBFTP[Chapter 3, "Installation,"] and 36 | link:config.html#GBFVV[Chapter 4, "Setup and Configuration,"], 37 | respectively. 38 | 39 | ======================================================================= 40 | 41 | ifdef::rebuild[] 42 | As explained in link:rebuild.html#GCLIZ[Appendix B, "Packaging the 43 | Test Applications in Servlet-Compliant WAR 44 | Files With VI-Specific Information,"] the {TechnologyShortName} TCK 45 | introduces the concept of repackaging the TCK tests. 46 | endif::rebuild[] 47 | 48 | [NOTE] 49 | ======================================================================= 50 | 51 | The Jakarta REST TCK is not depended on any particular build tool to 52 | run the tests. It will be convenient and advisable to create a 53 | Apache Maven project to setup and run the TCK. This chapter will 54 | henceforth use instructions and steps to provide setup with Apache 55 | Maven as a build tool. 56 | 57 | ======================================================================= 58 | 59 | 60 | 61 | [[GBFUZ]][[starting-javatest]] 62 | 63 | 5.1 Starting the tests 64 | ~~~~~~~~~~~~~~~~~~~~~~ 65 | 66 | The {TechnologyShortName} TCK can be run from the command line 67 | in your shell environment by executing the TCK jar. 68 | 69 | 70 | [NOTE] 71 | ======================================================================= 72 | 73 | The `mvn` command referenced in the following 74 | two procedures and elsewhere in this guide is the Apache Maven 75 | build tool, which will need to be downloaded separately. 76 | 77 | ======================================================================= 78 | 79 | 80 | 81 | 82 | [[GBFVW]][[to-start-javatest-in-command-line-mode]] 83 | 84 | 5.1.1 To Start Tests in Command-Line Mode 85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 86 | 87 | include::using-examples.inc[] 88 | 89 | [[GBFWM]][[running-a-subset-of-the-tests]] 90 | 91 | 5.2 Running a Subset of the Tests 92 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 93 | 94 | Use the following modes to run a subset of the tests: 95 | 96 | * link:#GBFWK[Section 5.2.1, "To Run a Subset of Tests in Command-Line Mode"] 97 | 98 | 99 | [[GBFWK]][[to-run-a-subset-of-tests-in-command-line-mode]] 100 | 101 | 5.2.1 To Run a Subset of Tests in Command-Line Mode 102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 103 | 104 | Start the test run by executing the following command: + 105 | 106 | [source,subs="attributes"] 107 | ---- 108 | mvn verify -Dit.test={subsetTestDirectoryExample}.** 109 | ---- 110 | 111 | The tests in the directory and its subdirectories are run. 112 | 113 | 114 | [[GCLRR]][[running-the-tck-against-the-ri]] 115 | 116 | 5.3 Running the TCK Against another CI 117 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 118 | 119 | Some test scenarios are designed to ensure that the configuration and deployment of 120 | all the prebuilt {TechnologyShortName} TCK tests against one Compatible 121 | Implementation are successful operating with other compatible implementations, and that the TCK is ready for 122 | compatibility testing against the Vendor and Compatible Implementations. 123 | 124 | 1. Verify that you have followed the configuration instructions in 125 | link:config.html#GBFVU[Section 4.1, "Configuring Your Environment to Run 126 | the TCK Against the Compatible Implementation."] 127 | 2. If required, verify that you have completed the steps in 128 | link:config.html#GCLIW[Section 4.3.2, "Deploying the Prebuilt Archives."] 129 | 3. Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting 130 | the tests,"] and, if desired, link:#GBFWM[Section 5.2, "Running a Subset 131 | of the Tests."] 132 | 133 | [[GCLRZ]][[running-the-tck-against-a-vendors-implementation]] 134 | 135 | 5.4 Running the TCK Against a Vendor's Implementation 136 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 137 | 138 | This test scenario is one of the compatibility test phases that all 139 | Vendors must pass. 140 | 141 | 1. Verify that you have followed the configuration instructions in 142 | link:config.html#GCLHU[Section 4.2, "Configuring Your Environment to 143 | Repackage and Run the TCK Against the Vendor Implementation."] 144 | 2. If required, verify that you have completed the steps in 145 | link:config.html#GCLIL[Section 4.3.3, "Deploying the 146 | Test Applications Against the Vendor Implementation."] 147 | 3. Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting 148 | the tests,"] and, if desired, link:#GBFWM[Section 5.2, "Running a Subset 149 | of the Tests."] 150 | 151 | [[GBFVK]][[test-reports]] 152 | 153 | 5.5 Test Reports 154 | ~~~~~~~~~~~~~~~~ 155 | 156 | A set of report files is created for every test run. These report files 157 | can be found in the target directory that the test is run. After a test run is 158 | completed, the JUnit framework writes reports for the test run. 159 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/content/using.inc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakartaee/common-annotations-api/3c680ad22c290d00a1ff3416bb21948ba3722978/tck/docs/userguide/src/main/jbake/content/using.inc -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/jbake.properties: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0, which is available at 6 | # http://www.eclipse.org/legal/epl-2.0. 7 | # 8 | # This Source Code may also be made available under the following Secondary 9 | # Licenses when the conditions for such availability set forth in the 10 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | # version 2 with the GNU Classpath Exception, which is available at 12 | # https://www.gnu.org/software/classpath/license.html. 13 | # 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | # 16 | 17 | site.host=http://jbake.org 18 | render.tags=false 19 | render.sitemap=false 20 | render.archive=false 21 | render.feed=false 22 | render.index=false 23 | asciidoctor.option.safe=0 24 | asciidoctor.attributes.export=true -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/templates/footer.ftl: -------------------------------------------------------------------------------- 1 | <#-- a footer template fragment included in the page template --> 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | <#if content.prev??> 12 | 18 | 19 | 20 | <#if content.next??> 21 | 27 | 28 | 29 | 35 | 36 |
13 | 14 | 15 | Previous 16 | 17 | 22 | 23 | 24 | Next 25 | 26 | 30 | 31 | 32 | Contents 33 | 34 |
37 | 38 | 39 | Eclipse Foundation Logo  40 | Copyright © 2017, 2021 Oracle and/or its affiliates. All rights reserved. 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/templates/header.ftl: -------------------------------------------------------------------------------- 1 | 2 | <#-- a header template fragment included in the page template --> 3 | 4 | 5 | 6 | <#if (content.title)??><#escape x as x?xml>${content.title}</#escape></#if> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 |
15 | ${content.title}
16 |
19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | <#if content.prev??> 29 | 35 | 36 | 37 | <#if content.next??> 38 | 44 | 45 | 46 | 52 | 53 |
30 | 31 | 32 | Previous 33 | 34 | 39 | 40 | 41 | Next 42 | 43 | 47 | 48 | 49 | Contents 50 | 51 |
54 | 55 | -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/templates/menu.ftl: -------------------------------------------------------------------------------- 1 | <#-- a menu bar template fragment included in the page template --> -------------------------------------------------------------------------------- /tck/docs/userguide/src/main/jbake/templates/page.ftl: -------------------------------------------------------------------------------- 1 | <#-- a top level page layout template --> 2 | 3 | <#include "header.ftl"> 4 | <#include "menu.ftl"> 5 | 6 | ${content.body} 7 | 8 | <#include "footer.ftl"> -------------------------------------------------------------------------------- /tck/docs/userguide/src/theme/jakartaee-theme.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Following is the asciidoctor-pdf default theme [1], with small 3 | # customizations, mostly for header and footer, marked "EE". 4 | # 5 | # [1] https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml 6 | # 7 | font: 8 | catalog: 9 | # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols 10 | Noto Serif: 11 | normal: notoserif-regular-subset.ttf 12 | bold: notoserif-bold-subset.ttf 13 | italic: notoserif-italic-subset.ttf 14 | bold_italic: notoserif-bold_italic-subset.ttf 15 | # M+ 1mn supports ASCII and the circled numbers used for conums 16 | M+ 1mn: 17 | normal: mplus1mn-regular-ascii-conums.ttf 18 | bold: mplus1mn-bold-ascii.ttf 19 | italic: mplus1mn-italic-ascii.ttf 20 | bold_italic: mplus1mn-bold_italic-ascii.ttf 21 | # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols 22 | # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font 23 | M+ 1p Fallback: 24 | normal: mplus1p-regular-fallback.ttf 25 | bold: mplus1p-regular-fallback.ttf 26 | italic: mplus1p-regular-fallback.ttf 27 | bold_italic: mplus1p-regular-fallback.ttf 28 | fallbacks: 29 | - M+ 1p Fallback 30 | page: 31 | background_color: ffffff 32 | layout: portrait 33 | margin: [0.5in, 0.67in, 0.67in, 0.67in] 34 | # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress 35 | margin_inner: 0.75in 36 | margin_outer: 0.59in 37 | #size: A4 # EE 38 | size: Letter # EE 39 | base: 40 | align: justify 41 | # color as hex string (leading # is optional) 42 | font_color: 333333 43 | # color as RGB array 44 | #font_color: [51, 51, 51] 45 | # color as CMYK array (approximated) 46 | #font_color: [0, 0, 0, 0.92] 47 | #font_color: [0, 0, 0, 92%] 48 | font_family: Noto Serif 49 | # choose one of these font_size/line_height_length combinations 50 | #font_size: 14 51 | #line_height_length: 20 52 | #font_size: 11.25 53 | #line_height_length: 18 54 | #font_size: 11.2 55 | #line_height_length: 16 56 | font_size: 10.5 57 | #line_height_length: 15 58 | # correct line height for Noto Serif metrics 59 | line_height_length: 12 60 | #font_size: 11.25 61 | #line_height_length: 18 62 | line_height: $base_line_height_length / $base_font_size 63 | font_size_large: round($base_font_size * 1.25) 64 | font_size_small: round($base_font_size * 0.85) 65 | font_size_min: $base_font_size * 0.75 66 | font_style: normal 67 | border_color: eeeeee 68 | border_radius: 4 69 | border_width: 0.5 70 | # FIXME vertical_rhythm is weird; we should think in terms of ems 71 | #vertical_rhythm: $base_line_height_length * 2 / 3 72 | # correct line height for Noto Serif metrics (comes with built-in line height) 73 | vertical_rhythm: $base_line_height_length 74 | horizontal_rhythm: $base_line_height_length 75 | # QUESTION should vertical_spacing be block_spacing instead? 76 | vertical_spacing: $vertical_rhythm 77 | link: 78 | font_color: 428bca 79 | # literal is currently used for inline monospaced in prose and table cells 80 | literal: 81 | font_color: b12146 82 | font_family: M+ 1mn 83 | menu_caret_content: " \u203a " 84 | heading: 85 | align: left 86 | #font_color: 181818 87 | font_color: $base_font_color 88 | font_family: $base_font_family 89 | font_style: bold 90 | # h1 is used for part titles (book doctype) or the doctitle (article doctype) 91 | #h1_font_size: floor($base_font_size * 2.6) # EE 92 | h1_font_size: floor($base_font_size * 2.5) # EE, squeeze title onto one line 93 | # h2 is used for chapter titles (book doctype only) 94 | h2_font_size: floor($base_font_size * 2.15) 95 | h3_font_size: round($base_font_size * 1.7) 96 | h4_font_size: $base_font_size_large 97 | h5_font_size: $base_font_size 98 | h6_font_size: $base_font_size_small 99 | #line_height: 1.4 100 | # correct line height for Noto Serif metrics (comes with built-in line height) 101 | line_height: 1 102 | margin_top: $vertical_rhythm * 0.4 103 | margin_bottom: $vertical_rhythm * 0.9 104 | title_page: 105 | align: right 106 | logo: 107 | top: 10% 108 | title: 109 | top: 55% 110 | font_size: $heading_h1_font_size 111 | font_color: 999999 112 | line_height: 0.9 113 | subtitle: 114 | font_size: $heading_h3_font_size 115 | font_style: bold_italic 116 | line_height: 1 117 | authors: 118 | margin_top: $base_font_size * 1.25 119 | font_size: $base_font_size_large 120 | font_color: 181818 121 | revision: 122 | margin_top: $base_font_size * 1.25 123 | block: 124 | margin_top: 0 125 | margin_bottom: $vertical_rhythm 126 | caption: 127 | align: left 128 | font_size: $base_font_size * 0.95 129 | font_style: italic 130 | # FIXME perhaps set line_height instead of / in addition to margins? 131 | margin_inside: $vertical_rhythm / 3 132 | #margin_inside: $vertical_rhythm / 4 133 | margin_outside: 0 134 | lead: 135 | font_size: $base_font_size_large 136 | line_height: 1.4 137 | abstract: 138 | font_color: 5c6266 139 | font_size: $lead_font_size 140 | line_height: $lead_line_height 141 | font_style: italic 142 | first_line_font_style: bold 143 | title: 144 | align: center 145 | font_color: $heading_font_color 146 | font_family: $heading_font_family 147 | font_size: $heading_h4_font_size 148 | font_style: $heading_font_style 149 | admonition: 150 | column_rule_color: $base_border_color 151 | column_rule_width: $base_border_width 152 | padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm] 153 | #icon: 154 | # tip: 155 | # name: fa-lightbulb-o 156 | # stroke_color: 111111 157 | # size: 24 158 | label: 159 | text_transform: uppercase 160 | font_style: bold 161 | blockquote: 162 | font_color: $base_font_color 163 | font_size: $base_font_size_large 164 | border_color: $base_border_color 165 | border_width: 5 166 | # FIXME disable negative padding bottom once margin collapsing is implemented 167 | padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2] 168 | cite_font_size: $base_font_size_small 169 | cite_font_color: 999999 170 | # code is used for source blocks (perhaps change to source or listing?) 171 | code: 172 | font_color: $base_font_color 173 | font_family: $literal_font_family 174 | font_size: ceil($base_font_size) 175 | padding: $code_font_size 176 | line_height: 1.25 177 | # line_gap is an experimental property to control how a background color is applied to an inline block element 178 | line_gap: 3.8 179 | background_color: f5f5f5 180 | border_color: cccccc 181 | border_radius: $base_border_radius 182 | border_width: 0.75 183 | conum: 184 | font_family: M+ 1mn 185 | font_color: $literal_font_color 186 | font_size: $base_font_size 187 | line_height: 4 / 3 188 | example: 189 | border_color: $base_border_color 190 | border_radius: $base_border_radius 191 | border_width: 0.75 192 | background_color: ffffff 193 | # FIXME reenable padding bottom once margin collapsing is implemented 194 | padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm] 195 | image: 196 | align: left 197 | prose: 198 | margin_top: $block_margin_top 199 | margin_bottom: $block_margin_bottom 200 | sidebar: 201 | background_color: eeeeee 202 | border_color: e1e1e1 203 | border_radius: $base_border_radius 204 | border_width: $base_border_width 205 | # FIXME reenable padding bottom once margin collapsing is implemented 206 | padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25] 207 | title: 208 | align: center 209 | font_color: $heading_font_color 210 | font_family: $heading_font_family 211 | font_size: $heading_h4_font_size 212 | font_style: $heading_font_style 213 | thematic_break: 214 | border_color: $base_border_color 215 | border_style: solid 216 | border_width: $base_border_width 217 | margin_top: $vertical_rhythm * 0.5 218 | margin_bottom: $vertical_rhythm * 1.5 219 | description_list: 220 | term_font_style: bold 221 | term_spacing: $vertical_rhythm / 4 222 | description_indent: $horizontal_rhythm * 1.25 223 | outline_list: 224 | indent: $horizontal_rhythm * 1.5 225 | #marker_font_color: 404040 226 | # NOTE outline_list_item_spacing applies to list items that do not have complex content 227 | item_spacing: $vertical_rhythm / 2 228 | table: 229 | background_color: $page_background_color 230 | #head_background_color: 231 | #head_font_color: $base_font_color 232 | head_font_style: bold 233 | #body_background_color: 234 | body_stripe_background_color: f9f9f9 235 | foot_background_color: f0f0f0 236 | border_color: dddddd 237 | border_width: $base_border_width 238 | cell_padding: 3 239 | toc: 240 | indent: $horizontal_rhythm 241 | line_height: 1.4 242 | dot_leader: 243 | #content: ". " 244 | font_color: a9a9a9 245 | #levels: 2 3 246 | # NOTE in addition to footer, header is also supported 247 | footer: 248 | font_size: $base_font_size_small 249 | # NOTE if background_color is set, background and border will span width of page 250 | #border_color: dddddd # EE 251 | #border_width: 0.25 # EE 252 | height: $base_line_height_length * 2.5 253 | line_height: 1 254 | padding: [$base_line_height_length / 2, 1, 0, 1] 255 | vertical_align: top 256 | #image_vertical_align: or 257 | # additional attributes for content: 258 | # * {page-count} 259 | # * {page-number} 260 | # * {document-title} 261 | # * {document-subtitle} 262 | # * {chapter-title} 263 | # * {section-title} 264 | # * {section-or-chapter-title} 265 | recto: 266 | #columns: "<50% =0% >50%" 267 | right: 268 | #content: '{page-number}' # EE 269 | #content: '{section-or-chapter-title} | {page-number}' 270 | #content: '{document-title} | {page-number}' 271 | content: '{document-title}{nbsp}{nbsp}{nbsp} *{page-number}*' # EE 272 | #center: 273 | # content: '{page-number}' 274 | left: # EE 275 | content: '{status}' # EE 276 | verso: 277 | #columns: $footer_recto_columns 278 | left: 279 | #content: $footer_recto_right_content # EE 280 | #content: '{page-number} | {chapter-title}' 281 | content: '*{page-number}* {nbsp}{nbsp}{nbsp}{document-title}' # EE 282 | #center: 283 | # content: '{page-number}' 284 | right: # EE 285 | content: '{status}' # EE 286 | header: # EE 287 | font_size: $base_font_size_small # EE 288 | border_color: dddddd # EE 289 | border_width: 0.25 # EE 290 | height: $base_line_height_length * 2.5 # EE 291 | line_height: 1 # EE 292 | padding: [$base_line_height_length / 2, 1, 0, 1] # EE 293 | vertical_align: top # EE 294 | recto: # EE 295 | right: # EE 296 | content: '{section-or-chapter-title}' # EE 297 | verso: # EE 298 | left: # EE 299 | content: '{section-or-chapter-title}' # EE 300 | -------------------------------------------------------------------------------- /tck/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 4.0.0 22 | 23 | 24 | org.eclipse.ee4j 25 | project 26 | 1.0.9 27 | 28 | 29 | jakarta.annotation 30 | jakarta-annotations-tck 31 | 3.0.0 32 | jar 33 | 34 | Annotations-TCK 35 | Common Annotations TCK 36 | 37 | 38 | 3.0.0 39 | 5.10.2 40 | 41 | 17 42 | ${maven.compiler.release} 43 | 44 | 45 | 46 | 47 | jakarta.annotation 48 | jakarta.annotation-api 49 | ${jakarta.annotations-api.version} 50 | 51 | 52 | org.junit.jupiter 53 | junit-jupiter 54 | ${junit.jupiter.version} 55 | compile 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.apache.maven.plugins 64 | maven-javadoc-plugin 65 | 3.6.3 66 | 67 | 68 | org.apache.maven.plugins 69 | maven-source-plugin 70 | 3.3.0 71 | 72 | 73 | org.apache.maven.plugins 74 | maven-compiler-plugin 75 | 3.12.1 76 | 77 | 78 | org.apache.maven.plugins 79 | maven-assembly-plugin 80 | 3.6.0 81 | 82 | 83 | jakarta.tck 84 | sigtest-maven-plugin 85 | 2.2 86 | 87 | 88 | 89 | 90 | ${bundle-name}-${project.version} 91 | 92 | 93 | src/main/resources 94 | 95 | LICENSE_${license}.md 96 | com/ 97 | **/*sig*/** 98 | 99 | 100 | 101 | 102 | 103 | org.apache.maven.plugins 104 | maven-javadoc-plugin 105 | 106 | none 107 | 108 | 109 | 110 | org.apache.maven.plugins 111 | maven-source-plugin 112 | 113 | 114 | attach-sources 115 | 116 | jar-no-fork 117 | 118 | 119 | 120 | 121 | 122 | org.apache.maven.plugins 123 | maven-assembly-plugin 124 | 125 | 126 | distribution 127 | 128 | single 129 | 130 | package 131 | 132 | 133 | src/main/assembly/assembly.xml 134 | 135 | \ 136 | false 137 | ${bundle-name}-${project.version} 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | EFTL 148 | 149 | true 150 | 151 | 152 | jakarta-annotations-tck 153 | EFTL 154 | 155 | 156 | 157 | EPL 158 | 159 | annotations-tck 160 | EPL 161 | 162 | 163 | 164 | record-signature 165 | 166 | false 167 | 168 | 169 | jakarta-annotations-tck 170 | EFTL 171 | 172 | 173 | 174 | 175 | jakarta.tck 176 | sigtest-maven-plugin 177 | 178 | ${project.build.directory}/jakarta.annotation.sig_${project.version} 179 | jakarta.annotation,jakarta.annotation.security,jakarta.annotation.sql 180 | 181 | 182 | 183 | 184 | generate 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | -------------------------------------------------------------------------------- /tck/src/main/assembly/assembly.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | distribution 23 | annotations-tck 24 | 25 | zip 26 | 27 | 28 | 29 | 30 | 31 | ${project.basedir}/src/main/resources/LICENSE_${license}.md 32 | LICENSE.md 33 | 34 | 35 | 36 | 37 | ${project.build.directory} 38 | artifacts 39 | 755 40 | 41 | **/*.jar 42 | 43 | 44 | 45 | ${project.basedir}/docs 46 | docs 47 | 755 48 | 49 | *.html 50 | *.txt 51 | 52 | 53 | 54 | ${project.basedir}/docs/tck-runner 55 | tck-runner 56 | 755 57 | 58 | 59 | ${project.basedir}/docs/userguide/target/generated-docs 60 | docs/pdf-usersguide 61 | 755 62 | 63 | *.pdf 64 | 65 | 66 | 67 | ${project.basedir}/docs/userguide/target/staging 68 | docs/html-usersguide 69 | 755 70 | 71 | *.html 72 | css/** 73 | img/** 74 | 75 | 76 | 77 | ${project.basedir}/src/main/dist 78 | . 79 | false 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /tck/src/main/dist/README: -------------------------------------------------------------------------------- 1 | The pom.xml in this folder can be used to run the Jakarta Annotations Standalone TCK 2 | against Glassfish 8.0.0 3 | 4 | 5 | Below are the instructions to run the Jakarta Annotations TCK 6 | 7 | 1. Install Java17+ , set JAVA_HOME 8 | 9 | 2. Install Maven 3.6+ set M2_HOME 10 | 11 | 3. set environment variables: 12 | SET PATH : add M2_HOME/bin, JAVA_HOME/bin 13 | eg: export PATH=$M2_HOME/bin:$JAVA_HOME/bin:$PATH 14 | SET ANNOTATIONS_TCK_HOME : root folder of the TCK installation 15 | eg: export ANNOTATIONS_TCK_HOME=. 16 | 17 | 4. Install the tck jar jakarta-annotations-tck-.jar available 18 | in the annotations-tck/artifacts folder using artifact-install.sh script 19 | eg: cd $ANNOTATIONS_TCK_HOME/artifacts && ./artifact-install.sh 20 | 21 | 5. Use the sample pom.xml available in the annotations-tck/tck-runner, 22 | to run the test with Glassfish, verify the system properties set. 23 | eg: `mvn clean verify -f $$ANNOTATIONS_TCK_HOME/tck-runner/pom.xml` 24 | -------------------------------------------------------------------------------- /tck/src/main/dist/artifacts/artifact-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. 4 | # 5 | # This program and the accompanying materials are made available under the 6 | # terms of the Eclipse Public License v. 2.0, which is available at 7 | # http://www.eclipse.org/legal/epl-2.0. 8 | # 9 | # This Source Code may also be made available under the following Secondary 10 | # Licenses when the conditions for such availability set forth in the 11 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 12 | # version 2 with the GNU Classpath Exception, which is available at 13 | # https://www.gnu.org/software/classpath/license.html. 14 | # 15 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 16 | # 17 | 18 | ##script to install the artifact directory contents into a local maven repository 19 | 20 | if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then 21 | VERSION="$1" 22 | else 23 | VERSION="3.0.0" 24 | fi 25 | 26 | # test jar 27 | mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \ 28 | -Dfile=jakarta-annotations-tck-"$VERSION".jar -DgroupId=jakarta.annotation \ 29 | -DartifactId=jakarta-annotations-tck -Dversion="$VERSION" -Dpackaging=jar 30 | 31 | # test sources jar 32 | mvn org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install-file \ 33 | -Dfile=jakarta-annotations-tck-"$VERSION"-sources.jar -DgroupId=jakarta.annotation \ 34 | -DartifactId=jakarta-annotations-tck-sources -Dversion="$VERSION" -Dpackaging=jar 35 | -------------------------------------------------------------------------------- /tck/src/main/java/ee/jakarta/tck/annotations/signaturetest/CAJSigTestIT.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package ee.jakarta.tck.annotations.signaturetest; 18 | 19 | import java.util.ArrayList; 20 | import java.util.Properties; 21 | 22 | import java.io.File; 23 | import java.io.IOException; 24 | import java.io.InputStream; 25 | 26 | import org.junit.jupiter.api.Test; 27 | 28 | import java.lang.System.Logger; 29 | /* 30 | * This class is a simple example of a signature test that extends the 31 | * SigTest framework class. This signature test is run outside of the 32 | * J2EE containers. This class also contains the boilerplate 33 | * code necessary to create a signature test using the test framework. 34 | * To see a complete TCK example see the j2ee directory for the J2EE 35 | * TCK signature test class. 36 | */ 37 | public class CAJSigTestIT extends SigTest { 38 | 39 | private static final Logger logger = System.getLogger(CAJSigTestIT.class.getName()); 40 | 41 | private Properties props = null; 42 | 43 | public CAJSigTestIT() { 44 | props = System.getProperties(); 45 | setup(); 46 | } 47 | 48 | // all the classes that make up common annotations 49 | private final String GENERATED = "jakarta.annotation.Generated"; 50 | 51 | private final String POSTCONSTRUCT = "jakarta.annotation.PostConstruct"; 52 | 53 | private final String PREDESTROY = "jakarta.annotation.PreDestroy"; 54 | 55 | private final String PRIORITY = "jakarta.annotation.Priority"; 56 | 57 | private final String RESOURCE = "jakarta.annotation.Resource,jakarta.annotation.Resource$AuthenticationType"; 58 | 59 | private final String RESOURCES = "jakarta.annotation.Resources"; 60 | 61 | private final String SECURITYDECLAREROLES = "jakarta.annotation.security.DeclareRoles"; 62 | 63 | private final String SECURITYDENYALL = "jakarta.annotation.security.DenyAll"; 64 | 65 | private final String SECURITYPERMITALL = "jakarta.annotation.security.PermitAll"; 66 | 67 | private final String SECURITYROLESALLOWED = "jakarta.annotation.security.RolesAllowed"; 68 | 69 | private final String SECURITYRUNAS = "jakarta.annotation.security.RunAs"; 70 | 71 | private final String SQLDATASOURCEDEFINITION = "jakarta.annotation.sql.DataSourceDefinition"; 72 | 73 | private final String SQLDATASOURCEDEFINITIONS = "jakarta.annotation.sql.DataSourceDefinitions"; 74 | 75 | private boolean ca_generated = false; 76 | 77 | private boolean ca_postconstruct = false; 78 | 79 | private boolean ca_priority = false; 80 | 81 | private boolean ca_predestroy = false; 82 | 83 | private boolean ca_resource = false; 84 | 85 | private boolean ca_resources = false; 86 | 87 | private boolean ca_securitydeclareroles = false; 88 | 89 | private boolean ca_securitydenyall = false; 90 | 91 | private boolean ca_securitypermitall = false; 92 | 93 | private boolean ca_securityrolesallowed = false; 94 | 95 | private boolean ca_securityrunas = false; 96 | 97 | private boolean ca_sqldatasourcedefinition = false; 98 | 99 | private boolean ca_sqldatasourcedefinitions = false; 100 | 101 | /***** Abstract Method Implementation *****/ 102 | 103 | /** 104 | * Returns a list of strings where each string represents a package name. Each 105 | * package name will have it's signature tested by the signature test 106 | * framework. 107 | * 108 | * @return String[] The names of the packages whose signatures should be 109 | * verified. 110 | */ 111 | protected String[] getPackages() { 112 | return new String[] {}; 113 | } 114 | 115 | protected String[] getClasses() { 116 | // generate a String[] of the classes that should be verified based 117 | // on what annotations are selected in the ts.jte 118 | ArrayList classesArray = new ArrayList(); 119 | if (ca_generated) { 120 | classesArray.add(GENERATED); 121 | } 122 | if (ca_postconstruct) { 123 | classesArray.add(POSTCONSTRUCT); 124 | } 125 | if (ca_priority) { 126 | classesArray.add(PRIORITY); 127 | } 128 | if (ca_predestroy) { 129 | classesArray.add(PREDESTROY); 130 | } 131 | if (ca_resource) { 132 | String[] s = RESOURCE.split(","); 133 | for (int i = 0; i < s.length; i++) { 134 | classesArray.add(s[i]); 135 | } 136 | } 137 | if (ca_resources) { 138 | classesArray.add(RESOURCES); 139 | } 140 | if (ca_securitydeclareroles) { 141 | classesArray.add(SECURITYDECLAREROLES); 142 | } 143 | if (ca_securitydenyall) { 144 | classesArray.add(SECURITYDENYALL); 145 | } 146 | if (ca_securitypermitall) { 147 | classesArray.add(SECURITYPERMITALL); 148 | } 149 | if (ca_securityrolesallowed) { 150 | classesArray.add(SECURITYROLESALLOWED); 151 | } 152 | if (ca_securityrunas) { 153 | classesArray.add(SECURITYRUNAS); 154 | } 155 | if (ca_sqldatasourcedefinition) { 156 | classesArray.add(SQLDATASOURCEDEFINITION); 157 | } 158 | if (ca_sqldatasourcedefinitions) { 159 | classesArray.add(SQLDATASOURCEDEFINITIONS); 160 | } 161 | return (String[]) classesArray.toArray(new String[classesArray.size()]); 162 | 163 | } 164 | 165 | 166 | /* 167 | * The following comments are specified in the base class that defines the 168 | * signature tests. This is done so the test finders will find the right class 169 | * to run. The implementation of these methods is inherited from the super 170 | * class which is part of the signature test framework. 171 | */ 172 | 173 | // NOTE: If the API under test is not part of your testing runtime 174 | // environment, you may use the property sigTestClasspath to specify 175 | // where the API under test lives. This should almost never be used. 176 | // Normally the API under test should be specified in the classpath 177 | // of the VM running the signature tests. Use either the first 178 | // comment or the one below it depending on which properties your 179 | // signature tests need. Please do not use both comments. 180 | 181 | /* 182 | * @class.setup_props: ts_home; sigTestClasspath, Location of ca jar files; 183 | * ca.sig.generated; ca.sig.postconstruct; 184 | * ca.sig.priority; ca.sig.predestroy; ca.sig.resource; ca.sig.resources; 185 | * ca.sig.securitydeclareroles; ca.sig.securitydenyall; 186 | * ca.sig.securitypermitall; ca.sig.securityrolesallowed; 187 | * ca.sig.securityrunas; ca.sig.sqldatasourcedefinition; 188 | * ca.sig.sqldatasourcedefinitions; 189 | */ 190 | public void setup() { 191 | super.setup(); 192 | 193 | // read in the values from the ts.jte file 194 | ca_generated = Boolean.valueOf(props.getProperty("ca.sig.generated")) 195 | .booleanValue(); 196 | ca_postconstruct = Boolean.valueOf(props.getProperty("ca.sig.postconstruct")) 197 | .booleanValue(); 198 | ca_priority = Boolean.valueOf(props.getProperty("ca.sig.priority")) 199 | .booleanValue(); 200 | ca_predestroy = Boolean.valueOf(props.getProperty("ca.sig.predestroy")) 201 | .booleanValue(); 202 | ca_resource = Boolean.valueOf(props.getProperty("ca.sig.resource")) 203 | .booleanValue(); 204 | ca_resources = Boolean.valueOf(props.getProperty("ca.sig.resources")) 205 | .booleanValue(); 206 | ca_securitydeclareroles = Boolean 207 | .valueOf(props.getProperty("ca.sig.securitydeclareroles")).booleanValue(); 208 | ca_securitydenyall = Boolean 209 | .valueOf(props.getProperty("ca.sig.securitydenyall")).booleanValue(); 210 | ca_securitypermitall = Boolean 211 | .valueOf(props.getProperty("ca.sig.securitypermitall")).booleanValue(); 212 | ca_securityrolesallowed = Boolean 213 | .valueOf(props.getProperty("ca.sig.securityrolesallowed")).booleanValue(); 214 | ca_securityrunas = Boolean.valueOf(props.getProperty("ca.sig.securityrunas")) 215 | .booleanValue(); 216 | ca_sqldatasourcedefinition = Boolean 217 | .valueOf(props.getProperty("ca.sig.sqldatasourcedefinition")) 218 | .booleanValue(); 219 | ca_sqldatasourcedefinitions = Boolean 220 | .valueOf(props.getProperty("ca.sig.sqldatasourcedefinitions")) 221 | .booleanValue(); 222 | } 223 | 224 | /* 225 | * @testName: signatureTest 226 | * 227 | * @assertion: A CAJ platform must implement the required classes and APIs 228 | * specified in the CAJ Specification. 229 | * 230 | * @test_Strategy: Using reflection, gather the implementation specific 231 | * classes and APIs. Compare these results with the expected (required) 232 | * classes and APIs. 233 | * 234 | */ 235 | @Test 236 | public void signatureTest() throws Exception { 237 | 238 | logger.log(Logger.Level.INFO, "$$$ signatureTest() called"); 239 | String mapFile = null; 240 | String packageFile = null; 241 | Properties mapFileAsProps = null; 242 | String[] packages = getPackages(); 243 | String apiPackage = "jakarta.annotation"; 244 | 245 | try { 246 | 247 | InputStream inStreamMapfile = CAJSigTestIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/annotations/signaturetest/sig-test.map"); 248 | File mFile = writeStreamToTempFile(inStreamMapfile, "sig-test", ".map"); 249 | mapFile = mFile.getCanonicalPath(); 250 | logger.log(Logger.Level.INFO, "mapFile location is :"+mapFile); 251 | 252 | InputStream inStreamPackageFile = CAJSigTestIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/annotations/signaturetest/sig-test-pkg-list.txt"); 253 | File pFile = writeStreamToTempFile(inStreamPackageFile, "sig-test-pkg-list", ".txt"); 254 | packageFile = pFile.getCanonicalPath(); 255 | logger.log(Logger.Level.INFO, "packageFile location is :"+packageFile); 256 | 257 | mapFileAsProps = getSigTestDriver().loadMapFile(mapFile); 258 | String packageVersion = mapFileAsProps.getProperty(apiPackage); 259 | logger.log(Logger.Level.INFO, "Package version from mapfile :"+packageVersion); 260 | 261 | InputStream inStreamSigFile = CAJSigTestIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/annotations/signaturetest/jakarta.annotation.sig_"+packageVersion); 262 | File sigFile = writeStreamToSigFile(inStreamSigFile, apiPackage, packageVersion); 263 | logger.log(Logger.Level.INFO, "signature File location is :"+sigFile.getCanonicalPath()); 264 | 265 | } catch(IOException ex) { 266 | logger.log(Logger.Level.ERROR , "Exception while creating temp files :"+ex); 267 | } 268 | 269 | super.signatureTest(mapFile, packageFile, mapFileAsProps, packages); 270 | 271 | } 272 | 273 | /* 274 | * Call the parent class's cleanup method. 275 | */ 276 | 277 | /* 278 | * define which sig driver we will use 279 | */ 280 | protected SignatureTestDriver getSigTestDriver() { 281 | 282 | if (driver == null) { 283 | driver = SignatureTestDriverFactory 284 | .getInstance(SignatureTestDriverFactory.SIG_TEST); 285 | } 286 | 287 | return driver; 288 | 289 | } // END getSigTestDriver 290 | 291 | } // end class CAJSigTest 292 | -------------------------------------------------------------------------------- /tck/src/main/java/ee/jakarta/tck/annotations/signaturetest/SigTestData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /* 18 | * $Id$ 19 | */ 20 | 21 | package ee.jakarta.tck.annotations.signaturetest; 22 | 23 | import java.util.Properties; 24 | 25 | /** 26 | * This class holds the data passed to a signature test invocation during the 27 | * setup phase. This allows us to keep the passed data separate and reuse the 28 | * data between the signature test framework base classes. 29 | */ 30 | public class SigTestData { 31 | 32 | private Properties props; 33 | 34 | public SigTestData() { 35 | this.props = System.getProperties(); 36 | } 37 | 38 | public String getTestClasspath() { 39 | return props.getProperty("sigTestClasspath", ""); 40 | } 41 | 42 | public String getProperty(String prop) { 43 | return props.getProperty(prop); 44 | } 45 | 46 | public String getOptionalTechPackagesToIgnore() { 47 | return props.getProperty("optional.tech.packages.to.ignore", ""); 48 | } 49 | 50 | public String getJImageDir() { 51 | return props.getProperty("jimage.dir", ""); 52 | } 53 | } // end class SigTestData 54 | -------------------------------------------------------------------------------- /tck/src/main/java/ee/jakarta/tck/annotations/signaturetest/SigTestDriver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | package ee.jakarta.tck.annotations.signaturetest; 18 | 19 | import java.io.ByteArrayOutputStream; 20 | import java.io.File; 21 | import java.io.PrintWriter; 22 | import java.lang.reflect.Method; 23 | import java.util.ArrayList; 24 | import java.util.List; 25 | import java.lang.System.Logger; 26 | 27 | 28 | /** 29 | *

30 | * Wrapper for the Sig Test framework. 31 | *

32 | */ 33 | public class SigTestDriver extends SignatureTestDriver { 34 | 35 | private static final Logger logger = System.getLogger(SigTestDriver.class.getName()); 36 | 37 | private static final String CLASSPATH_FLAG = "-Classpath"; 38 | 39 | private static final String FILENAME_FLAG = "-FileName"; 40 | 41 | private static final String PACKAGE_FLAG = "-Package"; 42 | 43 | private static final String PACKAGE_NO_SUBS_FLAG = "-PackageWithoutSubpackages"; 44 | 45 | private static final String API_VERSION_FLAG = "-ApiVersion"; 46 | 47 | private static final String EXCLUDE_FLAG = "-Exclude"; 48 | 49 | private static final String STATIC_FLAG = "-Static"; 50 | 51 | private static final String CHECKVALUE_FLAG = "-CheckValue"; // only valid w/ 52 | // -static 53 | 54 | private static final String NO_CHECKVALUE_FLAG = "-NoCheckValue"; 55 | 56 | private static final String SMODE_FLAG = "-mode"; // requires arg of bin or 57 | // src 58 | 59 | private static final String DEBUG_FLAG = "-Debug"; 60 | 61 | private static final String FORMATPLAIN_FLAG = "-FormatPlain"; 62 | 63 | private static final String EXCLUDE_JDK_CLASS_FLAG = "-IgnoreJDKClass"; 64 | 65 | private static String[] excludeJdkClasses = { 66 | "java.util.Map", 67 | "java.lang.Object", 68 | "java.io.ByteArrayInputStream", 69 | "java.io.InputStream", 70 | "java.lang.Deprecated", 71 | "java.io.Writer", 72 | "java.io.OutputStream", 73 | "java.util.List", 74 | "java.util.Collection", 75 | "java.lang.instrument.IllegalClassFormatException", 76 | "javax.transaction.xa.XAException", 77 | "java.lang.annotation.Repeatable", 78 | "java.lang.InterruptedException", 79 | "java.lang.CloneNotSupportedException", 80 | "java.lang.Throwable", 81 | "java.lang.Thread", 82 | "java.lang.Enum" 83 | }; 84 | 85 | // ---------------------------------------- Methods from SignatureTestDriver 86 | 87 | @Override 88 | protected String normalizeFileName(File f) { 89 | String sURL = null; 90 | try { 91 | sURL = f.toURI().toURL().toExternalForm(); 92 | } catch (Exception e) { 93 | throw new RuntimeException(e); 94 | } 95 | return sURL; 96 | } 97 | 98 | @Override 99 | protected String[] createTestArguments(String packageListFile, String mapFile, 100 | String signatureRepositoryDir, String packageOrClassUnderTest, 101 | String classpath, boolean bStaticMode) throws Exception { 102 | 103 | SignatureFileInfo info = getSigFileInfo(packageOrClassUnderTest, mapFile, 104 | signatureRepositoryDir); 105 | 106 | PackageList packageList = new PackageList(packageListFile); 107 | String[] subPackages = packageList.getSubPackages(packageOrClassUnderTest); 108 | 109 | List command = new ArrayList(); 110 | 111 | if (bStaticMode) { 112 | // static mode allows finer level of constants checking 113 | // -CheckValue says to check the actual const values 114 | logger.log(Logger.Level.TRACE,"Setting static mode flag to allow constant checking."); 115 | command.add(STATIC_FLAG); 116 | command.add(CHECKVALUE_FLAG); 117 | 118 | // specifying "-mode src" allows stricter 2 way verification of constant 119 | // vals 120 | // (note that using "-mode bin" mode is less strict) 121 | command.add(SMODE_FLAG); 122 | // command.add("bin"); 123 | command.add("src"); 124 | } else { 125 | logger.log(Logger.Level.TRACE,"Not Setting static mode flag to allow constant checking."); 126 | } 127 | 128 | // command.add(DEBUG_FLAG); 129 | 130 | command.add("-Verbose"); 131 | 132 | command.add(FILENAME_FLAG); 133 | command.add(info.getFile()); 134 | 135 | command.add(CLASSPATH_FLAG); 136 | command.add(classpath); 137 | 138 | command.add(PACKAGE_FLAG); 139 | command.add(packageOrClassUnderTest); 140 | 141 | for (int i = 0; i < subPackages.length; i++) { 142 | command.add(EXCLUDE_FLAG); 143 | command.add(subPackages[i]); 144 | } 145 | 146 | for(String jdkClassName:excludeJdkClasses) { 147 | command.add(EXCLUDE_JDK_CLASS_FLAG); 148 | command.add(jdkClassName); 149 | } 150 | 151 | 152 | command.add(API_VERSION_FLAG); 153 | command.add(info.getVersion()); 154 | 155 | return ((String[]) command.toArray(new String[command.size()])); 156 | 157 | } // END createTestArguments 158 | 159 | @Override 160 | protected boolean runSignatureTest(String packageOrClassName, 161 | String[] testArguments) throws Exception { 162 | 163 | Class sigTestClass = Class 164 | .forName("com.sun.tdk.signaturetest.SignatureTest"); 165 | Object sigTestInstance = sigTestClass.newInstance(); 166 | 167 | ByteArrayOutputStream output = new ByteArrayOutputStream(); 168 | 169 | // do some logging to help with troubleshooting 170 | logger.log(Logger.Level.TRACE, 171 | "\nCalling: com.sun.tdk.signaturetest.SignatureTest() with following args:"); 172 | for (int ii = 0; ii < testArguments.length; ii++) { 173 | logger.log(Logger.Level.TRACE," testArguments[" + ii + "] = " + testArguments[ii]); 174 | } 175 | 176 | @SuppressWarnings("unchecked") 177 | Method runMethod = sigTestClass.getDeclaredMethod("run", 178 | new Class[] { String[].class, PrintWriter.class, PrintWriter.class }); 179 | runMethod.invoke(sigTestInstance, 180 | new Object[] { testArguments, new PrintWriter(output, true), null }); 181 | 182 | String rawMessages = output.toString(); 183 | 184 | // currently, there is no way to determine if there are error msgs in 185 | // the rawmessages, so we will always dump this and call it a status. 186 | // TestUtil.logMsg( 187 | // "********** Status Report '" + packageOrClassName + "' **********\n"); 188 | // TestUtil.logMsg(rawMessages); 189 | logger.log(Logger.Level.INFO, "********** Status Report '" + packageOrClassName + "' **********\n"); 190 | logger.log(Logger.Level.INFO, rawMessages); 191 | 192 | return sigTestInstance.toString().substring(7).startsWith("Passed."); 193 | } // END runSignatureTest 194 | 195 | /* 196 | * 197 | * @return This returns true if the packageOrClassName is found in the impl. 198 | */ 199 | @Override 200 | protected boolean runPackageSearch(String packageOrClassName, 201 | String[] testArguments) throws Exception { 202 | 203 | Class sigTestClass = Class 204 | .forName("com.sun.tdk.signaturetest.SignatureTest"); 205 | Object sigTestInstance = sigTestClass.newInstance(); 206 | 207 | ByteArrayOutputStream output = new ByteArrayOutputStream(); 208 | 209 | // we want to replace the PACKAGE_FLAG with PACKAGE_NO_SUBS_FLAG 210 | for (int ii = 0; ii < testArguments.length; ii++) { 211 | if (testArguments[ii].equals(PACKAGE_FLAG)) { 212 | testArguments[ii] = PACKAGE_NO_SUBS_FLAG; 213 | } 214 | } 215 | 216 | // dump args for debugging aid 217 | logger.log(Logger.Level.TRACE, 218 | "\nCalling: com.sun.tdk.signaturetest.SignatureTest() with following args:"); 219 | for (int ii = 0; ii < testArguments.length; ii++) { 220 | logger.log(Logger.Level.TRACE," testArguments[" + ii + "] = " + testArguments[ii]); 221 | } 222 | 223 | @SuppressWarnings("unchecked") 224 | Method runMethod = sigTestClass.getDeclaredMethod("run", 225 | new Class[] { String[].class, PrintWriter.class, PrintWriter.class }); 226 | runMethod.invoke(sigTestInstance, 227 | new Object[] { testArguments, new PrintWriter(output, true), null }); 228 | 229 | String rawMessages = output.toString(); 230 | 231 | // currently, there is no way to determine if there are error msgs in 232 | // the rawmessages, so we will always dump this and call it a status. 233 | // TestUtil.logMsg( 234 | // "********** Status Report '" + packageOrClassName + "' **********\n"); 235 | // TestUtil.logMsg(rawMessages); 236 | logger.log(Logger.Level.INFO, "********** Status Report '" + packageOrClassName + "' **********\n"); 237 | logger.log(Logger.Level.INFO, rawMessages); 238 | 239 | return sigTestInstance.toString().substring(7).startsWith("Passed."); 240 | } 241 | 242 | } 243 | -------------------------------------------------------------------------------- /tck/src/main/java/ee/jakarta/tck/annotations/signaturetest/SigTestResult.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /* 18 | * $Id$ 19 | */ 20 | package ee.jakarta.tck.annotations.signaturetest; 21 | 22 | import java.io.Serializable; 23 | import java.util.ArrayList; 24 | import java.util.List; 25 | 26 | public class SigTestResult implements Serializable { 27 | 28 | private static final String NL = System.getProperty("line.separator", "\n"); 29 | 30 | private List failedPkgs = new ArrayList(); 31 | 32 | private List passedPkgs = new ArrayList(); 33 | 34 | private List failedClasses = new ArrayList(); 35 | 36 | private List passedClasses = new ArrayList(); 37 | 38 | // ---------------------------------------------------------- Public Methods 39 | 40 | public synchronized boolean passed() { 41 | 42 | return (failedPkgs.size() == 0 && failedClasses.size() == 0); 43 | 44 | } // end passed 45 | 46 | public synchronized void addFailedPkg(String pkg) { 47 | 48 | failedPkgs.add(pkg); 49 | 50 | } // END addFailedPkg 51 | 52 | public synchronized void addPassedPkg(String pkg) { 53 | 54 | passedPkgs.add(pkg); 55 | 56 | } // END addPassedPkg 57 | 58 | public synchronized void addFailedClass(String className) { 59 | 60 | failedClasses.add(className); 61 | 62 | } // END addFailedClass 63 | 64 | public synchronized void addPassedClass(String className) { 65 | 66 | passedClasses.add(className); 67 | 68 | } // END addPassedClass 69 | 70 | public String toString() { 71 | 72 | String delim = "******************************************************" 73 | + NL; 74 | if (!pkgsTested() && !classesTested()) { 75 | return (delim + "******** No packages or classes were tested **********" 76 | + NL + delim); 77 | } 78 | StringBuffer buf = new StringBuffer(); 79 | buf.append(delim); 80 | buf.append(delim); 81 | if (passed()) { 82 | buf.append("All package signatures passed.").append(NL); 83 | } else { 84 | buf.append("Some signatures failed.").append(NL); 85 | if (failedPkgs.size() > 0) { 86 | buf.append("\tFailed packages listed below: ").append(NL); 87 | formatList(failedPkgs, buf); 88 | } 89 | if (failedClasses.size() > 0) { 90 | buf.append("\tFailed classes listed below: ").append(NL); 91 | formatList(failedClasses, buf); 92 | } 93 | } 94 | if (passedPkgs.size() > 0) { 95 | buf.append("\tPassed packages listed below: ").append(NL); 96 | formatList(passedPkgs, buf); 97 | } 98 | if (passedClasses.size() > 0) { 99 | buf.append("\tPassed classes listed below: ").append(NL); 100 | formatList(passedClasses, buf); 101 | } 102 | buf.append("\t"); 103 | buf.append(delim); 104 | buf.append(delim); 105 | return buf.toString(); 106 | 107 | } // END toString 108 | 109 | // --------------------------------------------------------- Private Methods 110 | 111 | private synchronized void formatList(List list, StringBuffer buf) { 112 | 113 | synchronized (this) { 114 | for (int i = 0; i < list.size(); i++) { 115 | String pkg = (String) (list.get(i)); 116 | buf.append("\t\t").append(pkg).append(NL); 117 | } 118 | } 119 | 120 | } // END formatList 121 | 122 | private synchronized boolean pkgsTested() { 123 | 124 | return (failedPkgs.size() != 0 || passedPkgs.size() != 0); 125 | 126 | } // END pkgsTested 127 | 128 | private synchronized boolean classesTested() { 129 | 130 | return (failedClasses.size() != 0 || passedClasses.size() != 0); 131 | 132 | } // END classesTested 133 | 134 | } // end class SigTestResult 135 | -------------------------------------------------------------------------------- /tck/src/main/java/ee/jakarta/tck/annotations/signaturetest/SignatureTestDriverFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. 3 | * 4 | * This program and the accompanying materials are made available under the 5 | * terms of the Eclipse Public License v. 2.0, which is available at 6 | * http://www.eclipse.org/legal/epl-2.0. 7 | * 8 | * This Source Code may also be made available under the following Secondary 9 | * Licenses when the conditions for such availability set forth in the 10 | * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | * version 2 with the GNU Classpath Exception, which is available at 12 | * https://www.gnu.org/software/classpath/license.html. 13 | * 14 | * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | */ 16 | 17 | /* 18 | * $Id$ 19 | */ 20 | 21 | package ee.jakarta.tck.annotations.signaturetest; 22 | 23 | /** 24 | *

25 | * Factory to obtain SignatureTestDriver implementations. 26 | *

27 | */ 28 | public class SignatureTestDriverFactory { 29 | 30 | /** 31 | *

32 | * Identifier for the driver that uses API Check to perform signature 33 | * validation. 34 | *

35 | */ 36 | public static final String API_CHECK = "apicheck"; 37 | 38 | /** 39 | *

40 | * Identifier for the driver that uses the Signature Test framwork for 41 | * signature validation. 42 | *

43 | */ 44 | public static final String SIG_TEST = "sigtest"; 45 | 46 | // ------------------------------------------------------------ Constructors 47 | 48 | // Access via factory method 49 | private SignatureTestDriverFactory() { 50 | } // END SignatureTestDriverFactory 51 | 52 | // ---------------------------------------------------------- Public Methods 53 | 54 | /** 55 | *

56 | * Obtain a {@link SignatureTestDriver} instance based on the 57 | * type argument. 58 | * 59 | * @param type 60 | * the driver type to create 61 | * @return a {@link SignatureTestDriver} implementation 62 | */ 63 | public static SignatureTestDriver getInstance(String type) { 64 | 65 | if (type == null || type.length() == 0) { 66 | throw new IllegalArgumentException("Type was null or empty"); 67 | } 68 | 69 | if (SIG_TEST.equals(type)) { 70 | return new SigTestDriver(); 71 | } else { 72 | throw new IllegalArgumentException("Unknown Type: '" + type + '\''); 73 | } 74 | 75 | } // END getInstance 76 | 77 | } // END SignatureTestDriverFactory 78 | -------------------------------------------------------------------------------- /tck/src/main/resources/LICENSE_EFTL.md: -------------------------------------------------------------------------------- 1 | # Eclipse Foundation Technology Compatibility Kit License - v 1.0 2 | 3 | Copyright (c) 2018, Eclipse Foundation, Inc. and its licensors. 4 | 5 | Redistribution and use in binary form is permitted provided that the 6 | following conditions are met: 7 | 8 | 1. Use of the Technology Compatibility Kit accompanying this license 9 | (the "TCK") and its documentation is permitted solely for the 10 | purpose of testing compatibility of an implementation (the 11 | "Product") of a specification (the "Specification") made available 12 | by the Eclipse Foundation, Inc. ("Eclipse"). 13 | 14 | 2. Only those modifications expressly permitted by the TCK and its 15 | documentation are permitted. Except in these limited circumstances, 16 | no modifications to the TCK are permitted under this license. 17 | 18 | 3. A Product will be deemed to be "compatible" with the Specification 19 | if it fully and completely meets and satisfies all requirements of 20 | the TCK. 21 | 22 | 4. Before any claim of compatibility (or any similar claim suggesting 23 | compatibility) is made based on the TCK, the testing party must: 24 | 25 | a. use the TCK to demonstrate that the Product fully and 26 | completely meets and satisfies all requirements of the TCK; 27 | 28 | b. make TCK test results showing full and complete satisfaction of 29 | all requirements of the TCK publicly available on the testing 30 | party's website and send a link to such test results to Eclipse 31 | at [tck@eclipse.org](mailto:tck@eclipse.org); and 32 | 33 | c. comply with any requirements stated in the Specification with 34 | regard to subsetting, supersetting, modifying or extending the 35 | Specification in any Product claimed to be compatible with the 36 | Specification. 37 | 38 | 5. The test results must be continuously available and the link must 39 | be live for at least as long as the Product is available in the 40 | marketplace. 41 | 42 | 6. The TCK may not be used as a basis for any statements of partial 43 | compatibility. The TCK may only be used as a basis for true, 44 | factual statements of full compatibility of Products that fully 45 | meet and satisfy all requirements of the TCK. 46 | 47 | 7. A determination that a Product is compatible with the TCK does not, 48 | in itself, give rise to the right to use any name, mark, logo 49 | associated with the TCK, Eclipse, or Eclipse's contributors or 50 | licensors. 51 | 52 | 8. Upon the request of Eclipse, a tester will retract any statements 53 | of compatibility (or any similar claim suggesting compatibility) 54 | which Eclipse reasonably determines to be false or misleading or in 55 | violation of the terms of this license. 56 | 57 | 9. Redistribution of the TCK must be under this Eclipse Foundation 58 | Technology Compatibility Kit License and must reproduce the above 59 | copyright notice, this list of conditions and the following 60 | disclaimer in the documentation and/or other materials provided 61 | with the distribution. 62 | 63 | 10. Neither the name, trademarks or logos of Eclipse, nor the names, 64 | trademarks or logos of its contributors or licensors may be used to 65 | endorse or promote products tested with this software without 66 | specific prior written permission. 67 | 68 | 11. The source code for the TCK accompanying this license is available 69 | from Eclipse. 70 | 71 | TO THE EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED ON 72 | AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER 73 | EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR 74 | CONDITIONS OF TITLE, NON- INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR 75 | A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY APPLICABLE LAW, 76 | NEITHER THE COPYRIGHT OWNER OR ANY CONTRIBUTORS SHALL HAVE ANY 77 | LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 78 | CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), 79 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 80 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 81 | IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE 82 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE 83 | POSSIBILITY OF SUCH DAMAGES. 84 | -------------------------------------------------------------------------------- /tck/src/main/resources/ee/jakarta/tck/annotations/signaturetest/sig-test-pkg-list.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0, which is available at 6 | # http://www.eclipse.org/legal/epl-2.0. 7 | # 8 | # This Source Code may also be made available under the following Secondary 9 | # Licenses when the conditions for such availability set forth in the 10 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | # version 2 with the GNU Classpath Exception, which is available at 12 | # https://www.gnu.org/software/classpath/license.html. 13 | # 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | # 16 | 17 | ## 18 | # This file contains a list of all the packages 19 | # contained in the signature files for this 20 | # deliverable. This file is used to exclude valid 21 | # sub-packages from being verified when their 22 | # parent package's signature is checked. 23 | ## 24 | jakarta.annotation 25 | jakarta.annotation.security 26 | jakarta.annotation.sql 27 | -------------------------------------------------------------------------------- /tck/src/main/resources/ee/jakarta/tck/annotations/signaturetest/sig-test.map: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved. 3 | # 4 | # This program and the accompanying materials are made available under the 5 | # terms of the Eclipse Public License v. 2.0, which is available at 6 | # http://www.eclipse.org/legal/epl-2.0. 7 | # 8 | # This Source Code may also be made available under the following Secondary 9 | # Licenses when the conditions for such availability set forth in the 10 | # Eclipse Public License v. 2.0 are satisfied: GNU General Public License, 11 | # version 2 with the GNU Classpath Exception, which is available at 12 | # https://www.gnu.org/software/classpath/license.html. 13 | # 14 | # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 15 | # 16 | jakarta.annotation=3.0 17 | --------------------------------------------------------------------------------