This commit is contained in:
hxy1991 2018-12-10 19:53:15 +08:00
parent 2f630b0be6
commit 97743685ac
20 changed files with 915 additions and 929 deletions

View File

@ -12,55 +12,55 @@
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>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
</parent>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-api</artifactId>
<packaging>jar</packaging>
<artifactId>nacos-api</artifactId>
<packaging>jar</packaging>
<name>nacos-api ${project.version}</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
</build>
<name>nacos-api ${project.version}</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>7</source>
<target>7</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View File

@ -66,8 +66,8 @@ public class ParseException extends Exception {
}
/**
* @return One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character
* ERROR_UNEXPECTED_TOKEN com.alibaba.nacos.client.logger.jsonparser.Yytoken ERROR_UNEXPECTED_EXCEPTION
* @return One of the following base on the value of errorType: ERROR_UNEXPECTED_CHAR java.lang.Character
* ERROR_UNEXPECTED_TOKEN com.alibaba.nacos.client.logger.jsonparser.Yytoken ERROR_UNEXPECTED_EXCEPTION
* java.lang.Exception
* @see com.alibaba.nacos.client.logger.json.parser.Yytoken
*/

View File

@ -12,175 +12,175 @@
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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
</parent>
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-config</artifactId>
<packaging>jar</packaging>
<artifactId>nacos-config</artifactId>
<packaging>jar</packaging>
<name>nacos-config ${project.version}</name>
<url>http://maven.apache.org</url>
<name>nacos-config ${project.version}</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>taglibs</groupId>-->
<!--<artifactId>standard</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>taglibs</groupId>-->
<!--<artifactId>standard</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<!-- for aop -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
</dependency>
<!-- Provided -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-lgpl</artifactId>
</dependency>
<dependency>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
<argLine>-Dnacos.standalone=true</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.alibaba.nacos.config.server.Config</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
<!-- <resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>application.properties</exclude>
<exclude>banner.txt</exclude>
<exclude>schema.sql</exclude>
<exclude>nacos-db.sql</exclude>
</excludes>
</resource>
</resources> -->
</build>
<profiles>
<profile>
<id>springboot</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.alibaba.nacos.config.server.Config</mainClass>
</configuration>
</plugin>
</plugins>
<finalName>nacos-config</finalName>
</build>
</profile>
</profiles>
<!-- for aop -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
</dependency>
<!-- Provided -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-lgpl</artifactId>
</dependency>
<dependency>
<groupId>net.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
<argLine>-Dnacos.standalone=true</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.alibaba.nacos.config.server.Config</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
<!-- <resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<excludes>
<exclude>application.properties</exclude>
<exclude>banner.txt</exclude>
<exclude>schema.sql</exclude>
<exclude>nacos-db.sql</exclude>
</excludes>
</resource>
</resources> -->
</build>
<profiles>
<profile>
<id>springboot</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.alibaba.nacos.config.server.Config</mainClass>
</configuration>
</plugin>
</plugins>
<finalName>nacos-config</finalName>
</build>
</profile>
</profiles>
</project>

View File

@ -24,6 +24,7 @@ import javax.servlet.ServletContext;
/**
* Running config
*
* @author <a href="mailto:zpf.073@gmail.com">nkorange</a>
*/
@Component
@ -32,18 +33,18 @@ public class RunningConfigUtils implements ApplicationListener<WebServerInitiali
private static int serverPort;
private static String contextPath;
private static String clusterName = "serverlist";
@Autowired
@Autowired
private ServletContext servletContext;
@Override
public void onApplicationEvent(WebServerInitializedEvent event) {
public void onApplicationEvent(WebServerInitializedEvent event) {
setServerPort(event.getWebServer().getPort());
setContextPath(servletContext.getContextPath());
}
setServerPort(event.getWebServer().getPort());
setContextPath(servletContext.getContextPath());
}
public static int getServerPort() {
return serverPort;
@ -52,17 +53,17 @@ public class RunningConfigUtils implements ApplicationListener<WebServerInitiali
public static String getContextPath() {
return contextPath;
}
public static String getClusterName() {
return clusterName;
}
return clusterName;
}
public static void setServerPort(int serverPort) {
RunningConfigUtils.serverPort = serverPort;
}
public static void setServerPort(int serverPort) {
RunningConfigUtils.serverPort = serverPort;
}
public static void setContextPath(String contextPath) {
RunningConfigUtils.contextPath = contextPath;
}
public static void setContextPath(String contextPath) {
RunningConfigUtils.contextPath = contextPath;
}
}

View File

@ -41,27 +41,27 @@ import com.alibaba.nacos.config.server.service.DataSourceService;
@ContextConfiguration(classes = MockServletContext.class)
@WebAppConfiguration
public class HealthControllerUnitTest {
@InjectMocks
HealthController healthController;
@InjectMocks
HealthController healthController;
@Mock
DataSourceService dataSourceService;
@Mock
DataSourceService dataSourceService;
private MockMvc mockmvc;
private MockMvc mockmvc;
@Before
public void setUp() throws Exception {
mockmvc = MockMvcBuilders.standaloneSetup(healthController).build();
mockmvc = MockMvcBuilders.standaloneSetup(healthController).build();
}
@Test
public void testGetHealth() throws Exception{
public void testGetHealth() throws Exception {
Mockito.when(dataSourceService.getHealth()).thenReturn("UP");
MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH);
String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString();
Assert.assertEquals("UP", actualValue);
Mockito.when(dataSourceService.getHealth()).thenReturn("UP");
MockHttpServletRequestBuilder builder = MockMvcRequestBuilders.get(Constants.HEALTH_CONTROLLER_PATH);
String actualValue = mockmvc.perform(builder).andReturn().getResponse().getContentAsString();
Assert.assertEquals("UP", actualValue);
}
}

View File

@ -15,30 +15,28 @@
*/
package com.alibaba.nacos.config.server.service;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.service.AggrWhitelist;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class AggrWhitelistTest {
AggrWhitelist service;
@Before
public void before() throws Exception {
service = new AggrWhitelist();
}
@Test
public void testIsAggrDataId() {
List<String> list = new ArrayList<String>();
@ -46,12 +44,12 @@ public class AggrWhitelistTest {
list.add("NS_NACOS_SUBSCRIPTION_TOPIC_*");
list.add("com.taobao.tae.AppListOnGrid-*");
service.compile(list);
assertEquals(false, service.isAggrDataId("com.abc"));
assertEquals(false, service.isAggrDataId("com.taobao.jiuren"));
assertEquals(false, service.isAggrDataId("com.taobao.jiurenABC"));
assertEquals(true, service.isAggrDataId("com.taobao.jiuren.abc"));
assertEquals(true, service.isAggrDataId("NS_NACOS_SUBSCRIPTION_TOPIC_abc"));
assertEquals(true, service.isAggrDataId("com.taobao.tae.AppListOnGrid-abc"));
}
}
}

View File

@ -15,19 +15,14 @@
*/
package com.alibaba.nacos.config.server.service;
import com.alibaba.nacos.config.server.utils.GroupKey2;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.service.ClientTrackService;
import com.alibaba.nacos.config.server.service.ConfigService;
import com.alibaba.nacos.config.server.utils.GroupKey2;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class ClientTrackServiceTest {
@ -44,7 +39,7 @@ public class ClientTrackServiceTest {
String group = "online";
String groupKey = GroupKey2.getKey(dataId, group);
String md5 = "xxxxxxxxxxxxx";
ConfigService.updateMd5(groupKey, md5, System.currentTimeMillis());
ClientTrackService.trackClientMd5(clientIp, groupKey, md5);
@ -53,7 +48,7 @@ public class ClientTrackServiceTest {
Assert.assertEquals(true, ClientTrackService.isClientUptodate(clientIp).get(groupKey));
Assert.assertEquals(1, ClientTrackService.subscribeClientCount());
Assert.assertEquals(1, ClientTrackService.subscriberCount());
//服务端数据更新
ConfigService.updateMd5(groupKey, md5 + "111", System.currentTimeMillis());
Assert.assertEquals(false, ClientTrackService.isClientUptodate(clientIp).get(groupKey));

View File

@ -17,50 +17,46 @@ package com.alibaba.nacos.config.server.service;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.service.DiskUtil;
import javax.servlet.ServletContext;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class DiskServiceUnitTest {
private DiskUtil diskService;
private DiskUtil diskService;
private ServletContext servletContext;
private ServletContext servletContext;
private File tempFile;
private File tempFile;
private String path;
private String path;
@Before
public void setUp() throws IOException {
this.tempFile = File.createTempFile("diskServiceTest", "tmp");
this.path = tempFile.getParent();
this.diskService = new DiskUtil();
}
@Before
public void setUp() throws IOException {
this.tempFile = File.createTempFile("diskServiceTest", "tmp");
this.path = tempFile.getParent();
this.diskService = new DiskUtil();
}
@Test
public void testCreateConfig() throws IOException {
diskService.saveToDisk("testDataId", "testGroup", "testTenant", "testContent");
String content = diskService.getConfig("testDataId", "testGroup", "testTenant");
assertEquals(content, "testContent");
@Test
public void testCreateConfig() throws IOException {
diskService.saveToDisk("testDataId", "testGroup", "testTenant", "testContent");
String content = diskService.getConfig("testDataId", "testGroup", "testTenant");
assertEquals(content, "testContent");
}
}
@After
public void tearDown() throws IOException {
tempFile.delete();
}
@After
public void tearDown() throws IOException {
tempFile.delete();
}
}

View File

@ -50,7 +50,7 @@ public class GroupKeyTest {
} catch (IllegalArgumentException e) {
System.out.println(e.toString());
}
key = "11111%2b+222";
try {
GroupKey2.parseKey(key);
@ -58,7 +58,6 @@ public class GroupKeyTest {
} catch (IllegalArgumentException e) {
System.out.println(e.toString());
}
key = "11111%25+222";
String[] pair = GroupKey2.parseKey(key);

View File

@ -24,7 +24,6 @@ import org.springframework.test.context.web.WebAppConfiguration;
import com.alibaba.nacos.config.server.utils.SimpleReadWriteLock;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class SimpleReadWriteLockTest {
@ -34,44 +33,44 @@ public class SimpleReadWriteLockTest {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock());
assertEquals(true, lock.tryReadLock());
lock.releaseReadLock();
lock.releaseReadLock();
assertEquals(true, lock.tryWriteLock());
}
@Test
public void test_加写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryWriteLock());
lock.releaseWriteLock();
}
@Test
public void test_双重写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryWriteLock());
assertEquals(false, lock.tryWriteLock());
}
@Test
public void test_先读锁后写锁() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock());
assertEquals(false, lock.tryWriteLock());
}
@Test
public void test_双重读锁_释放一个_加写锁失败() {
SimpleReadWriteLock lock = new SimpleReadWriteLock();
assertEquals(true, lock.tryReadLock());
assertEquals(true, lock.tryReadLock());
lock.releaseReadLock();
assertEquals(false, lock.tryWriteLock());
}
}

View File

@ -32,7 +32,6 @@ import java.util.concurrent.CountDownLatch;
import static org.junit.Assert.assertEquals;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
public class EventDispatcherTest {
@ -46,10 +45,10 @@ public class EventDispatcherTest {
@Test
public void testAddListener() throws Exception {
final AbstractEventListener listener = new MockListener();
int vusers = 1000;
final CountDownLatch latch = new CountDownLatch(vusers);
for (int i = 0; i < vusers; ++i) {
new Thread(new Runnable() {
public void run() {
@ -58,33 +57,32 @@ public class EventDispatcherTest {
}
}).start();
}
latch.await();
assertEquals(1, EventDispatcher.LISTENER_HUB.size());
}
@Test
public void testFireEvent() {
EventDispatcher.fireEvent(new MockEvent());
assertEquals(0, MockListener.count);
EventDispatcher.addEventListener(new MockListener());
EventDispatcher.fireEvent(new MockEvent());
assertEquals(1, MockListener.count);
EventDispatcher.fireEvent(new MockEvent());
assertEquals(2, MockListener.count);
}
}
class MockEvent implements Event {
class MockEvent implements Event {
}
class MockListener extends AbstractEventListener {
static int count = 0;
@Override
public List<Class<? extends Event>> interest() {
List<Class<? extends Event>> types = new ArrayList<Class<? extends Event>>();

View File

@ -12,37 +12,37 @@
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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
</parent>
<artifactId>nacos-console</artifactId>
<!--<packaging>war</packaging>-->
<packaging>jar</packaging>
<name>nacos-console ${project.version}</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
</parent>
<artifactId>nacos-console</artifactId>
<!--<packaging>war</packaging>-->
<packaging>jar</packaging>
<name>nacos-console ${project.version}</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>7.0.59</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-naming</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>7.0.59</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-naming</artifactId>
</dependency>
<!-- log -->
<!-- log4j通过slf4j来代理 -->
<dependency>
@ -59,42 +59,42 @@
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<!-- log -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>nacos-server</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.alibaba.nacos.Nacos</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<!--<resources>-->
<!--<resource>-->
<!--<filtering>true</filtering>-->
<!--<directory>src/main/resources</directory>-->
<!--<excludes>-->
<!--<exclude>application.properties</exclude>-->
<!--<exclude>banner.txt</exclude>-->
<!--<exclude>diamond-server-logback.xml</exclude>-->
<!--<exclude>schema.sql</exclude>-->
<!--</excludes>-->
<!--</resource>-->
<!--</resources>-->
</build>
<!-- log -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>nacos-server</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.alibaba.nacos.Nacos</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<!--<resources>-->
<!--<resource>-->
<!--<filtering>true</filtering>-->
<!--<directory>src/main/resources</directory>-->
<!--<excludes>-->
<!--<exclude>application.properties</exclude>-->
<!--<exclude>banner.txt</exclude>-->
<!--<exclude>diamond-server-logback.xml</exclude>-->
<!--<exclude>schema.sql</exclude>-->
<!--</excludes>-->
<!--</resource>-->
<!--</resources>-->
</build>
</project>

View File

@ -2,29 +2,29 @@
<configuration scan="true" scanPeriod="10 seconds">
<appender name="dumpFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/dump.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset>
</encoder>
</appender>
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/dump.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/dump.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset>
</encoder>
</appender>
<appender name="pullFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/pull.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/pull.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize>
<maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -35,29 +35,29 @@
</encoder>
</appender>
<appender name="fatalFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/fatal.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset>
</encoder>
</appender>
<appender name="fatalFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/fatal.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/fatal.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset>
</encoder>
</appender>
<appender name="memoryFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/memory.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/memory.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize>
<maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -73,7 +73,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/pull-check.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize>
<maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -90,7 +90,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/acl.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -107,7 +107,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/client-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize>
<maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -124,7 +124,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/sdk-request.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize>
<maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -141,7 +141,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/trace.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>2GB</maxFileSize>
<maxFileSize>2GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>7GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -158,7 +158,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/notify.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>1GB</maxFileSize>
<maxFileSize>1GB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>3GB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -175,7 +175,7 @@
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/app.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>20MB</maxFileSize>
<maxFileSize>20MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>128MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
@ -185,78 +185,78 @@
<charset>GBK</charset>
</encoder>
</appender>
<appender name="rootFile"
class="ch.qos.logback.core.rolling.RollingFileAppender">
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/diamond/logs/diamondServer.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${user.home}/diamond/logs/diamondServer.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxFileSize>50MB</maxFileSize>
<maxFileSize>50MB</maxFileSize>
<MaxHistory>15</MaxHistory>
<totalSizeCap>512MB</totalSizeCap>
<cleanHistoryOnStart>true</cleanHistoryOnStart>
</rollingPolicy>
<encoder>
<Pattern>%date %level %msg%n%n</Pattern>
<charset>GBK</charset>
<charset>GBK</charset>
</encoder>
</appender>
<logger name="com.taobao.diamond.server.dumpLog" additivity="false">
<level value="INFO" />
<appender-ref ref="dumpFile" />
<level value="INFO"/>
<appender-ref ref="dumpFile"/>
</logger>
<logger name="com.taobao.diamond.server.pullLog" additivity="false">
<level value="INFO" />
<appender-ref ref="pullFile" />
<level value="INFO"/>
<appender-ref ref="pullFile"/>
</logger>
<logger name="com.taobao.diamond.server.pullCheckLog" additivity="false">
<level value="INFO" />
<appender-ref ref="pullCheckFile" />
<level value="INFO"/>
<appender-ref ref="pullCheckFile"/>
</logger>
<logger name="com.taobao.diamond.server.fatal" additivity="false">
<level value="INFO" />
<appender-ref ref="fatalFile" />
<level value="INFO"/>
<appender-ref ref="fatalFile"/>
</logger>
<logger name="com.taobao.diamond.server.monitorLog" additivity="false">
<level value="INFO" />
<appender-ref ref="memoryFile" />
<level value="INFO"/>
<appender-ref ref="memoryFile"/>
</logger>
<logger name="com.taobao.diamond.server.aclLog" additivity="false">
<level value="INFO" />
<appender-ref ref="aclLog" />
<level value="INFO"/>
<appender-ref ref="aclLog"/>
</logger>
<logger name="com.taobao.diamond.server.clientLog" additivity="false">
<level value="info" />
<appender-ref ref="clientLog" />
<level value="info"/>
<appender-ref ref="clientLog"/>
</logger>
<logger name="com.taobao.diamond.server.sdkLog" additivity="false">
<level value="INFO" />
<appender-ref ref="sdkLog" />
<level value="INFO"/>
<appender-ref ref="sdkLog"/>
</logger>
<logger name="com.taobao.diamond.server.notifyLog" additivity="false">
<level value="INFO" />
<appender-ref ref="notifyLog" />
<level value="INFO"/>
<appender-ref ref="notifyLog"/>
</logger>
<logger name="com.taobao.diamond.server.traceLog" additivity="false">
<level value="info" />
<appender-ref ref="traceLog" />
<level value="info"/>
<appender-ref ref="traceLog"/>
</logger>
<logger name="com.taobao.diamond.server.appCollectorLog" additivity="false">
<level value="INFO" />
<appender-ref ref="appCollectorLog" />
<level value="INFO"/>
<appender-ref ref="appCollectorLog"/>
</logger>
<root>
<level value="INFO" />
<appender-ref ref="rootFile" />
</root>
<root>
<level value="INFO"/>
<appender-ref ref="rootFile"/>
</root>
</configuration>

View File

@ -12,188 +12,188 @@
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">
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>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-distribution</artifactId>
<name>nacos-distribution ${project.version}</name>
<packaging>pom</packaging>
<artifactId>nacos-distribution</artifactId>
<name>nacos-distribution ${project.version}</name>
<packaging>pom</packaging>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-console</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>release-config</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-config</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-config</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-config.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>acm</finalName>
</build>
</profile>
<profile>
<id>release-naming</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-naming</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-naming</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-naming.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>ans</finalName>
</build>
</profile>
<profile>
<id>release-client</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-client</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-client.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>nacos-client</finalName>
</build>
</profile>
<profile>
<id>release-core</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-core</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-core.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>nacos-core</finalName>
</build>
</profile>
<profile>
<id>release-nacos</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-console</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<descriptors>
<descriptor>release-nacos.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>nacos</finalName>
</build>
</profile>
</profiles>
</project>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-console</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>release-config</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-config</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-config</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-config.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>acm</finalName>
</build>
</profile>
<profile>
<id>release-naming</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-naming</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-naming</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-naming.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>ans</finalName>
</build>
</profile>
<profile>
<id>release-client</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-client</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-client.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>nacos-client</finalName>
</build>
</profile>
<profile>
<id>release-core</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>release-core</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
<configuration>
<descriptors>
<descriptor>release-core.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<finalName>nacos-core</finalName>
</build>
</profile>
<profile>
<id>release-nacos</id>
<dependencies>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-console</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<descriptors>
<descriptor>release-nacos.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>nacos</finalName>
</build>
</profile>
</profiles>
</project>

View File

@ -14,62 +14,62 @@
limitations under the License.
-->
<assembly>
<id>client</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<id>client</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-client</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-client</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
</assembly>

View File

@ -14,62 +14,62 @@
limitations under the License.
-->
<assembly>
<id>cfg</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<id>cfg</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-config</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-config</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
</assembly>

View File

@ -14,61 +14,61 @@
limitations under the License.
-->
<assembly>
<id>core</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<id>core</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-core</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-core</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
</assembly>

View File

@ -14,50 +14,50 @@
limitations under the License.
-->
<assembly>
<id>server-${project.version}</id>
<includeBaseDirectory>true</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<id>server-${project.version}</id>
<includeBaseDirectory>true</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<includes>
<include>conf/**</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
<file>
<!--打好的jar包名称和放置目录-->
<source>../console/target/nacos-server.jar</source>
<outputDirectory>/target/</outputDirectory>
</file>
</files>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
<file>
<!--打好的jar包名称和放置目录-->
<source>../console/target/nacos-server.jar</source>
<outputDirectory>/target/</outputDirectory>
</file>
</files>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-console</include>
</includes>
</moduleSet>
</moduleSets>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-console</include>
</includes>
</moduleSet>
</moduleSets>
</assembly>

View File

@ -14,62 +14,62 @@
limitations under the License.
-->
<assembly>
<id>naming</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<id>naming</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>dir</format>
<format>tar.gz</format>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>../</directory>
<includes>
<include>README.md</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>conf/**</include>
<include>benchmark/*</include>
</includes>
</fileSet>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<fileSet>
<includes>
<include>bin/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<files>
<file>
<source>LICENSE-BIN</source>
<destName>LICENSE</destName>
</file>
<file>
<source>NOTICE-BIN</source>
<destName>NOTICE</destName>
</file>
</files>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-naming</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
<moduleSets>
<moduleSet>
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>com.alibaba.nacos:nacos-naming</include>
</includes>
<binaries>
<outputDirectory>lib/</outputDirectory>
<unpack>false</unpack>
<dependencySets>
<dependencySet>
<outputDirectory>lib/</outputDirectory>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
</assembly>

View File

@ -12,50 +12,50 @@
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">
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>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<parent>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-all</artifactId>
<version>0.6.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>
<artifactId>nacos-example</artifactId>
<packaging>jar</packaging>
<artifactId>nacos-example</artifactId>
<packaging>jar</packaging>
<name>nacos-example ${project.version}</name>
<url>http://maven.apache.org</url>
<name>nacos-example ${project.version}</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-common</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
</dependency>
<!-- log -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-common</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>nacos-core</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-client</artifactId>
</dependency>
<!-- log -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
</dependencies>
</project>