Skip to content

Commit

Permalink
Merge pull request #276 from KyleAure/267-milestone-signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAure authored Oct 18, 2023
2 parents 31df11b + 79af223 commit 5832a0b
Show file tree
Hide file tree
Showing 4 changed files with 256 additions and 194 deletions.
31 changes: 29 additions & 2 deletions tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
</arguments>
</configuration>
</plugin>

<!-- Run signature plugin to generate signature file -->
<plugin>
<groupId>org.netbeans.tools</groupId>
Expand All @@ -275,6 +275,7 @@
<executions>
<execution>
<id>createSigFile</id>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
Expand All @@ -286,12 +287,38 @@
<packages>
jakarta.data,
jakarta.data.exceptions,
jakarta.data.page,
jakarta.data.repository
</packages>
<attach>false</attach>
<sigfile>${project.build.directory}/jakarta.data.sig_${project.version}</sigfile>
<sigfile>${project.build.directory}/jakarta.data.sig_${java.version}</sigfile>
</configuration>
</plugin>

<!-- Copy signature file to tck resources with major java version -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copySigFile</id>
<phase>process-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<mkdir dir="${project.basedir}/src/main/resources/ee/jakarta/tck/data/framework/signature/"/>
<copy todir="${project.basedir}/src/main/resources/ee/jakarta/tck/data/framework/signature/">
<fileset dir="${project.build.directory}" includes="jakarta.data.sig_${java.version}"/>
<mapper from="^(jakarta.data.sig_[0-9]+)" to="\1" type="regexp"/>
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down
52 changes: 28 additions & 24 deletions tck/src/main/java/ee/jakarta/tck/data/framework/signature/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This package is inherited from the Platform-TCK (https://github.com/eclipse-ee4j/jakartaee-tck/tree/master/src/com/sun/ts/tests/signaturetest)

The latest signature files are updated in the Jakarta Data TCK Repository
(data/tck/src/main/resources/ee/jakarta/tck/data/signature)
(data/tck/src/main/resources/ee/jakarta/tck/data/framework/signature)
generated using sigtest-maven-plugin.jar (version 1.6).

The signature tests are run using the sigtest-maven-plugin.jar and the framework available in this folder.
Expand All @@ -18,28 +18,33 @@ The plugin that generates the signature file has been copied below for reference


```xml
<plugin>
<!-- Run signature plugin to generate signature file -->
<plugin>
<groupId>org.netbeans.tools</groupId>
<artifactId>sigtest-maven-plugin</artifactId>
<version>${sigtest.version}</version>
<executions>
<execution>
<id>createSigFile</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
<execution>
<id>createSigFile</id>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<classes>${project.build.directory}/jakarta-data-api</classes>
<packages>
jakarta.data,
jakarta.data.repository
</packages>
<attach>false</attach>
<sigfile>${project.build.directory}/jakarta.data.sig_${project.version}</sigfile>
<classes>${project.build.directory}/jakarta-data-api</classes>
<classes>${project.build.directory}/jimage/java.base</classes><classes>${project.build.directory}/jimage/java.base</classes>
<packages>
jakarta.data,
jakarta.data.exceptions,
jakarta.data.page,
jakarta.data.repository
</packages>
<attach>false</attach>
<sigfile>${project.build.directory}/jakarta.data.sig_${java.version}</sigfile>
</configuration>
</plugin>
</plugin>
```

- The `classes` configuration points to a location where an earlier plugin has unpacked the api jar from which we are generating the signature file.
Expand All @@ -49,24 +54,23 @@ The plugin that generates the signature file has been copied below for reference

### Generating the Signature File

To generate the signature file go to the TCK project:
To generate the signature file first build the API:

```sh
cd tck
cd api
mvn package
```

Use Maven to build the TCK and run the custom profile to generate the signature file:
Then build the TCK with the `signature-generation` profile to re-generate the signature file:

```sh
mvn install -Psignature-generation
cd ../tck
mvn package -Psignature-generation
```

The signature file will be generated in the `/target/` directory.

The signature file name expected is `jakarta.data.sig_${version}`, where version is the api version from which the signature was generated.

Copy the signature file to the TCK so that it can be used by the test project, and checked into version control.
`src/main/resources/ee/jakarta/tck/data/signature`
The signature file will be automatically copied to the `/src/main/resource/ee/jakarta/tck/data/framework/signature/` directory.

## For TCK users

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,47 @@
#Signature file v4.1
#Version 1.0.0-SNAPSHOT

CLSS public final !enum jakarta.data.Direction
fld public final static jakarta.data.Direction ASC
fld public final static jakarta.data.Direction DESC
meth public static jakarta.data.Direction valueOf(java.lang.String)
meth public static jakarta.data.Direction[] values()
supr java.lang.Enum<jakarta.data.Direction>

CLSS public final jakarta.data.Limit
cons public init(int,long)
meth public final boolean equals(java.lang.Object)
meth public final int hashCode()
meth public final java.lang.String toString()
meth public int maxResults()
meth public long startAt()
meth public static jakarta.data.Limit of(int)
meth public static jakarta.data.Limit range(long,long)
supr java.lang.Record
hfds DEFAULT_START_AT,maxResults,startAt

CLSS public final jakarta.data.Sort
cons public init(java.lang.String,boolean,boolean)
meth public boolean ignoreCase()
meth public boolean isAscending()
meth public boolean isDescending()
meth public final boolean equals(java.lang.Object)
meth public final int hashCode()
meth public final java.lang.String toString()
meth public java.lang.String property()
meth public static jakarta.data.Sort asc(java.lang.String)
meth public static jakarta.data.Sort ascIgnoreCase(java.lang.String)
meth public static jakarta.data.Sort desc(java.lang.String)
meth public static jakarta.data.Sort descIgnoreCase(java.lang.String)
meth public static jakarta.data.Sort of(java.lang.String,jakarta.data.Direction,boolean)
supr java.lang.Record
hfds ignoreCase,isAscending,property

CLSS public abstract interface jakarta.data.Streamable<%0 extends java.lang.Object>
anno 0 java.lang.FunctionalInterface()
intf java.lang.Iterable<{jakarta.data.Streamable%0}>
meth public java.util.stream.Stream<{jakarta.data.Streamable%0}> stream()

CLSS public jakarta.data.exceptions.DataConnectionException
cons public init(java.lang.String)
cons public init(java.lang.String,java.lang.Throwable)
Expand All @@ -22,6 +63,13 @@ cons public init(java.lang.Throwable)
supr jakarta.data.exceptions.DataException
hfds serialVersionUID

CLSS public jakarta.data.exceptions.EntityExistsException
cons public init(java.lang.String)
cons public init(java.lang.String,java.lang.Throwable)
cons public init(java.lang.Throwable)
supr jakarta.data.exceptions.DataException
hfds serialVersionUID

CLSS public jakarta.data.exceptions.MappingException
cons public init(java.lang.String)
cons public init(java.lang.String,java.lang.Throwable)
Expand All @@ -47,30 +95,6 @@ CLSS abstract interface jakarta.data.exceptions.package-info

CLSS abstract interface jakarta.data.package-info

CLSS public abstract interface jakarta.data.repository.BasicRepository<%0 extends java.lang.Object, %1 extends java.lang.Object>
intf jakarta.data.repository.DataRepository<{jakarta.data.repository.BasicRepository%0},{jakarta.data.repository.BasicRepository%1}>
meth public abstract <%0 extends {jakarta.data.repository.BasicRepository%0}> java.lang.Iterable<{%%0}> saveAll(java.lang.Iterable<{%%0}>)
meth public abstract <%0 extends {jakarta.data.repository.BasicRepository%0}> {%%0} save({%%0})
meth public abstract boolean existsById({jakarta.data.repository.BasicRepository%1})
meth public abstract java.util.Optional<{jakarta.data.repository.BasicRepository%0}> findById({jakarta.data.repository.BasicRepository%1})
meth public abstract java.util.stream.Stream<{jakarta.data.repository.BasicRepository%0}> findAll()
meth public abstract java.util.stream.Stream<{jakarta.data.repository.BasicRepository%0}> findByIdIn(java.lang.Iterable<{jakarta.data.repository.BasicRepository%1}>)
meth public abstract long count()
meth public abstract void delete({jakarta.data.repository.BasicRepository%0})
meth public abstract void deleteAll()
meth public abstract void deleteAll(java.lang.Iterable<? extends {jakarta.data.repository.BasicRepository%0}>)
meth public abstract void deleteById({jakarta.data.repository.BasicRepository%1})
meth public abstract void deleteByIdIn(java.lang.Iterable<{jakarta.data.repository.BasicRepository%1}>)

CLSS public abstract interface jakarta.data.repository.DataRepository<%0 extends java.lang.Object, %1 extends java.lang.Object>

CLSS public final !enum jakarta.data.Direction
fld public final static jakarta.data.Direction ASC
fld public final static jakarta.data.Direction DESC
meth public static jakarta.data.Direction valueOf(java.lang.String)
meth public static jakarta.data.Direction[] values()
supr java.lang.Enum<jakarta.data.Direction>

CLSS public abstract interface jakarta.data.page.KeysetAwarePage<%0 extends java.lang.Object>
intf jakarta.data.page.KeysetAwareSlice<{jakarta.data.page.KeysetAwarePage%0}>
intf jakarta.data.page.Page<{jakarta.data.page.KeysetAwarePage%0}>
Expand All @@ -81,35 +105,6 @@ meth public abstract jakarta.data.page.Pageable nextPageable()
meth public abstract jakarta.data.page.Pageable previousPageable()
meth public abstract jakarta.data.page.Pageable$Cursor getKeysetCursor(int)

CLSS public final jakarta.data.Limit
cons public init(int,long)
meth public final boolean equals(java.lang.Object)
meth public final int hashCode()
meth public final java.lang.String toString()
meth public int maxResults()
meth public long startAt()
meth public static jakarta.data.Limit of(int)
meth public static jakarta.data.Limit range(long,long)
supr java.lang.Record
hfds DEFAULT_START_AT,maxResults,startAt

CLSS public abstract interface !annotation jakarta.data.repository.OrderBy
anno 0 java.lang.annotation.Repeatable(java.lang.Class<? extends java.lang.annotation.Annotation> value=class jakarta.data.repository.OrderBy$List)
anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
innr public abstract interface static !annotation List
intf java.lang.annotation.Annotation
meth public abstract !hasdefault boolean descending()
meth public abstract !hasdefault boolean ignoreCase()
meth public abstract java.lang.String value()

CLSS public abstract interface static !annotation jakarta.data.repository.OrderBy$List
outer jakarta.data.repository.OrderBy
anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
intf java.lang.annotation.Annotation
meth public abstract jakarta.data.repository.OrderBy[] value()

CLSS public abstract interface jakarta.data.page.Page<%0 extends java.lang.Object>
intf jakarta.data.page.Slice<{jakarta.data.page.Page%0}>
meth public abstract long totalElements()
Expand Down Expand Up @@ -153,6 +148,57 @@ meth public static jakarta.data.page.Pageable$Mode valueOf(java.lang.String)
meth public static jakarta.data.page.Pageable$Mode[] values()
supr java.lang.Enum<jakarta.data.page.Pageable$Mode>

CLSS public abstract interface jakarta.data.page.Slice<%0 extends java.lang.Object>
intf jakarta.data.Streamable<{jakarta.data.page.Slice%0}>
meth public abstract boolean hasContent()
meth public abstract int numberOfElements()
meth public abstract jakarta.data.page.Pageable nextPageable()
meth public abstract jakarta.data.page.Pageable pageable()
meth public abstract java.util.List<{jakarta.data.page.Slice%0}> content()

CLSS abstract interface jakarta.data.page.package-info

CLSS public abstract interface jakarta.data.repository.BasicRepository<%0 extends java.lang.Object, %1 extends java.lang.Object>
intf jakarta.data.repository.DataRepository<{jakarta.data.repository.BasicRepository%0},{jakarta.data.repository.BasicRepository%1}>
meth public abstract <%0 extends {jakarta.data.repository.BasicRepository%0}> java.lang.Iterable<{%%0}> saveAll(java.lang.Iterable<{%%0}>)
meth public abstract <%0 extends {jakarta.data.repository.BasicRepository%0}> {%%0} save({%%0})
meth public abstract boolean existsById({jakarta.data.repository.BasicRepository%1})
meth public abstract java.util.Optional<{jakarta.data.repository.BasicRepository%0}> findById({jakarta.data.repository.BasicRepository%1})
meth public abstract java.util.stream.Stream<{jakarta.data.repository.BasicRepository%0}> findAll()
meth public abstract java.util.stream.Stream<{jakarta.data.repository.BasicRepository%0}> findByIdIn(java.lang.Iterable<{jakarta.data.repository.BasicRepository%1}>)
meth public abstract long count()
meth public abstract void delete({jakarta.data.repository.BasicRepository%0})
meth public abstract void deleteAll()
meth public abstract void deleteAll(java.lang.Iterable<? extends {jakarta.data.repository.BasicRepository%0}>)
meth public abstract void deleteById({jakarta.data.repository.BasicRepository%1})
meth public abstract void deleteByIdIn(java.lang.Iterable<{jakarta.data.repository.BasicRepository%1}>)

CLSS public abstract interface jakarta.data.repository.CrudRepository<%0 extends java.lang.Object, %1 extends java.lang.Object>
intf jakarta.data.repository.BasicRepository<{jakarta.data.repository.CrudRepository%0},{jakarta.data.repository.CrudRepository%1}>
meth public abstract boolean update({jakarta.data.repository.CrudRepository%0})
meth public abstract int updateAll(java.lang.Iterable<{jakarta.data.repository.CrudRepository%0}>)
meth public abstract void insert({jakarta.data.repository.CrudRepository%0})
meth public abstract void insertAll(java.lang.Iterable<{jakarta.data.repository.CrudRepository%0}>)

CLSS public abstract interface jakarta.data.repository.DataRepository<%0 extends java.lang.Object, %1 extends java.lang.Object>

CLSS public abstract interface !annotation jakarta.data.repository.OrderBy
anno 0 java.lang.annotation.Repeatable(java.lang.Class<? extends java.lang.annotation.Annotation> value=class jakarta.data.repository.OrderBy$List)
anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
innr public abstract interface static !annotation List
intf java.lang.annotation.Annotation
meth public abstract !hasdefault boolean descending()
meth public abstract !hasdefault boolean ignoreCase()
meth public abstract java.lang.String value()

CLSS public abstract interface static !annotation jakarta.data.repository.OrderBy$List
outer jakarta.data.repository.OrderBy
anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME)
anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[METHOD])
intf java.lang.annotation.Annotation
meth public abstract jakarta.data.repository.OrderBy[] value()

CLSS public abstract interface jakarta.data.repository.PageableRepository<%0 extends java.lang.Object, %1 extends java.lang.Object>
intf jakarta.data.repository.BasicRepository<{jakarta.data.repository.PageableRepository%0},{jakarta.data.repository.PageableRepository%1}>
meth public abstract jakarta.data.page.Page<{jakarta.data.repository.PageableRepository%0}> findAll(jakarta.data.page.Pageable)
Expand Down Expand Up @@ -180,36 +226,6 @@ intf java.lang.annotation.Annotation
meth public abstract !hasdefault java.lang.String dataStore()
meth public abstract !hasdefault java.lang.String provider()

CLSS public abstract interface jakarta.data.page.Slice<%0 extends java.lang.Object>
intf jakarta.data.Streamable<{jakarta.data.page.Slice%0}>
meth public abstract boolean hasContent()
meth public abstract int numberOfElements()
meth public abstract jakarta.data.page.Pageable nextPageable()
meth public abstract jakarta.data.page.Pageable pageable()
meth public abstract java.util.List<{jakarta.data.page.Slice%0}> content()

CLSS public final jakarta.data.Sort
cons public init(java.lang.String,boolean,boolean)
meth public boolean ignoreCase()
meth public boolean isAscending()
meth public boolean isDescending()
meth public final boolean equals(java.lang.Object)
meth public final int hashCode()
meth public final java.lang.String toString()
meth public java.lang.String property()
meth public static jakarta.data.Sort asc(java.lang.String)
meth public static jakarta.data.Sort ascIgnoreCase(java.lang.String)
meth public static jakarta.data.Sort desc(java.lang.String)
meth public static jakarta.data.Sort descIgnoreCase(java.lang.String)
meth public static jakarta.data.Sort of(java.lang.String,jakarta.data.Direction,boolean)
supr java.lang.Record
hfds ignoreCase,isAscending,property

CLSS public abstract interface jakarta.data.Streamable<%0 extends java.lang.Object>
anno 0 java.lang.FunctionalInterface()
intf java.lang.Iterable<{jakarta.data.Streamable%0}>
meth public java.util.stream.Stream<{jakarta.data.Streamable%0}> stream()

CLSS abstract interface jakarta.data.repository.package-info

CLSS public abstract interface java.io.Serializable
Expand Down Expand Up @@ -309,8 +325,7 @@ meth public void printStackTrace(java.io.PrintStream)
meth public void printStackTrace(java.io.PrintWriter)
meth public void setStackTrace(java.lang.StackTraceElement[])
supr java.lang.Object
hfds CAUSE_CAPTION,EMPTY_THROWABLE_ARRAY,NULL_CAUSE_MESSAGE,SELF_SUPPRESSION_MESSAGE,SUPPRESSED_CAPTION,SUPPRESSED_SENTINEL,UNASSIGNED_STACK,backtrace,cause,depth,detailMessage,serialVersionUID,stackTrace,suppressedExceptions
hcls PrintStreamOrWriter,SentinelHolder,WrappedPrintStream,WrappedPrintWriter
hfds ZeroElementArray,ZeroStackTraceElementArray,cause,detailMessage,disableWritableStackTrace,serialVersionUID,stackTrace,suppressedExceptions,walkback

CLSS public abstract interface java.lang.annotation.Annotation
meth public abstract boolean equals(java.lang.Object)
Expand Down
Loading

0 comments on commit 5832a0b

Please sign in to comment.