[ISSUE #23] Integrate Checkstyle into Build and CI process (#24)
* integrate checkstyle
* fix import order & remove excessive try-catch
diff --git a/.asf.yaml b/.asf.yaml
index 9ff7857..898b57a 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -45,9 +45,9 @@
dismiss_stale_reviews: true
required_approving_review_count: 1
notifications:
- commits: commits@eventmesh.apache.org
+ commits: commits@eventmesh.apache.org
# Send all issue emails (new, closed, comments) to issues@
- issues: issues@eventmesh.apache.org
+ issues: issues@eventmesh.apache.org
# Send new/closed PR notifications to dev@
pullrequests_status: dev@eventmesh.apache.org
# Send individual PR comments/reviews to issues@
diff --git a/.github/workflows/build.yaml b/.github/workflows/docker.yml
similarity index 100%
rename from .github/workflows/build.yaml
rename to .github/workflows/docker.yml
diff --git a/README.md b/README.md
index 5ddd5f5..bf6fbb5 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
1. eventmesh-dashboard-console 业务模块的代码,调用service接口
2. eventmesh-dashboard-observe 监控模块的代码
-3. eventmesh-dashboard-core 对eventmesh以及相关组件的代码,提供service实现
+3. eventmesh-dashboard-core 对EventMesh Runtime, Meta以及相关组件的代码,提供service实现
4. eventmesh-dashboard-service 公用API接口,对core的抽象
5. eventmesh-dashboard-common 公共模块的代码
6. eventmesh-dashboard-view 前端代码
diff --git a/eventmesh-dashboard-common/src/main/java/org/apache/eventmesh/dashboard/common/Main.java b/eventmesh-dashboard-common/src/main/java/org/apache/eventmesh/dashboard/common/Main.java
index a8b0ff7..673282d 100644
--- a/eventmesh-dashboard-common/src/main/java/org/apache/eventmesh/dashboard/common/Main.java
+++ b/eventmesh-dashboard-common/src/main/java/org/apache/eventmesh/dashboard/common/Main.java
@@ -1,7 +1,23 @@
+/*
+ * 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.
+ */
+
package org.apache.eventmesh.dashboard.common;
public class Main {
public static void main(String[] args) {
- System.out.println("Hello world!");
}
}
\ No newline at end of file
diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java
index 1e4d6db..a048f24 100644
--- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java
+++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/EventmeshConsoleApplication.java
@@ -17,22 +17,19 @@
package org.apache.eventmesh.dashboard.console;
-import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
+import lombok.extern.slf4j.Slf4j;
+
@Slf4j
@SpringBootApplication
@ComponentScan({"org.apache.eventmesh.dashboard.service", "org.apache.eventmesh.dashboard.console"})
public class EventmeshConsoleApplication {
public static void main(String[] args) {
- try {
- SpringApplication.run(EventmeshConsoleApplication.class, args);
- log.info("{} Successfully booted.", EventmeshConsoleApplication.class.getSimpleName());
- } catch (Exception e) {
- log.error(e.getMessage(), e);
- }
+ SpringApplication.run(EventmeshConsoleApplication.class, args);
+ log.info("{} Successfully booted.", EventmeshConsoleApplication.class.getSimpleName());
}
}
diff --git a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/Main.java b/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/Main.java
deleted file mode 100644
index f538cd8..0000000
--- a/eventmesh-dashboard-core/src/main/java/org/apache/eventmesh/dashboard/core/service/Main.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package org.apache.eventmesh.dashboard.core.service;
-
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
diff --git a/eventmesh-dashboard-observe/src/main/java/org/apache/eventmesh/dashboard/observe/Main.java b/eventmesh-dashboard-observe/src/main/java/org/apache/eventmesh/dashboard/observe/Main.java
index 1a8fac3..dc40fa2 100644
--- a/eventmesh-dashboard-observe/src/main/java/org/apache/eventmesh/dashboard/observe/Main.java
+++ b/eventmesh-dashboard-observe/src/main/java/org/apache/eventmesh/dashboard/observe/Main.java
@@ -1,7 +1,23 @@
+/*
+ * 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.
+ */
+
package org.apache.eventmesh.dashboard.observe;
public class Main {
public static void main(String[] args) {
- System.out.println("Hello world!");
}
}
\ No newline at end of file
diff --git a/eventmesh-dashboard-service/src/main/java/org/apache/eventmesh/dashboard/service/Main.java b/eventmesh-dashboard-service/src/main/java/org/apache/eventmesh/dashboard/service/Main.java
index 0927abf..926f48c 100644
--- a/eventmesh-dashboard-service/src/main/java/org/apache/eventmesh/dashboard/service/Main.java
+++ b/eventmesh-dashboard-service/src/main/java/org/apache/eventmesh/dashboard/service/Main.java
@@ -1,7 +1,23 @@
+/*
+ * 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.
+ */
+
package org.apache.eventmesh.dashboard.service;
public class Main {
public static void main(String[] args) {
- System.out.println("Hello world!");
}
}
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ed8fd4f..e8ac69c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,6 +89,7 @@
<module>eventmesh-dashboard-service</module>
<module>eventmesh-dashboard-common</module>
</modules>
+
<dependencyManagement>
<dependencies>
<dependency>
@@ -105,4 +106,30 @@
</dependency>
</dependencies>
</dependencyManagement>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>3.3.1</version>
+ <configuration>
+ <configLocation>style/checkStyle.xml</configLocation>
+ <consoleOutput>true</consoleOutput>
+ <failsOnError>true</failsOnError>
+ <linkXRef>false</linkXRef>
+ <propertyExpansion>config_loc=style</propertyExpansion>
+ </configuration>
+ <executions>
+ <execution>
+ <id>validate</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
diff --git a/style/checkStyle.xml b/style/checkStyle.xml
index cfa1972..897dbfa 100644
--- a/style/checkStyle.xml
+++ b/style/checkStyle.xml
@@ -23,7 +23,7 @@
<module name="Checker">
<property name="charset" value="UTF-8"/>
- <property name="severity" value="warning"/>
+ <property name="severity" value="error"/>
<property name="fileExtensions" value="java, properties, xml, gradle, env, sh"/>
<module name="SuppressWarningsFilter" />
<module name="Header">