Skip to content

Commit

Permalink
4.x: Use Helidon copyright module for generated code (helidon-io#7192)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
  • Loading branch information
jbescos authored and dalexandrov committed Aug 9, 2023
1 parent 7220d91 commit c6055b6
Show file tree
Hide file tree
Showing 26 changed files with 265 additions and 3 deletions.
10 changes: 10 additions & 0 deletions builder/tests/builder/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -105,6 +110,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions common/configurable/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -117,6 +122,11 @@
<artifactId>helidon-config-metadata-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions common/key-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -100,6 +105,11 @@
<artifactId>helidon-config-metadata-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions common/socket/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -89,6 +94,11 @@
<artifactId>helidon-config-metadata-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions config/config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@
<artifactId>helidon-inject-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -152,6 +157,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
Expand Down
17 changes: 17 additions & 0 deletions config/tests/service-registry/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,25 @@
<artifactId>helidon-inject-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
<dependency>
<groupId>io.helidon.inject</groupId>
<artifactId>helidon-inject-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
10 changes: 10 additions & 0 deletions inject/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -102,6 +107,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions inject/configdriven/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -68,6 +73,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions inject/configdriven/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -106,6 +111,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions inject/configdriven/tests/config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -127,6 +132,11 @@
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions inject/configdriven/tests/configuredby-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -126,6 +131,11 @@
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
Expand Down
10 changes: 10 additions & 0 deletions inject/configdriven/tests/configuredby/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -141,6 +146,11 @@
<artifactId>helidon-inject-configdriven-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
10 changes: 10 additions & 0 deletions inject/processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
Expand All @@ -77,6 +82,11 @@
<artifactId>helidon-builder-processor</artifactId>
<version>${helidon.version}</version>
</dependency>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Expand Down
5 changes: 5 additions & 0 deletions inject/tests/interception/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
<artifactId>helidon-inject-processor</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Expand Down
12 changes: 12 additions & 0 deletions inject/tests/resources-inject/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,20 @@
<artifactId>helidon-inject-tests-resources-plain</artifactId>
<version>${helidon.version}</version>
</path>
<path>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
<dependencies>
<dependency>
<groupId>io.helidon.common.processor</groupId>
<artifactId>helidon-common-processor-helidon-copyright</artifactId>
<version>${helidon.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.helidon.inject</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.Closeable;
import java.io.File;
import java.nio.file.Files;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -90,8 +91,10 @@ void createNoArgBasedInterceptorSource() throws Exception {
File file = new File("./target/generated-sources/annotations", path);
assertThat(file.exists(), is(true));
String java = Files.readString(file.toPath());
assertEquals(loadStringFromResource("expected/ximpl-interceptor._java_"),
java);
String expected = loadStringFromResource("expected/ximpl-interceptor._java_");
assertEquals(
expected.replaceFirst("#DATE#", Integer.toString(Calendar.getInstance().get(Calendar.YEAR))),
java);
}

@Disabled // will be handled in https://github.com/helidon-io/helidon/issues/6542
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
// This is a generated file (powered by Helidon). Do not edit or extend from this artifact as it is subject to change at any time!
/*
* Copyright (c) #DATE# Oracle and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


package io.helidon.inject.tests.inject.interceptor;

Expand Down
Loading

0 comments on commit c6055b6

Please sign in to comment.