You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by nt...@apache.org on 2022/11/18 06:39:39 UTC
[cayenne] branch master updated: Add missing license headers
This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push:
new 3ffce1884 Add missing license headers
3ffce1884 is described below
commit 3ffce18844e39e3801e6174929e71eda6d25efb9
Author: Nikita Timofeev <st...@gmail.com>
AuthorDate: Fri Nov 18 09:39:28 2022 +0300
Add missing license headers
---
.../cayenne/di/spi/CircularModuleProvider.java | 22 ++++++++++++++++++++++
.../cayenne/project/ProjectModuleExtender.java | 19 +++++++++++++++++++
.../upgrade/handlers/UpgradeHandler_V11Test.java | 21 ++++++++++++++++++++-
.../project/upgrade/handlers/test-map-v10.map.xml | 6 +++---
.../project/upgrade/handlers/velocityTemplate.txt | 1 -
.../project/upgrade/handlers/velocityTemplate.vm | 17 +++++++++++++++++
6 files changed, 81 insertions(+), 5 deletions(-)
diff --git a/cayenne-di/src/test/java/org/apache/cayenne/di/spi/CircularModuleProvider.java b/cayenne-di/src/test/java/org/apache/cayenne/di/spi/CircularModuleProvider.java
index 1841c3821..578788c8d 100644
--- a/cayenne-di/src/test/java/org/apache/cayenne/di/spi/CircularModuleProvider.java
+++ b/cayenne-di/src/test/java/org/apache/cayenne/di/spi/CircularModuleProvider.java
@@ -1,4 +1,26 @@
+/*****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://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
+ * "AS IS" 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 org.apache.cayenne.di.spi;
+/**
+ * @since 5.0
+ */
public interface CircularModuleProvider extends ModuleProvider {
}
diff --git a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleExtender.java b/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleExtender.java
index de9c3aca8..4ddc29f66 100644
--- a/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleExtender.java
+++ b/cayenne-project/src/main/java/org/apache/cayenne/project/ProjectModuleExtender.java
@@ -1,3 +1,22 @@
+/*****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * https://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
+ * "AS IS" 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 org.apache.cayenne.project;
import org.apache.cayenne.di.Binder;
diff --git a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V11Test.java b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V11Test.java
index 4c5b0ab51..0b34b8c63 100644
--- a/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V11Test.java
+++ b/cayenne-project/src/test/java/org/apache/cayenne/project/upgrade/handlers/UpgradeHandler_V11Test.java
@@ -123,7 +123,7 @@ public class UpgradeHandler_V11Test extends BaseUpgradeHandlerTest{
case "template":
case "embeddableTemplate":
case "dataMapTemplate":
- assertEquals("velocity template stub", node.getFirstChild().getNodeValue());
+ assertEquals(TEST_TEMPLATE_CONTENT, node.getFirstChild().getNodeValue());
break;
case "superTemplate":
assertEquals("The template /org/apache/cayenne/project/upgrade/handlers was not found " +
@@ -151,4 +151,23 @@ public class UpgradeHandler_V11Test extends BaseUpgradeHandlerTest{
handler.processModel(descriptor);
verifyNoInteractions(descriptor);
}
+
+
+ private static final String TEST_TEMPLATE_CONTENT = "## Licensed to the Apache Software Foundation (ASF) under one\n" +
+ "## or more contributor license agreements. See the NOTICE file\n" +
+ "## distributed with this work for additional information\n" +
+ "## regarding copyright ownership. The ASF licenses this file\n" +
+ "## to you under the Apache License, Version 2.0 (the\n" +
+ "## \"License\"); you may not use this file except in compliance\n" +
+ "## with the License. You may obtain a copy of the License at\n" +
+ "##\n" +
+ "## https://www.apache.org/licenses/LICENSE-2.0\n" +
+ "##\n" +
+ "## Unless required by applicable law or agreed to in writing,\n" +
+ "## software distributed under the License is distributed on an\n" +
+ "## \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n" +
+ "## KIND, either express or implied. See the License for the\n" +
+ "## specific language governing permissions and limitations\n" +
+ "## under the License.\n" +
+ "velocity template stub";
}
\ No newline at end of file
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v10.map.xml b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v10.map.xml
index 1f1460c16..70a308962 100644
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v10.map.xml
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/test-map-v10.map.xml
@@ -17,11 +17,11 @@
<cgen xmlns="http://cayenne.apache.org/schema/10/cgen">
<destDir>../../../../target/cgenClasses</destDir>
<mode>entity</mode>
- <template>org/apache/cayenne/project/upgrade/handlers/velocityTemplate.txt</template>
+ <template>org/apache/cayenne/project/upgrade/handlers/velocityTemplate.vm</template>
<superTemplate>/org/apache/cayenne/project/upgrade/handlers</superTemplate>
- <embeddableTemplate>org/apache/cayenne/project/upgrade/handlers/velocityTemplate.txt</embeddableTemplate>
+ <embeddableTemplate>org/apache/cayenne/project/upgrade/handlers/velocityTemplate.vm</embeddableTemplate>
<embeddableSuperTemplate>../../testWrongPath</embeddableSuperTemplate>
- <queryTemplate>org/apache/cayenne/project/upgrade/handlers/velocityTemplate.txt</queryTemplate>
+ <queryTemplate>org/apache/cayenne/project/upgrade/handlers/velocityTemplate.vm</queryTemplate>
<querySuperTemplate>templates/v4_1/datamap-superclass.vm</querySuperTemplate>
<client>true</client>
</cgen>
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/velocityTemplate.txt b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/velocityTemplate.txt
deleted file mode 100644
index 496e99742..000000000
--- a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/velocityTemplate.txt
+++ /dev/null
@@ -1 +0,0 @@
-velocity template stub
\ No newline at end of file
diff --git a/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/velocityTemplate.vm b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/velocityTemplate.vm
new file mode 100644
index 000000000..77200d1e3
--- /dev/null
+++ b/cayenne-project/src/test/resources/org/apache/cayenne/project/upgrade/handlers/velocityTemplate.vm
@@ -0,0 +1,17 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License. You may obtain a copy of the License at
+##
+## https://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
+## "AS IS" 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.
+velocity template stub
\ No newline at end of file