AWS Lambda with Apache Kafka Trigger returns "PROBLEM: Lambda internal error. Please contact Lambda customer support." - spring-cloud-function

I am using Spring Cloud Functions with Kafka Binder. My application SpringcloudfuncApplication.class
is pretty straightforward as can be seen below:
#SpringBootApplication
#Log4j2
public class SpringcloudfuncApplication {
public static void main(String[] args) {
SpringApplication.run(SpringcloudfuncApplication.class, args);
}
#Bean
public Function<Message<String>, String> greeter() {
return (input) -> {
log.info("Hello {}", input.getPayload());
return "Hello " + input.getPayload();
};
}
}
I am expecting a incoming StringInput then will return a greeting -> Hello {StringInput}
I have setup a self-managed Apache Kafka/Zookeeper on AWS EC2 instance with public access for testing purposes then updated my application.yml file:
spring:
cloud:
function:
definition: greeter
stream:
kafka:
default:
consumer:
startOffset: earliest
binder:
brokers: ec2-13-212-236-60.ap-southeast-1.compute.amazonaws.com:9092
bindings:
greeter-in-0:
destination: topic-names
greeter-out-0:
destination: topic-greetings
Everything is working fine on my local setup pointing to this AWS EC2 with Kafka/Zookeeper. However, I am not able to make this work when I attempt to create a function in AWS Lambda with my shaded jar then added Apache Kafka for trigger. I have followed this AWS Blog in setting up AWS Lambda with self-hosted Kafka as an Event source.
Take note that doing a AWS Lambda test by sending a string (using hello-world template) my function works. But adding a Kafka trigger gives me below error:
Last processing result: PROBLEM: Lambda internal error. Please contact Lambda customer support.
Maven dependencies:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-function-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-kafka</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-adapter-aws</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Maven build plugin for shaded JAR:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
</excludes>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>${spring-boot-thin-layout.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>aws</shadedClassifierName>
</configuration>
</plugin>
</plugins>
</build>
Thank you in advance! Cheers!

It looks like the main issue is I have used public subnet on my EC2 instance with Apache Kafka/Zookeeper thus I have declared a public DNS on the AWS Lambda trigger - Apache Kafka Bootsrap servers. Now, I got it working by going thru again this reference but instead of using a NAT gateway I have setup a NAT Instance for better costing. I am now getting OK on the processing results.
Apache Kafka: Endpoints: [ip-10-0-1-199.ap-southeast-1.compute.internal:9092] (Enabled)
Details
Batch size: 100
Last processing result: OK
selfManagedEventSource:
Looking into the AWS CloudWatch logs, I am now seeing these logs:
2021-03-02 12:00:45.912 INFO 8 --- [ main] o.s.c.f.a.aws.CustomRuntimeEventLoop : Located function greeter
2021-03-02 12:00:45.918 INFO 8 --- [ main] c.j.s.s.SpringcloudfuncApplication : Hello {
"eventSource": "SelfManagedKafka",
"bootstrapServers": "ip-10-0-1-199.ap-southeast-1.compute.internal:9092",
"records": {
"topic-names-0": [
{
"topic": "topic-names",
"partition": 0,
"offset": 13,
"timestamp": 1614686444377,
"timestampType": "CREATE_TIME",
"value": "SnVuIEtpbmc="
}
]
}
}
And this goes to my next question, my String message produced on the topic is "Jun King" but the message returned to me is a JSON payload with my expected value encoded into Base64. I have tried to decode "SnVuIEtpbmc=" using this Online Base64Decoder which indeed return my actual message "Jun King".
I can process this within the code but would that make my function AWS-aware? and would have to traverse it. Thank you again in advance. Cheers!

Related

Invoke command / Json Format Error during Amazon Web Services (AWS) Lambda Tutorial

I've spent ~6 hours banging my head against an issue encountered in the official tutorial for Amazon Web Services (AWS) Lambda. I'm only using code provided in the tutorial..
I encounter the issue on Step 2.3.2: Test the Lambda Function (Invoke Manually), found on this page:
https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-upload-deployment-pkg.html?shortFooter=true
At this step we're creating an inputfile.txt using code provided by the AWS tutorial - the code simulates an "event" which triggers lambda.
Here's the code that goes into the inputfile.txt (I'm only copying & pasting from the tutorial):
{
"Records":[
{
"eventVersion":"2.0",
"eventSource":"aws:s3",
"awsRegion":"us-west-2",
"eventTime":"1970-01-01T00:00:00.000Z",
"eventName":"ObjectCreated:Put",
"userIdentity":{
"principalId":"AIDAJDPLRKLG7UEXAMPLE"
},
"requestParameters":{
"sourceIPAddress":"127.0.0.1"
},
"responseElements":{
"x-amz-request-id":"C3D13FE58DE4C810",
"x-amz-id-2":"FMyUVURIY8/IgAtTv8xRjskZQpcIZ9KG4V5Wp6S7S/JRWeUWerMUE5JgHvANOjpD"
},
"s3":{
"s3SchemaVersion":"1.0",
"configurationId":"testConfigRule",
"bucket":{
"name":"sourcebucket",
"ownerIdentity":{
"principalId":"A3NL1KOZZKExample"
},
"arn":"arn:aws:s3:::sourcebucket"
},
"object":{
"key":"HappyFace.jpg",
"size":1024,
"eTag":"d41d8cd98f00b204e9800998ecf8427e",
"versionId":"096fKKXTRTtl3on89fVO.nfljtsv6qko"
}
}
}
]
}
Here's the code which activates the inputfile.txt as an "event":
aws lambda invoke \
--invocation-type Event \
--function-name CreateThumbnail7 \
--region us-west-2 \
--payload file:/Users/username/inputfile.txt \
--profile adminuser \
outputfile.txt
and the error message about the invoke command:
An error occurred (InvalidRequestContentException) when calling the Invoke operation: Could not parse request body into json: Unrecognized token 'file': was expecting 'null', 'true', 'false' or NaN
at [Source: [B#4aeacf9d; line: 1, column: 6]
(???)
Any ideas what could be happening / how to fix? Is this about the format of the inputfile.txt?
I've tried everything I can think of.. I must be doing something wrong or there must be an easy fix for the JSON formatting.
For those who find this thread and are struggling with Javascript deployment package step in the Amazon Web Services (AWS) Lamba tutorial, there are three separate issues in the tutorial guidelines which you must address:
1.) Make sure your Java environment is 8, Java10 will throw a number of errors.
2.) #MikePatrick is correct, the path to your inputfile MUST be: file:///Users/username/inputfile.txt
3.) And finally, try using this pom.xml file (note the dependencies), this is the only combo that worked for me:
<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>
<groupId>doc-examples</groupId>
<artifactId>lambda-java-example</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>lambda-java-example</name>
<dependencies>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-events</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-log4j2</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.11.349</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.3</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

Redirect http requests to https with tomcat server and aws load balancer

I have set up an ec2 instance with a java web application running on a tomcat server and an aws application load balancer which directs port 80 and 443 to port 8080 on the ec2 instance.
I have changed the server.xml configuration on tomcat to the following
<Connector port="8080" protocol="HTTP/1.1"
proxyPort="443"
proxyName="sub.mydomain.com"
scheme="https"
secure="true"
connectionTimeout="20000"
redirectPort="8443" />
Now I am able to connect go to "sub.mydomain.com" and "https ://sub.mydomain.com". But how do I redirect all "http ://sub.mydomain.com" requests to "https ://sub.mydomain.com"?
Just add this in your web.xml
<security-constraint>
<web-resource-collection>
<web-resource-name>HTTPSOnly</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

Does WSO2 support MySQL Master/Slave Cluster?

I have tried to use MySQL Master/Slave cluster in WSO2 cluster deployment, but failed when startup. Does WSO2 only support MySql Share-Nothing cluster? How does it support MySQL Master/Slave?
My datasource was configured as below:
<datasource>
<name>WSO2REG_LOCAL</name>
<description>The datasource used for registry</description>
<jndiConfig>
<name>jdbc/WSO2REG_LOCAL</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql:replication://wso2dbmaster:3306,wso2dbslave1:3306,wso2dbslave2:3306/WSO2_REG_LOCAL_AM_GW_MGR_1?roundRobinLoadBalance=true;autoReconnect=true;</url>
<username>test</username>
<password>test</password>
<driverClassName>com.mysql.jdbc.ReplicationDriver</driverClassName>
<defaultAutoCommit>false</defaultAutoCommit>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
<datasource>
<name>WSO2REG_DB</name>
<description>This shared datasource used for registry</description>
<jndiConfig>
<name>jdbc/WSO2REG_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql:replication://wso2dbmaster:3306,wso2dbslave1:3306,wso2dbslave2:3306/WSO2_REG_DB?roundRobinLoadBalance=true;autoReconnect=true;</url>
<username>test</username>
<password>test</password>
<driverClassName>com.mysql.jdbc.ReplicationDriver</driverClassName>
<defaultAutoCommit>false</defaultAutoCommit>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
registry.xml was configured as below:
<currentDBConfig>wso2registry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2REG_LOCAL</dataSource>
</dbConfig>
<dbConfig name="sharedregistry">
<dataSource>jdbc/WSO2REG_DB</dataSource>
</dbConfig>
<remoteInstance url="https://localhost:9443/registry">
<id>instanceid</id>
<dbConfig>sharedregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<cacheId>wso2db#jdbc:mysql:replication://wso2dbmaster:3306,wso2dbslave1:3306,wso2dbslave2:3306/WSO2_REG_DB?roundRobinLoadBalance=true;autoReconnect=true;</cacheId>
</remoteInstance>
Exception occurred as below when starting up.
TID: [0] [AM] [2015-03-09 13:30:51,728] ERROR {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Unable to create fixed remote mounts. {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent}
org.wso2.carbon.registry.core.exceptions.RegistryException: An exception occurred while executing handler chain. null
....
ID: [0] [AM] [2015-03-09 13:31:03,417] ERROR {org.wso2.carbon.registry.core.dataaccess.TransactionManager} - Failed to rollback transaction. {org.wso2.carbon.registry.core.dataaccess.TransactionManager}
java.sql.SQLException: Total number of available connections are less than the total number of rollbacked or committed connections
at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction$ManagedRegistryConnection.rollback(JDBCDatabaseTransaction.java:1284)
at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager.rollbackTransaction(JDBCTransactionManager.java:120)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.rollbackTransaction(EmbeddedRegistry.java:447)
at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.get(EmbeddedRegistry.java:552)
at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.get(CacheBackedRegistry.java:180)
at org.wso2.carbon.registry.core.session.UserRegistry.get(UserRegistry.java:524)
...
Normally the reason for this error is, you are using the same database for local registry space and governance space.
if you are using the same jdbc/WSO2REG_DB database as local and governance registry spaces. It is wrong by definition. It is not correct to share local registry space between any nodes in a cluster. Ideally, you could use the default H2 database as local registry database (jdbc/WSO2CarbonDB). Basically you need to keep following configuration in registry.xml file by pointing to H2 db. Just found some blog about same error which may be helpful.
<currentDBConfig>wso2registry</currentDBConfig>
<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>

how to set up Data Services Server cluster

Is there a detailed tutorials about how to set up Data Services Server cluster.
I followed the guide http://docs.wso2.org/pages/viewpage.action?pageId=29918203, but it is not specifically for DSS.
And I also have some problems about this guide.
In section "Setting up the database", how many database should we need to create? carbondb, wso2conum_db or wso2conreg_db?
I have only found the process of creating wso2conum_db or wso2conreg_db, but not found the process of creating carbondb.
Shall I need to configure a user management database, a shared registry database and a central database in "ESB_MGR_HOME/repository/conf/datasoruces/master-datasources.xml"?
Clustering data services is similar to clustering Application server http://docs.wso2.org/display/CLUSTER420/Clustering+Application+Server
For database configuration
You only need two databases.
1) wso2conreg_db - which stores the registry data (you can give any name you prefer)
2) wso2conum_db - which stores user management related data.(you can give any name you prefer)
These data sources needs to be defined in master-datasources.xml according to your database credentials as shown below.
Mounting the Registry to ESB nodes (master-datasources.xml)
<datasource>
<name>WSO2_REG_DB</name>
<description>The datasource used for registry</description>
<jndiConfig>
<name>jdbc/WSO2_REG_DB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/wso2conreg_db</url>
<username>root</username>
<password>root</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
Configure the user management database master-datasources.xml
<datasource>
<name>WSO2_UM_DB</name>
<description>The datasource used for registry and user manager</description>
<jndiConfig>
<name>jdbc/WSO2UmDB</name>
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/wso2conum_db</url>
<username>root</username>
<password>root</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
</configuration>
</definition>
</datasource>
Mounting the Registry to ESB nodes - registry.xml
<dbConfig name="remote_registry">
<dataSource>jdbc/WSO2_REG_DB</dataSource>
</dbConfig>
<remoteInstance url="https://localhost:9445/registry">
<id>instanceid</id>
<dbConfig>remote_registry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
</remoteInstance>
<mount path="/_system/config" overwrite="true">
<instanceId>instanceid</instanceId>
<targetPath>/_system/esbnodes</targetPath>
</mount>
<mount path="/_system/governance" overwrite="true">
<instanceId>instanceid</instanceId>
<targetPath>/_system/governance</targetPath>
</mount>
Specify the userstore in user-mgt.xml
<Property name=”dataSource”>jdbc/WSO2UmDB</Property>

Maven can't see tests

I'm using maven to run my selenium tests but it doesn't find this tests i put it under src/test/java. My test class is named SeleniumTest.java so it follows convention (*Test.java) here's the code :
<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>
<groupId>com.tests.functional.selenium</groupId>
<artifactId>functionalTestsSelenium</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>functionalTestsSelenium Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
<version>1.0.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>functionalTestsSelenium</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
</plugin>
<!-- Start the tomcat server and Deploy the war -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<wait>false</wait>
<container>
<containerId>tomcat6x</containerId>
<type>installed</type>
<home>${env.CATALINA_HOME}</home>
</container>
</configuration>
<executions>
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
<goal>deploy</goal>
</goals>
</execution>
<execution>
<id>stop-container</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Start the selenium server -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<background>true</background>
<logOutput>true</logOutput>
</configuration>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-server</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Fire the function tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<junitArtifactname>
org.junit:com.springsource.org.junit
</junitArtifactname>
<excludes>
excluding the test class in the functional tests package
during the test phase
<exclude>**/functional/*Test.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<!-- Running the tests in the functional tests package during the integration tests phase. -->
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<excludes>
<exclude>none</exclude>
</excludes>
<includes>
<include>**/functional/*Test.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
here's my test class :
package functional;
import com.thoughtworks.selenium.SeleneseTestCase;
public class SeleniumTest extends SeleneseTestCase {
#Override
public void setUp() throws Exception {
setUp("http://www.netapsys.fr"); // délégation de la configuration à la classe parente
}
public void test() {
selenium.open("/"); // ouverture de la page
selenium.waitForPageToLoad("5000");
assertTrue(selenium.isTextPresent("Netapsys"));
}
}
here's the console result after running :
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building seleniumproject Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) # seleniumproject ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # seleniumproject ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) # seleniumproject ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\neila\workspace\seleniumproject\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # seleniumproject ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) # seleniumproject ---
[INFO] No tests to run.
[INFO] Surefire report directory: C:\Users\neila\workspace\seleniumproject\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.0.2:war (default-war) # seleniumproject ---
[INFO] Exploding webapp...
[INFO] Assembling webapp seleniumproject in C:\Users\neila\workspace\seleniumproject\target\seleniumproject
[INFO] Copy webapp webResources to C:\Users\neila\workspace\seleniumproject\target\seleniumproject
[INFO] Generating war C:\Users\neila\workspace\seleniumproject\target\seleniumproject.war
[INFO] Building war: C:\Users\neila\workspace\seleniumproject\target\seleniumproject.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.922s
[INFO] Finished at: Wed Jul 04 08:18:56 GMT+01:00 2012
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
Your test belongs to the package functional. Thus, it will not run during the test phase, as your pom specifies that any *functional* package should be excluded:
<configuration>
<junitArtifactname>
org.junit:com.springsource.org.junit
</junitArtifactname>
<excludes>
excluding the test class in the functional tests package
during the test phase
<exclude>**/functional/*Test.java</exclude>
</excludes>
</configuration>
Your pom is configured to start (and stop) the Selenium server during the pre-integration-test and post-integration-test phases. However, during these phases, you do not ask to run any test. I suggest that you have a look on the failsafe Maven plugin to run your functional.* Selenium tests during the integration-test phase.