You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2022/11/02 08:43:02 UTC
[iotdb] 03/05: add-source plugin in pom file of server
This is an automated email from the ASF dual-hosted git repository.
xiangweiwei pushed a commit to branch freemarker
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 6ff80bbe34525e0784436fee3bb14593a5841f69
Author: Alima777 <wx...@gmail.com>
AuthorDate: Wed Nov 2 16:02:46 2022 +0800
add-source plugin in pom file of server
---
server/pom.xml | 21 ++++++++++++++++++++-
server/src/main/codegen/templates/constantFill.ftl | 18 ++++++++++++++++++
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/server/pom.xml b/server/pom.xml
index b835f49872..f1aa722e8e 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -332,12 +332,31 @@
</goals>
<configuration>
<config>${project.build.directory}/codegen/config.fmpp</config>
- <output>${project.build.directory}/generated-sources</output>
+ <output>${project.build.directory}/generated-sources/freemarker</output>
<templates>${project.build.directory}/codegen/templates</templates>
</configuration>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/generated-sources/freemarker</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
diff --git a/server/src/main/codegen/templates/constantFill.ftl b/server/src/main/codegen/templates/constantFill.ftl
index a977a49d7c..3ee859fe4a 100644
--- a/server/src/main/codegen/templates/constantFill.ftl
+++ b/server/src/main/codegen/templates/constantFill.ftl
@@ -1,3 +1,20 @@
+/*
+* 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
+*
+* 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 "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.
+*/
<@pp.dropOutputFile />
<#list allDataTypes.types as type>
@@ -19,6 +36,7 @@ import java.util.Optional;
/*
* This class is generated using freemarker and the ${.template_name} template.
*/
+@SuppressWarnings("unused")
public class ${className} implements IFill {
// fill value