Skip to content

Commit af5ba6a

Browse files
committed
Merge branch 'master' of github.com:appfuse/appfuse
2 parents 5c65363 + 2b90b5f commit af5ba6a

File tree

32 files changed

+573
-606
lines changed

32 files changed

+573
-606
lines changed

archetypes/appfuse-basic-gwt/src/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
<groupId>org.codehaus.mojo</groupId>
4646
<artifactId>gwt-maven-plugin</artifactId>
4747
</plugin>
48-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
49-
<plugin>
50-
<groupId>org.codehaus.mojo</groupId>
51-
<artifactId>build-helper-maven-plugin</artifactId>
52-
</plugin>
5348
<plugin>
5449
<groupId>org.codehaus.mojo</groupId>
5550
<artifactId>exec-maven-plugin</artifactId>

archetypes/appfuse-basic-jsf/src/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
</repository>
2929
</repositories>
3030

31-
3231
<build>
3332
<plugins>
3433
<plugin>
@@ -39,11 +38,6 @@
3938
<groupId>org.codehaus.mojo</groupId>
4039
<artifactId>dbunit-maven-plugin</artifactId>
4140
</plugin>
42-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
43-
<plugin>
44-
<groupId>org.codehaus.mojo</groupId>
45-
<artifactId>build-helper-maven-plugin</artifactId>
46-
</plugin>
4741
</plugins>
4842
</build>
4943

archetypes/appfuse-basic-spring/src/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
<groupId>org.codehaus.mojo</groupId>
4040
<artifactId>dbunit-maven-plugin</artifactId>
4141
</plugin>
42-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
43-
<plugin>
44-
<groupId>org.codehaus.mojo</groupId>
45-
<artifactId>build-helper-maven-plugin</artifactId>
46-
</plugin>
4742
</plugins>
4843
</build>
4944

archetypes/appfuse-basic-struts/src/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
<groupId>org.codehaus.mojo</groupId>
4040
<artifactId>dbunit-maven-plugin</artifactId>
4141
</plugin>
42-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
43-
<plugin>
44-
<groupId>org.codehaus.mojo</groupId>
45-
<artifactId>build-helper-maven-plugin</artifactId>
46-
</plugin>
4742
</plugins>
4843
</build>
4944

archetypes/appfuse-basic-tapestry/src/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
<groupId>org.codehaus.mojo</groupId>
4040
<artifactId>dbunit-maven-plugin</artifactId>
4141
</plugin>
42-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
43-
<plugin>
44-
<groupId>org.codehaus.mojo</groupId>
45-
<artifactId>build-helper-maven-plugin</artifactId>
46-
</plugin>
4742
<plugin>
4843
<artifactId>maven-antrun-plugin</artifactId>
4944
<version>1.7</version>

archetypes/appfuse-basic-wicket/src/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@
3939
<groupId>org.codehaus.mojo</groupId>
4040
<artifactId>dbunit-maven-plugin</artifactId>
4141
</plugin>
42-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
43-
<plugin>
44-
<groupId>org.codehaus.mojo</groupId>
45-
<artifactId>build-helper-maven-plugin</artifactId>
46-
</plugin>
4742
</plugins>
4843
</build>
4944

archetypes/appfuse-modular-gwt/src/web/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
<groupId>org.codehaus.mojo</groupId>
2222
<artifactId>dbunit-maven-plugin</artifactId>
2323
</plugin>
24-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
25-
<plugin>
26-
<groupId>org.codehaus.mojo</groupId>
27-
<artifactId>build-helper-maven-plugin</artifactId>
28-
</plugin>
2924
<plugin>
3025
<groupId>org.codehaus.mojo</groupId>
3126
<artifactId>native2ascii-maven-plugin</artifactId>

archetypes/appfuse-modular-jsf/src/web/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
<groupId>org.codehaus.mojo</groupId>
2222
<artifactId>dbunit-maven-plugin</artifactId>
2323
</plugin>
24-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
25-
<plugin>
26-
<groupId>org.codehaus.mojo</groupId>
27-
<artifactId>build-helper-maven-plugin</artifactId>
28-
</plugin>
2924
<plugin>
3025
<groupId>org.codehaus.mojo</groupId>
3126
<artifactId>native2ascii-maven-plugin</artifactId>

archetypes/appfuse-modular-spring/src/web/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
<groupId>org.codehaus.mojo</groupId>
2222
<artifactId>dbunit-maven-plugin</artifactId>
2323
</plugin>
24-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
25-
<plugin>
26-
<groupId>org.codehaus.mojo</groupId>
27-
<artifactId>build-helper-maven-plugin</artifactId>
28-
</plugin>
2924
<plugin>
3025
<groupId>org.codehaus.mojo</groupId>
3126
<artifactId>native2ascii-maven-plugin</artifactId>

archetypes/appfuse-modular-struts/src/web/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
<groupId>org.codehaus.mojo</groupId>
2222
<artifactId>dbunit-maven-plugin</artifactId>
2323
</plugin>
24-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
25-
<plugin>
26-
<groupId>org.codehaus.mojo</groupId>
27-
<artifactId>build-helper-maven-plugin</artifactId>
28-
</plugin>
2924
<plugin>
3025
<groupId>org.codehaus.mojo</groupId>
3126
<artifactId>native2ascii-maven-plugin</artifactId>

archetypes/appfuse-modular-tapestry/src/web/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
<groupId>org.codehaus.mojo</groupId>
2222
<artifactId>dbunit-maven-plugin</artifactId>
2323
</plugin>
24-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
25-
<plugin>
26-
<groupId>org.codehaus.mojo</groupId>
27-
<artifactId>build-helper-maven-plugin</artifactId>
28-
</plugin>
2924
<plugin>
3025
<groupId>org.codehaus.mojo</groupId>
3126
<artifactId>native2ascii-maven-plugin</artifactId>

archetypes/appfuse-modular-wicket/src/web/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
<groupId>org.codehaus.mojo</groupId>
2222
<artifactId>dbunit-maven-plugin</artifactId>
2323
</plugin>
24-
<!-- Sets cargo.port and cargo.ajp.port to open ports -->
25-
<plugin>
26-
<groupId>org.codehaus.mojo</groupId>
27-
<artifactId>build-helper-maven-plugin</artifactId>
28-
</plugin>
2924
<plugin>
3025
<groupId>org.codehaus.mojo</groupId>
3126
<artifactId>native2ascii-maven-plugin</artifactId>

archetypes/appfuse-ws/src/enunciate.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.27.xsd">
3+
xsi:noNamespaceSchemaLocation="http://enunciate.codehaus.org/schemas/enunciate-1.29.xsd">
44
<api-import pattern="org.appfuse.model.*"/>
55
<api-import pattern="org.appfuse.service.*Service"/>
66
<api-import pattern="org.appfuse.service.**.*ManagerImpl"/>

archetypes/appfuse-ws/src/pom.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@
9090
</execution>
9191
</executions>
9292
</plugin>
93+
<plugin>
94+
<artifactId>maven-surefire-plugin</artifactId>
95+
<configuration>
96+
<excludes>
97+
<exclude>**/*IT*.java</exclude>
98+
</excludes>
99+
<includes>
100+
<include>**/*Test.java</include>
101+
<include>**/*Tests.java</include>
102+
</includes>
103+
</configuration>
104+
</plugin>
93105
<plugin>
94106
<groupId>org.eclipse.jetty</groupId>
95107
<artifactId>jetty-maven-plugin</artifactId>
@@ -143,6 +155,10 @@
143155
<artifactId>enunciate-cxf-rt</artifactId>
144156
<version>${enunciate.version}</version>
145157
</dependency>
158+
<dependency>
159+
<groupId>commons-dbcp</groupId>
160+
<artifactId>commons-dbcp</artifactId>
161+
</dependency>
146162
<dependency>
147163
<groupId>org.subethamail</groupId>
148164
<artifactId>subethasmtp-wiser</artifactId>
@@ -158,7 +174,46 @@
158174

159175
<!-- Framework/Plugin versions -->
160176
<appfuse.version>3.5.0-SNAPSHOT</appfuse.version>
177+
<!-- Enunciate doesn't work with CXF 3.x -->
178+
<cxf.version>2.6.0</cxf.version>
161179
<enunciate.version>1.28</enunciate.version>
162180
<java.version>1.7</java.version>
181+
<!-- This is necessary since the root AppFuse pom.xml has skipITs=true -->
182+
<skipITs>false</skipITs>
163183
</properties>
184+
185+
<profiles>
186+
<profile>
187+
<id>itest</id>
188+
<build>
189+
<plugins>
190+
<plugin>
191+
<groupId>org.codehaus.cargo</groupId>
192+
<artifactId>cargo-maven2-plugin</artifactId>
193+
</plugin>
194+
<plugin>
195+
<artifactId>maven-failsafe-plugin</artifactId>
196+
<configuration>
197+
<includes>
198+
<include>**/*IT*.java</include>
199+
</includes>
200+
<systemProperties>
201+
<context.path>${project.artifactId}</context.path>
202+
<cargo.host>${cargo.host}</cargo.host>
203+
<cargo.port>${cargo.port}</cargo.port>
204+
</systemProperties>
205+
</configuration>
206+
<executions>
207+
<execution>
208+
<goals>
209+
<goal>integration-test</goal>
210+
<goal>verify</goal>
211+
</goals>
212+
</execution>
213+
</executions>
214+
</plugin>
215+
</plugins>
216+
</build>
217+
</profile>
218+
</profiles>
164219
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package org.appfuse.api;
2+
3+
import org.apache.commons.logging.Log;
4+
import org.apache.commons.logging.LogFactory;
5+
import org.appfuse.model.User;
6+
import org.junit.Test;
7+
import org.springframework.http.*;
8+
import org.springframework.web.client.RestTemplate;
9+
10+
import java.net.URI;
11+
12+
import static org.junit.Assert.*;
13+
14+
public class UserApiITest {
15+
private final static Log log = LogFactory.getLog(UserApiITest.class);
16+
private RestTemplate restTemplate = new RestTemplate();
17+
18+
@Test
19+
public void testGetUsers() {
20+
ResponseEntity<User[]> result = restTemplate.getForEntity(getUsersPath(), User[].class);
21+
HttpStatus status = result.getStatusCode();
22+
User[] users = result.getBody();
23+
24+
log.debug("Users found: " + users.length);
25+
assertTrue(users.length > 0);
26+
assertEquals(HttpStatus.OK, status);
27+
}
28+
29+
public URI getUsersPath() {
30+
String contextPath = "/" + System.getProperty("context.path", "");
31+
String host = System.getProperty("cargo.host", "localhost");
32+
String port = System.getProperty("cargo.port", "8080");
33+
return URI.create("http://" + host + ":" + port + contextPath + "/api/users.json");
34+
}
35+
}

archetypes/appfuse-ws/src/src/test/resources/applicationContext-resources.xml

Lines changed: 0 additions & 21 deletions
This file was deleted.

archetypes/appfuse-ws/src/src/test/resources/jdbc.properties

Lines changed: 0 additions & 13 deletions
This file was deleted.

archetypes/appfuse-ws/src/src/test/resources/log4j2.xml

Lines changed: 0 additions & 28 deletions
This file was deleted.

archetypes/appfuse-ws/src/src/test/resources/mail.properties

Lines changed: 0 additions & 9 deletions
This file was deleted.

data/common/src/main/java/org/appfuse/model/User.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,9 @@ public void addRole(Role role) {
207207
* @see org.springframework.security.core.userdetails.UserDetails#getAuthorities()
208208
*/
209209
@Transient
210+
@JsonIgnore // needed for UserApiITest in appfuse-ws archetype
210211
public Set<GrantedAuthority> getAuthorities() {
211-
Set<GrantedAuthority> authorities = new LinkedHashSet<GrantedAuthority>();
212+
Set<GrantedAuthority> authorities = new LinkedHashSet<>();
212213
authorities.addAll(roles);
213214
return authorities;
214215
}

plugins/appfuse-maven-plugin/src/main/java/org/appfuse/mojo/installer/InstallSourceMojo.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ public void execute() throws MojoExecutionException, MojoFailureException {
262262
} else {
263263
pom = pom.replaceAll("<artifactId>hibernate4-maven-plugin</artifactId>",
264264
"<artifactId>hibernate4-maven-plugin</artifactId>\n" +
265-
" <configuration>\n" +
266-
" <scanDependencies>none</scanDependencies>\n" +
267-
" </configuration>");
265+
" <configuration>\n" +
266+
" <scanDependencies>none</scanDependencies>\n" +
267+
" </configuration>");
268268
}
269269

270270
// remove appfuse-data-common as a dependency
@@ -289,12 +289,20 @@ public void execute() throws MojoExecutionException, MojoFailureException {
289289
for (Object pluginArtifact : project.getPluginArtifacts()) {
290290
if (((Artifact) pluginArtifact).getArtifactId().contains("enunciate")) {
291291
isWebServicesProject = true;
292+
try {
293+
String enunciate = FileUtils.readFileToString(new File("enunciate.xml"), "UTF-8");
294+
enunciate = enunciate.replaceAll("org.appfuse", project.getGroupId());
295+
enunciate = adjustLineEndingsForOS(enunciate);
296+
FileUtils.writeStringToFile(new File("enunciate.xml"), enunciate, "UTF-8");
297+
} catch (IOException e) {
298+
getLog().error("Failed to rename 'org.appfuse' to '" + project.getGroupId() +
299+
" in enunciate.xml'. Please make this change manually.");
300+
}
292301
break;
293302
}
294303
}
295304

296305
if (project.getPackaging().equalsIgnoreCase("war")) {
297-
298306
if (webFramework == null && !isWebServicesProject) {
299307
getLog().error("The web.framework property is not specified - please modify your pom.xml to add " +
300308
" this property. For example: <web.framework>struts</web.framework>.");

0 commit comments

Comments
 (0)