Skip to content

Commit 53f674e

Browse files
author
Reza Rahman
committed
Got app working.
1 parent 4402d4f commit 53f674e

12 files changed

Lines changed: 324 additions & 319 deletions

File tree

actionbazaar/nb-configuration.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-shared-configuration>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10+
<!--
11+
Properties that influence various parts of the IDE, especially code formatting and the like.
12+
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+
That way multiple projects can share the same settings (useful for formatting rules for example).
14+
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+
-->
16+
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
17+
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>WebLogic9</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
18+
</properties>
19+
</project-shared-configuration>

actionbazaar/pom.xml

Lines changed: 118 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,121 @@
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="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<name>actionbazaar</name>
5-
<modelVersion>4.0.0</modelVersion>
6-
<groupId>com.actionbazaar</groupId>
7-
<artifactId>actionbazaar</artifactId>
8-
<version>1.0-SNAPSHOT</version>
9-
<packaging>war</packaging>
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>
16-
<dependencyManagement>
17-
<dependencies>
18-
<dependency>
19-
<groupId>org.jboss.arquillian</groupId>
20-
<artifactId>arquillian-bom</artifactId>
21-
<version>1.1.0.Final</version>
22-
<scope>import</scope>
23-
<type>pom</type>
24-
</dependency>
25-
<dependency>
26-
<groupId>org.jboss.shrinkwrap.resolver</groupId>
27-
<artifactId>shrinkwrap-resolver-bom</artifactId>
28-
<version>2.1.1</version>
29-
<type>pom</type>
30-
<scope>import</scope>
31-
</dependency>
32-
</dependencies>
33-
</dependencyManagement>
34-
<dependencies>
35-
<dependency>
36-
<groupId>javax</groupId>
37-
<artifactId>javaee-api</artifactId>
38-
<version>7.0</version>
39-
<scope>provided</scope>
40-
</dependency>
41-
<dependency>
42-
<groupId>org.glassfish.jersey.media</groupId>
43-
<artifactId>jersey-media-json-processing</artifactId>
44-
<version>2.5.1</version>
45-
<scope>compile</scope>
46-
</dependency>
47-
<dependency>
48-
<groupId>org.glassfish.jersey.containers</groupId>
49-
<artifactId>jersey-container-servlet-core</artifactId>
50-
<version>2.0</version>
51-
<type>jar</type>
52-
<scope>provided</scope>
53-
</dependency>
54-
<dependency>
55-
<groupId>org.glassfish.jersey.media</groupId>
56-
<artifactId>jersey-media-moxy</artifactId>
57-
<version>2.0</version>
58-
<type>jar</type>
59-
<scope>provided</scope>
60-
</dependency>
61-
<dependency>
62-
<groupId>junit</groupId>
63-
<artifactId>junit</artifactId>
64-
<version>4.11</version>
65-
<scope>test</scope>
66-
</dependency>
67-
<dependency>
68-
<groupId>org.jboss.arquillian.junit</groupId>
69-
<artifactId>arquillian-junit-container</artifactId>
70-
<scope>test</scope>
71-
</dependency>
72-
<dependency>
73-
<groupId>org.jboss.shrinkwrap.resolver</groupId>
74-
<artifactId>shrinkwrap-resolver-depchain</artifactId>
75-
<type>pom</type>
76-
<scope>test</scope>
77-
</dependency>
78-
<dependency>
79-
<groupId>org.jboss.arquillian.container</groupId>
80-
<artifactId>arquillian-wls-remote-12.1</artifactId>
81-
<version>1.0.0.Alpha2</version>
82-
<scope>test</scope>
83-
</dependency>
84-
<dependency>
85-
<groupId>org.jboss.jsfunit</groupId>
86-
<artifactId>jsfunit-arquillian</artifactId>
87-
<version>2.0.0.Beta3-SNAPSHOT</version>
88-
</dependency>
89-
</dependencies>
90-
<build>
91-
<finalName>actionbazaar</finalName>
92-
<testResources>
93-
<testResource>
94-
<directory>src/test/resources</directory>
95-
</testResource>
96-
<testResource>
97-
<directory>src/main/webapp</directory>
98-
</testResource>
99-
</testResources>
100-
<plugins>
101-
<plugin>
102-
<artifactId>maven-compiler-plugin</artifactId>
103-
<version>2.3.2</version>
104-
<configuration>
105-
<source>1.7</source>
106-
<target>1.7</target>
107-
</configuration>
108-
</plugin>
109-
<plugin>
110-
<groupId>org.apache.maven.plugins</groupId>
111-
<artifactId>maven-war-plugin</artifactId>
112-
<version>2.1.1</version>
113-
<configuration>
114-
<failOnMissingWebXml>false</failOnMissingWebXml>
115-
<!-- <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors> -->
116-
<!-- <warName>actionbazaar</warName> -->
117-
</configuration>
118-
</plugin>
119-
<plugin>
120-
<artifactId>maven-surefire-plugin</artifactId>
121-
<version>2.15</version>
122-
<configuration>
123-
<skipTests>true</skipTests>
124-
</configuration>
125-
</plugin>
126-
</plugins>
127-
</build>
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>
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.actionbazaar</groupId>
7+
<artifactId>actionbazaar</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
<packaging>war</packaging>
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>
16+
<dependencyManagement>
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.jboss.arquillian</groupId>
20+
<artifactId>arquillian-bom</artifactId>
21+
<version>1.1.0.Final</version>
22+
<scope>import</scope>
23+
<type>pom</type>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.jboss.shrinkwrap.resolver</groupId>
27+
<artifactId>shrinkwrap-resolver-bom</artifactId>
28+
<version>2.1.1</version>
29+
<type>pom</type>
30+
<scope>import</scope>
31+
</dependency>
32+
</dependencies>
33+
</dependencyManagement>
34+
<dependencies>
35+
<dependency>
36+
<groupId>javax</groupId>
37+
<artifactId>javaee-api</artifactId>
38+
<version>7.0</version>
39+
<scope>provided</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.glassfish.jersey.media</groupId>
43+
<artifactId>jersey-media-json-processing</artifactId>
44+
<version>2.5.1</version>
45+
<scope>compile</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.glassfish.jersey.containers</groupId>
49+
<artifactId>jersey-container-servlet-core</artifactId>
50+
<version>2.0</version>
51+
<type>jar</type>
52+
<scope>provided</scope>
53+
</dependency>
54+
<dependency>
55+
<groupId>junit</groupId>
56+
<artifactId>junit</artifactId>
57+
<version>4.11</version>
58+
<scope>test</scope>
59+
</dependency>
60+
<dependency>
61+
<groupId>org.jboss.arquillian.junit</groupId>
62+
<artifactId>arquillian-junit-container</artifactId>
63+
<scope>test</scope>
64+
</dependency>
65+
<dependency>
66+
<groupId>org.jboss.shrinkwrap.resolver</groupId>
67+
<artifactId>shrinkwrap-resolver-depchain</artifactId>
68+
<type>pom</type>
69+
<scope>test</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.jboss.arquillian.container</groupId>
73+
<artifactId>arquillian-wls-remote-12.1</artifactId>
74+
<version>1.0.0.Alpha2</version>
75+
<scope>test</scope>
76+
</dependency>
77+
<dependency>
78+
<groupId>org.jboss.jsfunit</groupId>
79+
<artifactId>jsfunit-arquillian</artifactId>
80+
<version>2.0.0.Beta3-SNAPSHOT</version>
81+
</dependency>
82+
</dependencies>
83+
<build>
84+
<finalName>actionbazaar</finalName>
85+
<testResources>
86+
<testResource>
87+
<directory>src/test/resources</directory>
88+
</testResource>
89+
<testResource>
90+
<directory>src/main/webapp</directory>
91+
</testResource>
92+
</testResources>
93+
<plugins>
94+
<plugin>
95+
<artifactId>maven-compiler-plugin</artifactId>
96+
<version>2.3.2</version>
97+
<configuration>
98+
<source>1.7</source>
99+
<target>1.7</target>
100+
</configuration>
101+
</plugin>
102+
<plugin>
103+
<groupId>org.apache.maven.plugins</groupId>
104+
<artifactId>maven-war-plugin</artifactId>
105+
<version>2.1.1</version>
106+
<configuration>
107+
<failOnMissingWebXml>false</failOnMissingWebXml>
108+
<!-- <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors> -->
109+
<!-- <warName>actionbazaar</warName> -->
110+
</configuration>
111+
</plugin>
112+
<plugin>
113+
<artifactId>maven-surefire-plugin</artifactId>
114+
<version>2.15</version>
115+
<configuration>
116+
<skipTests>false</skipTests>
117+
</configuration>
118+
</plugin>
119+
</plugins>
120+
</build>
128121
</project>

actionbazaar/src/main/java/com/actionbazaar/domain/Bid.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,10 @@ public Double getAmount() {
5555
public void setAmount(Double amount) {
5656
this.amount = amount;
5757
}
58+
59+
@Override
60+
public String toString() {
61+
return "Bid [id=" + id + ", bidder=" + bidder + ", item=" + item
62+
+ ", amount=" + amount + "]";
63+
}
5864
}

actionbazaar/src/main/java/com/actionbazaar/interfaces/rest/JsonMoxyConfigurationContextResolver.java

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package com.actionbazaar.interfaces.rest;
22

33
import javax.ws.rs.ApplicationPath;
4-
5-
import org.glassfish.jersey.moxy.json.MoxyJsonFeature;
64
import org.glassfish.jersey.server.ResourceConfig;
75

86
/**
@@ -11,13 +9,8 @@
119
@ApplicationPath("rest")
1210
public class RestConfiguration extends ResourceConfig {
1311

14-
public RestConfiguration() {
15-
// Resources
16-
packages(new String[] { BidRestService.class.getPackage().getName() });
17-
// Providers - JSON.
18-
register(new MoxyJsonFeature());
19-
register(new JsonMoxyConfigurationContextResolver()); // TODO See if
20-
// this can be
21-
// removed.
22-
}
23-
}
12+
public RestConfiguration() {
13+
// Resource
14+
packages(new String[]{BidRestService.class.getPackage().getName()}); // removed.
15+
}
16+
}
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
11
package com.actionbazaar.interfaces.web;
22

3+
import com.actionbazaar.application.BidService;
4+
import com.actionbazaar.domain.Bid;
35
import java.io.Serializable;
4-
56
import javax.enterprise.context.RequestScoped;
67
import javax.enterprise.inject.Produces;
78
import javax.inject.Inject;
89
import javax.inject.Named;
910

10-
import com.actionbazaar.application.BidService;
11-
import com.actionbazaar.domain.Bid;
12-
1311
@Named
1412
@RequestScoped
1513
public class AddBid implements Serializable {
16-
private static final long serialVersionUID = 1L;
1714

18-
@Inject
19-
private BidService bidService;
15+
private static final long serialVersionUID = 1L;
16+
17+
@Inject
18+
private BidService bidService;
2019

21-
@Produces
22-
@Named
23-
@RequestScoped
24-
private Bid bid = new Bid();
20+
@Produces
21+
@Named
22+
@RequestScoped
23+
private Bid bid = new Bid();
2524

26-
public String addBid() {
27-
bidService.addBid(bid);
25+
public String addBid() {
26+
bidService.addBid(bid);
2827

29-
return "confirm_bid.jsf";
30-
}
31-
}
28+
return "confirm_bid.jsf";
29+
}
30+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<beans xmlns="http://java.sun.com/xml/ns/javaee"/>

0 commit comments

Comments
 (0)