Skip to content
Permalink
Browse files
JSIEVE-92 More pom simplification
git-svn-id: https://svn.apache.org/repos/asf/james/jsieve/trunk@1425893 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ieugen committed Dec 26, 2012
1 parent a69ca25 commit 8808744aee80d0f0b316ee9f6e85a55ea51981c2
Showing 9 changed files with 43 additions and 95 deletions.
@@ -87,7 +87,6 @@
<execution>
<id>make-assembly</id>
<phase>package</phase>
<!-- append to the packaging phase. -->
<goals>
<goal>attached</goal>
</goals>
@@ -1,3 +1,4 @@
<?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
@@ -1,3 +1,4 @@
<?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
@@ -31,17 +32,12 @@

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-manager-api</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-manager-mock</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies>
@@ -22,10 +22,10 @@

import org.apache.james.managesieve.api.*;
import org.apache.james.managesieve.api.commands.Capability.Capabilities;
import org.apache.james.managesieve.api.commands.CoreCommands;
import org.apache.james.managesieve.mock.MockSession;
import org.apache.james.managesieve.mock.MockSieveParser;
import org.apache.james.managesieve.mock.MockSieveRepository;
import org.junit.Before;
import org.junit.Test;

import java.util.Arrays;
@@ -39,18 +39,21 @@
*/
public class CoreProcessorTestCase {

@Test
public final void testCoreProcessor() {
CoreProcessor core = new CoreProcessor(new MockSession(), new MockSieveRepository(), new MockSieveParser());
assertTrue(core instanceof CoreCommands);
private MockSession session;
private MockSieveParser parser;
private MockSieveRepository repository;
private CoreProcessor core;

@Before
public void setUp() throws Exception {
session = new MockSession();
parser = new MockSieveParser();
repository = new MockSieveRepository();
core = new CoreProcessor(session, repository, parser);
}

@Test
public final void testCapability() {
MockSession session = new MockSession();
MockSieveParser parser = new MockSieveParser();
CoreProcessor core = new CoreProcessor(session, new MockSieveRepository(), parser);

// Unauthenticated
session.setAuthentication(false);
parser.setExtensions(Arrays.asList("a", "b", "c"));
@@ -75,9 +78,6 @@ public final void testCapability() {

@Test
public final void testCheckScript() throws AuthenticationRequiredException, SyntaxException {
MockSession session = new MockSession();
CoreProcessor core = new CoreProcessor(session, new MockSieveRepository(), new MockSieveParser());

// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -109,11 +109,7 @@ public final void testCheckScript() throws AuthenticationRequiredException, Synt
}

@Test
public final void testDeleteScript() throws ScriptNotFoundException, IsActiveException, AuthenticationRequiredException, UserNotFoundException, StorageException, QuotaExceededException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testDeleteScript() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -164,10 +160,6 @@ public final void testDeleteScript() throws ScriptNotFoundException, IsActiveExc

@Test
public final void testGetScript() throws ScriptNotFoundException, AuthenticationRequiredException, UserNotFoundException, StorageException, QuotaExceededException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -197,11 +189,7 @@ public final void testGetScript() throws ScriptNotFoundException, Authentication
}

@Test
public final void testHaveSpace() throws QuotaExceededException, AuthenticationRequiredException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testHaveSpace() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -219,11 +207,7 @@ public final void testHaveSpace() throws QuotaExceededException, AuthenticationR
}

@Test
public final void testListScripts() throws AuthenticationRequiredException, UserNotFoundException, StorageException, QuotaExceededException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testListScripts() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -250,11 +234,7 @@ public final void testListScripts() throws AuthenticationRequiredException, User
}

@Test
public final void testPutScript() throws SyntaxException, QuotaExceededException, AuthenticationRequiredException, UserNotFoundException, ScriptNotFoundException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testPutScript() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -285,11 +265,7 @@ public final void testPutScript() throws SyntaxException, QuotaExceededException
}

@Test
public final void testRenameScript() throws ScriptNotFoundException, IsActiveException, DuplicateException, AuthenticationRequiredException, SyntaxException, QuotaExceededException, UserNotFoundException, StorageException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testRenameScript() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -310,11 +286,7 @@ public final void testRenameScript() throws ScriptNotFoundException, IsActiveExc
}

@Test
public final void testSetActive() throws ScriptNotFoundException, AuthenticationRequiredException, UserNotFoundException, StorageException, QuotaExceededException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testSetActive() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -335,13 +307,7 @@ public final void testSetActive() throws ScriptNotFoundException, Authentication
}

@Test
public final void testGetActive() throws ScriptNotFoundException,
AuthenticationRequiredException, UserNotFoundException, StorageException,
QuotaExceededException {
MockSession session = new MockSession();
SieveRepository repository = new MockSieveRepository();
CoreProcessor core = new CoreProcessor(session, repository, new MockSieveParser());

public final void testGetActive() throws Exception {
// Unauthorised
boolean success = false;
session.setAuthentication(false);
@@ -1,3 +1,4 @@
<?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
@@ -32,17 +33,12 @@

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-manager-core</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-core</artifactId>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -1,3 +1,4 @@
<?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
@@ -31,21 +32,16 @@

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-manager-core</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-mailet-api</artifactId>
<version>${apache-mailet.version}</version>
</dependency>
<dependency>
<groupId>org.apache.james</groupId>
<artifactId>apache-mailet-base</artifactId>
<version>${apache-mailet.version}</version>
</dependency>
<dependency>
<groupId>${javax.mail.groupId}</groupId>
@@ -56,10 +52,8 @@
<artifactId>${javax.activation.artifactId}</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-manager-mock</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies>
@@ -1,3 +1,4 @@
<?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
@@ -32,11 +33,8 @@

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<groupId>org.apache.james</groupId>
<artifactId>apache-jsieve-manager-api</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
@@ -1,3 +1,4 @@
<?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
@@ -32,14 +33,6 @@
<name>Apache James :: jSieve :: Manager</name>
<inceptionYear>2012</inceptionYear>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<modules>
<module>api</module>
<module>core</module>
@@ -48,10 +41,4 @@
<module>mock</module>
</modules>

<properties>
<target.jdk>1.6</target.jdk>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<commons-io.version>2.1</commons-io.version>
<apache-mailet.version>2.5.0-SNAPSHOT</apache-mailet.version>
</properties>
</project>
11 pom.xml
@@ -76,6 +76,8 @@
<javax.activation.artifactId>geronimo-activation_1.1_spec</javax.activation.artifactId>

<target.jdk>1.6</target.jdk>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<mime4j.version>0.7.2</mime4j.version>
<apache-mailet.version>2.5.0-SNAPSHOT</apache-mailet.version>
<junit.version>4.10</junit.version>
@@ -85,6 +87,7 @@
<activation.version>1.1.1</activation.version>
<geronimo-activation.version>1.1</geronimo-activation.version>
<geronimo-javamail.version>1.8.3</geronimo-javamail.version>
<commons-io.version>2.1</commons-io.version>
</properties>

<dependencyManagement>
@@ -234,6 +237,14 @@
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>

0 comments on commit 8808744

Please sign in to comment.