You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2017/03/03 17:26:13 UTC

[05/14] james-project git commit: JAMES-1950 Move metrics-api as toplevel project

JAMES-1950 Move metrics-api as toplevel project


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/4e701113
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/4e701113
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/4e701113

Branch: refs/heads/master
Commit: 4e7011135b81f32a500b133cbef7e56cc9877963
Parents: 959cde4
Author: Antoine Duprat <ad...@linagora.com>
Authored: Thu Feb 23 15:26:37 2017 +0100
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Fri Mar 3 18:17:20 2017 +0100

----------------------------------------------------------------------
 metrics/metrics-api/pom.xml                     | 34 +++++++++++++++++
 .../org/apache/james/metrics/api/Metric.java    | 28 ++++++++++++++
 .../apache/james/metrics/api/MetricFactory.java | 26 +++++++++++++
 metrics/pom.xml                                 | 40 ++++++++++++++++++++
 pom.xml                                         |  1 +
 server/app/pom.xml                              |  2 +-
 server/container/guice/guice-common/pom.xml     |  2 +-
 server/container/metrics/metrics-api/pom.xml    | 35 -----------------
 .../org/apache/james/metrics/api/Metric.java    | 28 --------------
 .../apache/james/metrics/api/MetricFactory.java | 26 -------------
 .../metrics/metrics-dropwizard/pom.xml          |  4 +-
 server/mailet/mailets/pom.xml                   |  2 +-
 server/pom.xml                                  | 12 +++---
 server/protocols/protocols-imap4/pom.xml        |  2 +-
 server/protocols/protocols-smtp/pom.xml         |  2 +-
 server/queue/queue-jms/pom.xml                  |  2 +-
 16 files changed, 143 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/metrics/metrics-api/pom.xml
----------------------------------------------------------------------
diff --git a/metrics/metrics-api/pom.xml b/metrics/metrics-api/pom.xml
new file mode 100644
index 0000000..7bfc08d
--- /dev/null
+++ b/metrics/metrics-api/pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>metrics</artifactId>
+        <groupId>org.apache.james</groupId>
+        <version>3.0.0-beta6-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>metrics-api</artifactId>
+
+    <name>Apache James :: Metrics :: API</name>
+
+</project>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java
----------------------------------------------------------------------
diff --git a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java
new file mode 100644
index 0000000..b8b552f
--- /dev/null
+++ b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java
@@ -0,0 +1,28 @@
+/****************************************************************
+ * 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.james.metrics.api;
+
+public interface Metric {
+
+    void increment();
+
+    void decrement();
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
----------------------------------------------------------------------
diff --git a/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
new file mode 100644
index 0000000..b007428
--- /dev/null
+++ b/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
@@ -0,0 +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   *
+ *                                                              *
+ *   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.james.metrics.api;
+
+public interface MetricFactory {
+
+    Metric generate(String name);
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/metrics/pom.xml
----------------------------------------------------------------------
diff --git a/metrics/pom.xml b/metrics/pom.xml
new file mode 100644
index 0000000..2653b90
--- /dev/null
+++ b/metrics/pom.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <artifactId>james-project</artifactId>
+        <groupId>org.apache.james</groupId>
+        <version>3.0.0-beta6-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>metrics</artifactId>
+    <packaging>pom</packaging>
+
+    <name>Apache James :: Metrics</name>
+    <description>Apache James Metrics</description>
+
+    <modules>
+        <module>metrics-api</module>
+    </modules>
+
+</project>
+

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index affa9f0..dd04736 100644
--- a/pom.xml
+++ b/pom.xml
@@ -564,6 +564,7 @@
         <module>backends-common</module>
         <module>mailbox</module>
         <module>mailet</module>
+        <module>metrics</module>
         <module>mpt</module>
         <module>protocols</module>
         <module>server</module>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/app/pom.xml
----------------------------------------------------------------------
diff --git a/server/app/pom.xml b/server/app/pom.xml
index 4be0e15..306f51b 100644
--- a/server/app/pom.xml
+++ b/server/app/pom.xml
@@ -253,7 +253,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>
-            <artifactId>james-server-metrics-api</artifactId>
+            <artifactId>metrics-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/container/guice/guice-common/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/guice-common/pom.xml b/server/container/guice/guice-common/pom.xml
index 9fb7eb8..f3f46cb 100644
--- a/server/container/guice/guice-common/pom.xml
+++ b/server/container/guice/guice-common/pom.xml
@@ -193,7 +193,7 @@
                 </dependency>
                 <dependency>
                     <groupId>org.apache.james</groupId>
-                    <artifactId>james-server-metrics-api</artifactId>
+                    <artifactId>metrics-api</artifactId>
                 </dependency>
                 <dependency>
                     <groupId>org.apache.james</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/container/metrics/metrics-api/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/metrics/metrics-api/pom.xml b/server/container/metrics/metrics-api/pom.xml
deleted file mode 100644
index 800e8a6..0000000
--- a/server/container/metrics/metrics-api/pom.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>james-server</artifactId>
-        <groupId>org.apache.james</groupId>
-        <version>3.0.0-beta6-SNAPSHOT</version>
-        <relativePath>../../../pom.xml</relativePath>
-    </parent>
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>james-server-metrics-api</artifactId>
-
-    <name>Apache James :: Server :: Metrics :: API</name>
-
-</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java
----------------------------------------------------------------------
diff --git a/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java b/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java
deleted file mode 100644
index b8b552f..0000000
--- a/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/Metric.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************
- * 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.james.metrics.api;
-
-public interface Metric {
-
-    void increment();
-
-    void decrement();
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
----------------------------------------------------------------------
diff --git a/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java b/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
deleted file mode 100644
index b007428..0000000
--- a/server/container/metrics/metrics-api/src/main/java/org/apache/james/metrics/api/MetricFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************
- * 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.james.metrics.api;
-
-public interface MetricFactory {
-
-    Metric generate(String name);
-
-}

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/container/metrics/metrics-dropwizard/pom.xml
----------------------------------------------------------------------
diff --git a/server/container/metrics/metrics-dropwizard/pom.xml b/server/container/metrics/metrics-dropwizard/pom.xml
index 3d40daf..33a2fe3 100644
--- a/server/container/metrics/metrics-dropwizard/pom.xml
+++ b/server/container/metrics/metrics-dropwizard/pom.xml
@@ -43,7 +43,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>
-            <artifactId>james-server-metrics-api</artifactId>
+            <artifactId>metrics-api</artifactId>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
@@ -59,4 +59,4 @@
         </dependency>
     </dependencies>
 
-</project>
\ No newline at end of file
+</project>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/mailet/mailets/pom.xml
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/pom.xml b/server/mailet/mailets/pom.xml
index 5484b53..958ad2a 100644
--- a/server/mailet/mailets/pom.xml
+++ b/server/mailet/mailets/pom.xml
@@ -72,7 +72,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>
-            <artifactId>james-server-metrics-api</artifactId>
+            <artifactId>metrics-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.james.protocols</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index 7080631..dd58ac7 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -63,7 +63,6 @@
         <module>container/jetty</module>
         <module>container/lifecycle-api</module>
         <module>container/mailbox-adapter</module>
-        <module>container/metrics/metrics-api</module>
         <module>container/metrics/metrics-dropwizard</module>
         <module>container/metrics/metrics-es-reporter</module>
         <module>container/spring</module>
@@ -453,6 +452,12 @@
             </dependency>
 
             <dependency>
+                <groupId>org.apache.james</groupId>
+                <artifactId>metrics-api</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
+            <dependency>
                 <groupId>org.apache.james.protocols</groupId>
                 <artifactId>protocols-api</artifactId>
                 <version>${project.version}</version>
@@ -638,11 +643,6 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.james</groupId>
-                <artifactId>james-server-metrics-api</artifactId>
-                <version>${project.version}</version>
-            </dependency>
-            <dependency>
-                <groupId>org.apache.james</groupId>
                 <artifactId>james-server-metrics-dropwizard</artifactId>
                 <version>${project.version}</version>
             </dependency>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/protocols/protocols-imap4/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-imap4/pom.xml b/server/protocols/protocols-imap4/pom.xml
index 92f2cb6..6245e8c 100644
--- a/server/protocols/protocols-imap4/pom.xml
+++ b/server/protocols/protocols-imap4/pom.xml
@@ -43,7 +43,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>
-            <artifactId>james-server-metrics-api</artifactId>
+            <artifactId>metrics-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.james.protocols</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/protocols/protocols-smtp/pom.xml
----------------------------------------------------------------------
diff --git a/server/protocols/protocols-smtp/pom.xml b/server/protocols/protocols-smtp/pom.xml
index a466eea..9e68e1e 100644
--- a/server/protocols/protocols-smtp/pom.xml
+++ b/server/protocols/protocols-smtp/pom.xml
@@ -67,7 +67,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>
-            <artifactId>james-server-metrics-api</artifactId>
+            <artifactId>metrics-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>

http://git-wip-us.apache.org/repos/asf/james-project/blob/4e701113/server/queue/queue-jms/pom.xml
----------------------------------------------------------------------
diff --git a/server/queue/queue-jms/pom.xml b/server/queue/queue-jms/pom.xml
index c7e651a..86407f0 100644
--- a/server/queue/queue-jms/pom.xml
+++ b/server/queue/queue-jms/pom.xml
@@ -47,7 +47,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>
-            <artifactId>james-server-metrics-api</artifactId>
+            <artifactId>metrics-api</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.james</groupId>


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org