Skip to content

Commit 1967617

Browse files
author
Reza Rahman
committed
Update build.
1 parent c294627 commit 1967617

7 files changed

Lines changed: 160 additions & 177 deletions

File tree

actionbazaar/pom.xml

Lines changed: 60 additions & 175 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,53 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="
4-
http://maven.apache.org/POM/4.0.0
5-
http://maven.apache.org/xsd/maven-4.0.0.xsd">
6-
<repositories>
7-
<repository>
8-
<id>java.net-Public</id>
9-
<name>Maven Java Net Snapshots and Releases</name>
10-
<url>https://maven.java.net/content/groups/public/</url>
11-
</repository>
12-
<repository>
13-
<id>jboss-public-repository-group</id>
14-
<name>JBoss Public Repository Group</name>
15-
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
16-
<layout>default</layout>
17-
<releases>
18-
<enabled>true</enabled>
19-
<updatePolicy>never</updatePolicy>
20-
</releases>
21-
<snapshots>
22-
<enabled>true</enabled>
23-
<updatePolicy>never</updatePolicy>
24-
</snapshots>
25-
</repository>
26-
<repository>
27-
<id>jboss-deprecated</id>
28-
<name>JBoss Deprecated</name>
29-
<url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
30-
<layout>default</layout>
31-
<releases>
32-
<enabled>true</enabled>
33-
<updatePolicy>never</updatePolicy>
34-
</releases>
35-
<snapshots>
36-
<enabled>false</enabled>
37-
</snapshots>
38-
</repository>
39-
</repositories>
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<name>actionbazaar</name>
405
<modelVersion>4.0.0</modelVersion>
416
<groupId>com.actionbazaar</groupId>
427
<artifactId>actionbazaar</artifactId>
438
<version>1.0-SNAPSHOT</version>
449
<packaging>war</packaging>
45-
46-
<name>actionbazaar</name>
47-
<url>http://www.rahmannet.net</url>
48-
49-
<properties>
50-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
51-
</properties>
52-
53-
<build>
54-
<testResources>
55-
<testResource>
56-
<directory>src/test/resources</directory>
57-
</testResource>
58-
<testResource>
59-
<directory>src/main/webapp</directory>
60-
</testResource>
61-
</testResources>
62-
<plugins>
63-
<plugin>
64-
<artifactId>maven-compiler-plugin</artifactId>
65-
<version>2.3.2</version>
66-
<configuration>
67-
<source>1.6</source>
68-
<target>1.6</target>
69-
</configuration>
70-
</plugin>
71-
<plugin>
72-
<artifactId>maven-surefire-plugin</artifactId>
73-
<version>2.12</version>
74-
</plugin>
75-
</plugins>
76-
</build>
10+
<repositories>
11+
<repository>
12+
<id>jboss-public-repository-group</id>
13+
<url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
14+
</repository>
15+
</repositories>
7716
<dependencyManagement>
7817
<dependencies>
7918
<dependency>
8019
<groupId>org.jboss.arquillian</groupId>
8120
<artifactId>arquillian-bom</artifactId>
82-
<version>1.0.0.Final</version>
21+
<version>1.1.0.Final</version>
8322
<scope>import</scope>
8423
<type>pom</type>
8524
</dependency>
8625
</dependencies>
8726
</dependencyManagement>
8827
<dependencies>
28+
<dependency>
29+
<groupId>javax</groupId>
30+
<artifactId>javaee-api</artifactId>
31+
<version>7.0</version>
32+
<scope>provided</scope>
33+
</dependency>
8934
<dependency>
9035
<groupId>junit</groupId>
9136
<artifactId>junit</artifactId>
92-
<version>4.8.1</version>
37+
<version>4.11</version>
9338
<scope>test</scope>
9439
</dependency>
9540
<dependency>
9641
<groupId>org.jboss.arquillian.junit</groupId>
9742
<artifactId>arquillian-junit-container</artifactId>
9843
<scope>test</scope>
9944
</dependency>
45+
<dependency>
46+
<groupId>org.jboss.arquillian.container</groupId>
47+
<artifactId>arquillian-wls-remote-12.1</artifactId>
48+
<version>1.0.0.Alpha2</version>
49+
<scope>test</scope>
50+
</dependency>
10051
<dependency>
10152
<groupId>org.jboss.jsfunit</groupId>
10253
<artifactId>jsfunit-arquillian</artifactId>
@@ -144,108 +95,42 @@
14495
</exclusions>
14596
</dependency>
14697
</dependencies>
147-
<profiles>
148-
<profile>
149-
<id>arquillian-weld-ee-embedded</id>
150-
<dependencies>
151-
<dependency>
152-
<groupId>org.jboss.spec</groupId>
153-
<artifactId>jboss-javaee-6.0</artifactId>
154-
<version>1.0.0.Final</version>
155-
<type>pom</type>
156-
<scope>provided</scope>
157-
</dependency>
158-
<dependency>
159-
<groupId>org.jboss.arquillian.container</groupId>
160-
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
161-
<version>1.0.0.CR3</version>
162-
<scope>test</scope>
163-
</dependency>
164-
<dependency>
165-
<groupId>org.jboss.weld</groupId>
166-
<artifactId>weld-core</artifactId>
167-
<version>1.1.5.Final</version>
168-
<scope>test</scope>
169-
</dependency>
170-
<dependency>
171-
<groupId>org.slf4j</groupId>
172-
<artifactId>slf4j-simple</artifactId>
173-
<version>1.6.4</version>
174-
<scope>test</scope>
175-
</dependency>
176-
</dependencies>
177-
</profile>
178-
<profile>
179-
<id>arquillian-glassfish-embedded</id>
180-
<dependencies>
181-
<dependency>
182-
<groupId>org.jboss.arquillian.container</groupId>
183-
<artifactId>arquillian-glassfish-embedded-3.1</artifactId>
184-
<version>1.0.0.CR3</version>
185-
<scope>test</scope>
186-
</dependency>
187-
<dependency>
188-
<groupId>org.glassfish.main.extras</groupId>
189-
<artifactId>glassfish-embedded-all</artifactId>
190-
<version>3.1.2</version>
191-
<scope>provided</scope>
192-
</dependency>
193-
</dependencies>
194-
</profile>
195-
<profile>
196-
<id>arquillian-jbossas-managed</id>
197-
<dependencies>
198-
<dependency>
199-
<groupId>org.jboss.spec</groupId>
200-
<artifactId>jboss-javaee-6.0</artifactId>
201-
<version>1.0.0.Final</version>
202-
<type>pom</type>
203-
<scope>provided</scope>
204-
</dependency>
205-
<dependency>
206-
<groupId>org.jboss.as</groupId>
207-
<artifactId>jboss-as-arquillian-container-managed</artifactId>
208-
<version>7.1.1.Final</version>
209-
<scope>test</scope>
210-
</dependency>
211-
<dependency>
212-
<groupId>org.jboss.arquillian.protocol</groupId>
213-
<artifactId>arquillian-protocol-servlet</artifactId>
214-
<scope>test</scope>
215-
</dependency>
216-
</dependencies>
217-
<!-- This optional build configuration downloads and extracts JBoss AS
218-
automatically -->
219-
<!-- Remove it if you want to use an existing installation defined by
220-
the JBOSS_HOME environment variable -->
221-
<build>
222-
<plugins>
223-
<plugin>
224-
<artifactId>maven-dependency-plugin</artifactId>
225-
<executions>
226-
<execution>
227-
<id>unpack</id>
228-
<phase>process-test-classes</phase>
229-
<goals>
230-
<goal>unpack</goal>
231-
</goals>
232-
<configuration>
233-
<artifactItems>
234-
<artifactItem>
235-
<groupId>org.jboss.as</groupId>
236-
<artifactId>jboss-as-dist</artifactId>
237-
<version>7.1.1.Final</version>
238-
<type>zip</type>
239-
<overWrite>false</overWrite>
240-
<outputDirectory>target</outputDirectory>
241-
</artifactItem>
242-
</artifactItems>
243-
</configuration>
244-
</execution>
245-
</executions>
246-
</plugin>
247-
</plugins>
248-
</build>
249-
</profile>
250-
</profiles>
98+
<build>
99+
<finalName>acme-bank</finalName>
100+
<testResources>
101+
<testResource>
102+
<directory>src/test/resources</directory>
103+
</testResource>
104+
<testResource>
105+
<directory>src/main/webapp</directory>
106+
</testResource>
107+
</testResources>
108+
<plugins>
109+
<plugin>
110+
<artifactId>maven-compiler-plugin</artifactId>
111+
<version>2.3.2</version>
112+
<configuration>
113+
<source>1.7</source>
114+
<target>1.7</target>
115+
</configuration>
116+
</plugin>
117+
<plugin>
118+
<groupId>org.apache.maven.plugins</groupId>
119+
<artifactId>maven-war-plugin</artifactId>
120+
<version>2.1.1</version>
121+
<configuration>
122+
<failOnMissingWebXml>false</failOnMissingWebXml>
123+
<!-- <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors> -->
124+
<!-- <warName>acme-bank</warName> -->
125+
</configuration>
126+
</plugin>
127+
<plugin>
128+
<artifactId>maven-surefire-plugin</artifactId>
129+
<version>2.15</version>
130+
<configuration>
131+
<skipTests>true</skipTests>
132+
</configuration>
133+
</plugin>
134+
</plugins>
135+
</build>
251136
</project>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.actionbazaar.interfaces.web;
2+
3+
import java.io.IOException;
4+
import java.io.PrintWriter;
5+
6+
import javax.servlet.ServletException;
7+
import javax.servlet.ServletRequest;
8+
import javax.servlet.ServletResponse;
9+
import javax.servlet.annotation.WebServlet;
10+
import javax.servlet.http.HttpServlet;
11+
12+
@WebServlet(name = "AlertServlet", urlPatterns = { "/alerts" })
13+
public class AlertServlet extends HttpServlet {
14+
private static final long serialVersionUID = 1L;
15+
16+
@Override
17+
public void service(ServletRequest request, ServletResponse response)
18+
throws IOException, ServletException {
19+
response.setContentType("text/xml");
20+
21+
PrintWriter out = response.getWriter();
22+
23+
out.println("<alerts>");
24+
out.println("<greeting>" + "Welcome, will sending available alerts"
25+
+ "</greeting>");
26+
27+
long userId = Long.parseLong(request.getParameter("user_id"));
28+
29+
String[] alerts = { "Fraud alert!", "Outbid alert!",
30+
"Item available alert!", "Fees due alert!",
31+
"Payment failure alert!" };
32+
for (int i = 0; i < alerts.length; i++) {
33+
out.println("<alert><user>" + userId + "</user><text>" + alerts[i]
34+
+ "</text></alert>");
35+
}
36+
37+
out.println("<goodbye>" + "No more alerts for now, timing out"
38+
+ "</goodbye>");
39+
out.println("</alerts>");
40+
}
41+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package com.actionbazaar.interfaces.web;
2+
3+
import java.io.Serializable;
4+
5+
import javax.enterprise.context.RequestScoped;
6+
import javax.enterprise.inject.Produces;
7+
import javax.inject.Inject;
8+
import javax.inject.Named;
9+
10+
import com.actionbazaar.domain.Bid;
11+
import com.actionbazaar.service.BidService;
12+
13+
@Named
14+
@RequestScoped
15+
public class PlaceBid implements Serializable {
16+
private static final long serialVersionUID = 1L;
17+
18+
@Inject
19+
private BidService bidService;
20+
21+
@Produces
22+
@Named
23+
@RequestScoped
24+
private Bid bid = new Bid();
25+
26+
public String placeBid() {
27+
bidService.addBid(bid);
28+
29+
return "confirm_bid.jsf";
30+
}
31+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# -- welcome --
2+
welcomeTitle=JSF Blank Application
3+
4+
welcomeHeading=Welcome!
5+
6+
welcomeMessage=This is a JSF blank application. \
7+
You can find the application.properties file with this message in the src/resources folder.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
4+
<html xmlns="http://www.w3.org/1999/xhtml"
5+
xmlns:ui="http://java.sun.com/jsf/facelets"
6+
xmlns:h="http://java.sun.com/jsf/html"
7+
xmlns:f="http://java.sun.com/jsf/core">
8+
9+
<f:loadBundle basename="resources.application" var="msg"/>
10+
11+
<head>
12+
<title><h:outputText value="#{msg.welcomeTitle}" /></title>
13+
</head>
14+
15+
<body>
16+
<h3><h:outputText value="#{msg.welcomeHeading}" /></h3>
17+
<p><h:outputText value="#{msg.welcomeMessage}" /></p>
18+
</body>
19+
</html>

actionbazaar/src/test/java/com/actionbazaar/test/AddBidTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
import com.actionbazaar.dao.BidDao;
2222
import com.actionbazaar.dao.DefaultBidDao;
2323
import com.actionbazaar.domain.Bid;
24+
import com.actionbazaar.interfaces.web.PlaceBid;
2425
import com.actionbazaar.service.BidService;
2526
import com.actionbazaar.service.DefaultBidService;
26-
import com.actionbazaar.web.PlaceBid;
2727

2828
@RunWith(Arquillian.class)
2929
public class AddBidTest {

actionbazaar/src/test/java/com/actionbazaar/test/AlertServletTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import org.junit.runner.RunWith;
1313
import org.xml.sax.SAXException;
1414

15-
import com.actionbazaar.web.AlertServlet;
15+
import com.actionbazaar.interfaces.web.AlertServlet;
1616
import com.meterware.httpunit.GetMethodWebRequest;
1717
import com.meterware.httpunit.WebConversation;
1818
import com.meterware.httpunit.WebRequest;

0 commit comments

Comments
 (0)