Skip to content

Commit

Permalink
Transformation of the maven plugin to the annotation processor
Browse files Browse the repository at this point in the history
- Original config-generator was a maven plugin
- Now it is an annotation processor attached to the maven-compiler-plugin
- The tiger-types was originally developed by Koshuke and it has further
  evolution elsewhere, however gets obsoleted. So I removed classes which
  are same in HK2, remained just a smaller package which we still need.
  It may attract further attention later.
- This commit was squashed because the original PR contained some unnecessary
  steps which would just add more confusion.

commit 78e10e6c7d950f3d7892857acd56d0ee651e9e72
Author: David Matějček <david.matejcek@omnifish.ee>
Date:   Sat Apr 29 02:09:52 2023 +0200

    Annotation processing moved back to glassfish

    - maven plugin replaced with compiler annotation processing
      - it is faster and more reliable
    - tiger types were reintegrated back except classes already available

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>

commit 9cc9d2b3967786c2e25606106657076eb7f2325b
Author: David Matějček <david.matejcek@omnifish.ee>
Date:   Sat Apr 29 00:13:04 2023 +0200

    Tiger types moved from GlassFish to glassfish-hk2-config - temporary solution

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>

commit 6845b609cc6badb68e2ede46df5661352b8d5aef
Author: David Matějček <david.matejcek@omnifish.ee>
Date:   Fri Apr 28 21:14:08 2023 +0200

    Using old tiger types

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>

commit 393915c384ef237216896936be88bf0c4f5b2511
Author: David Matějček <david.matejcek@omnifish.ee>
Date:   Fri Apr 28 19:38:16 2023 +0200

    Reflecting commit Refactoring of hk2 class generators of the maven plugin

    - Fixed reported errors OR skipped execution where it would generate nothing

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>

commit 4304fd2c18985d5572ee4a9b770027f14e1668b9
Author: David Matějček <david.matejcek@omnifish.ee>
Date:   Fri Apr 28 14:28:04 2023 +0200

    First step - migrated hk2 goals and dependencies to glassfishbuild-maven-plugin

    - Passed GlassFish tests

    Signed-off-by: David Matějček <david.matejcek@omnifish.ee>

Signed-off-by: David Matějček <david.matejcek@omnifish.ee>
  • Loading branch information
dmatej committed May 3, 2023
1 parent 104dd6e commit 48436b8
Show file tree
Hide file tree
Showing 174 changed files with 1,632 additions and 2,948 deletions.
5 changes: 2 additions & 3 deletions appserver/admingui/gf-admingui-connector/pom.xml
Expand Up @@ -44,9 +44,8 @@
<artifactId>hk2-core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.common</groupId>
Expand Down
2 changes: 2 additions & 0 deletions appserver/appclient/client/acc-config/pom.xml
Expand Up @@ -56,6 +56,8 @@
<config-dtd-file>*-application-client-container*.dtd</config-dtd-file>
<added-test-classpath>${project.basedir}/${extracted-dtd-root}</added-test-classpath>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<!-- We don't need it here and it would fail -->
<glassfish.generate-injectors.skip>true</glassfish.generate-injectors.skip>
</properties>

<dependencies>
Expand Down
5 changes: 2 additions & 3 deletions appserver/batch/glassfish-batch-connector/pom.xml
Expand Up @@ -53,9 +53,8 @@
<artifactId>concurrent-connector</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
</dependencies>
</project>
5 changes: 2 additions & 3 deletions appserver/concurrent/concurrent-connector/pom.xml
Expand Up @@ -42,9 +42,8 @@
<artifactId>hk2</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.common</groupId>
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation
* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
* Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand All @@ -21,6 +21,7 @@
import java.util.List;

import org.jvnet.hk2.config.Attribute;
import org.jvnet.hk2.config.ConfigBeanProxy;
import org.jvnet.hk2.config.Configured;
import org.jvnet.hk2.config.Element;
import org.jvnet.hk2.config.types.Property;
Expand All @@ -30,7 +31,7 @@
* Concurrency resource base class
*/
@Configured
public interface ConcurrencyResource extends PropertyBag {
public interface ConcurrencyResource extends PropertyBag, ConfigBeanProxy {

/**
* Gets the value of the contextInfoEnabled property.
Expand Down
5 changes: 2 additions & 3 deletions appserver/ejb/ejb-container/pom.xml
Expand Up @@ -89,9 +89,8 @@
<artifactId>hk2-core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.security</groupId>
Expand Down
11 changes: 2 additions & 9 deletions appserver/extras/embedded/all/pom.xml
Expand Up @@ -528,9 +528,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -1429,12 +1428,6 @@
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>tiger-types</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.exousia</groupId>
<artifactId>exousia</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions appserver/extras/embedded/nucleus/pom.xml
Expand Up @@ -79,9 +79,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down
Expand Up @@ -402,9 +402,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -1023,7 +1022,7 @@
<version>${project.version}</version>
<optional>true</optional>
</dependency>

<!-- Jakarta Pages and Jakarta Pages Standard Tags -->
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
Expand Down
21 changes: 7 additions & 14 deletions appserver/extras/embedded/web/pom.xml
Expand Up @@ -86,9 +86,8 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -979,7 +978,7 @@
<version>${project.version}</version>
<optional>true</optional>
</dependency>

<!-- Jakarta Pages and Jakarta Pages Standard Tags -->
<dependency>
<groupId>jakarta.servlet.jsp</groupId>
Expand All @@ -996,7 +995,7 @@
<artifactId>wasp</artifactId>
<optional>true</optional>
</dependency>

<!-- Jakarta Expression Language -->
<dependency>
<groupId>jakarta.el</groupId>
Expand All @@ -1008,7 +1007,7 @@
<artifactId>expressly</artifactId>
<optional>true</optional>
</dependency>

<!-- Jakarta WebSocket -->
<dependency>
<groupId>jakarta.websocket</groupId>
Expand Down Expand Up @@ -1060,7 +1059,7 @@
<artifactId>tyrus-container-glassfish-ejb</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.glassfish.main.security</groupId>
<artifactId>websecurity</artifactId>
Expand All @@ -1087,7 +1086,7 @@
<artifactId>jakarta.security.enterprise-api</artifactId>
<optional>true</optional>
</dependency>

<!-- glassfish-cdi -->
<dependency>
<groupId>jakarta.enterprise</groupId>
Expand Down Expand Up @@ -1339,12 +1338,6 @@
<artifactId>shoal-gms-impl</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>tiger-types</artifactId>
<version>${project.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.main</groupId>
<artifactId>glassfish-jul-extension</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions appserver/jdbc/jdbc-config/pom.xml
Expand Up @@ -43,9 +43,8 @@
<artifactId>hk2</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.common</groupId>
Expand Down
5 changes: 2 additions & 3 deletions appserver/jms/gf-jms-connector/pom.xml
Expand Up @@ -51,9 +51,8 @@
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
</dependencies>

Expand Down
5 changes: 5 additions & 0 deletions appserver/ldapbp/pom.xml
Expand Up @@ -32,6 +32,11 @@

<name>LDAP Booster Pack</name>

<properties>
<!-- We don't need it here and it would fail -->
<glassfish.generate-injectors.skip>true</glassfish.generate-injectors.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.corba</groupId>
Expand Down
2 changes: 2 additions & 0 deletions appserver/persistence/cmp/support-ejb/pom.xml
Expand Up @@ -46,6 +46,8 @@

<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<!-- We don't need it here and it would fail -->
<glassfish.generate-injectors.skip>true</glassfish.generate-injectors.skip>
</properties>

<dependencies>
Expand Down
2 changes: 2 additions & 0 deletions appserver/persistence/cmp/support-sqlstore/pom.xml
Expand Up @@ -46,6 +46,8 @@

<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<!-- We don't need it here and it would fail -->
<glassfish.generate-injectors.skip>true</glassfish.generate-injectors.skip>
</properties>

<dependencies>
Expand Down
5 changes: 2 additions & 3 deletions appserver/security/webservices.security/pom.xml
Expand Up @@ -65,9 +65,8 @@
</dependency>

<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.core</groupId>
Expand Down
5 changes: 2 additions & 3 deletions appserver/webservices/connector/pom.xml
Expand Up @@ -46,9 +46,8 @@
<artifactId>hk2-core</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.hk2</groupId>
<artifactId>hk2-config</artifactId>
<version>${project.version}</version>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.main.common</groupId>
Expand Down
1 change: 0 additions & 1 deletion nucleus/admin/config-api/osgi.bundle
Expand Up @@ -18,7 +18,6 @@
# work around bug in 'bnd' and hk2 where wrongly exported hk2 version is chosen of tiger_types
Import-Package: \
org.glassfish.api.monitoring, \
org.jvnet.tiger_types;version=${project.version}, \
*

-exportcontents: \
Expand Down
27 changes: 27 additions & 0 deletions nucleus/admin/config-api/pom.xml
Expand Up @@ -114,6 +114,33 @@
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>generate-test-hk2-config</id>
<phase>generate-test-sources</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.glassfish.main</groupId>
<artifactId>hk2-config-generator</artifactId>
<version>${project.version}</version>
</path>
</annotationProcessorPaths>
<annotationProcessors>
<annotationProcessor>org.jvnet.hk2.config.generator.ConfigInjectorGenerator</annotationProcessor>
</annotationProcessors>
<proc>only</proc>
<generatedTestSourcesDirectory>${project.build.directory}/generated-test-sources/hk2-config-generator</generatedTestSourcesDirectory>
<createMissingPackageInfoClass>false</createMissingPackageInfoClass>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
Expand Down

0 comments on commit 48436b8

Please sign in to comment.