Commit c39565d515c4838b05b8f44d3e0d53e5d4b9e54e
1 parent
53c710d3
Exists in
master
Criação da extensão REST
Showing
42 changed files
with
494 additions
and
33 deletions
Show diff stats
archetype/jsf-jpa/.gitignore
archetype/jsf-jpa/pom.xml
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | <parent> |
46 | 46 | <groupId>br.gov.frameworkdemoiselle</groupId> |
47 | 47 | <artifactId>demoiselle-archetype-parent</artifactId> |
48 | - <version>2.4.1-SNAPSHOT</version> | |
48 | + <version>2.5.0-SNAPSHOT</version> | |
49 | 49 | <relativePath>../../parent/archetype</relativePath> |
50 | 50 | </parent> |
51 | 51 | ... | ... |
archetype/minimal/pom.xml
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | <parent> |
46 | 46 | <groupId>br.gov.frameworkdemoiselle</groupId> |
47 | 47 | <artifactId>demoiselle-archetype-parent</artifactId> |
48 | - <version>2.4.1-SNAPSHOT</version> | |
48 | + <version>2.5.0-SNAPSHOT</version> | |
49 | 49 | <relativePath>../../parent/archetype</relativePath> |
50 | 50 | </parent> |
51 | 51 | ... | ... |
documentation/quickstart/.gitignore
documentation/quickstart/pom.xml
documentation/reference/.gitignore
documentation/reference/pom.xml
impl/core/.gitignore
impl/core/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-framework-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../parent/framework</relativePath> |
49 | 49 | </parent> |
50 | 50 | |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | <dependency> |
73 | 73 | <groupId>br.gov.frameworkdemoiselle</groupId> |
74 | 74 | <artifactId>demoiselle-framework-bom</artifactId> |
75 | - <version>2.4.1-SNAPSHOT</version> | |
75 | + <version>2.5.0-SNAPSHOT</version> | |
76 | 76 | <scope>import</scope> |
77 | 77 | <type>pom</type> |
78 | 78 | </dependency> | ... | ... |
impl/extension/jdbc/.gitignore
impl/extension/jdbc/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
impl/extension/jmx/.gitignore
impl/extension/jmx/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <artifactId>demoiselle-extension-parent</artifactId> |
46 | 46 | <groupId>br.gov.frameworkdemoiselle</groupId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
impl/extension/jpa/.gitignore
impl/extension/jpa/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
impl/extension/jsf/.gitignore
impl/extension/jsf/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
impl/extension/jta/.gitignore
impl/extension/jta/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
... | ... | @@ -0,0 +1,144 @@ |
1 | +<!-- | |
2 | + Demoiselle Framework | |
3 | + Copyright (C) 2010 SERPRO | |
4 | + ============================================================================ | |
5 | + This file is part of Demoiselle Framework. | |
6 | + | |
7 | + Demoiselle Framework is free software; you can redistribute it and/or | |
8 | + modify it under the terms of the GNU Lesser General Public License version 3 | |
9 | + as published by the Free Software Foundation. | |
10 | + | |
11 | + This program is distributed in the hope that it will be useful, | |
12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + GNU General Public License for more details. | |
15 | + | |
16 | + You should have received a copy of the GNU Lesser General Public License version 3 | |
17 | + along with this program; if not, see <http://www.gnu.org/licenses /> | |
18 | + or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
19 | + Fifth Floor, Boston, MA 02110-1301, USA. | |
20 | + ============================================================================ | |
21 | + Este arquivo é parte do Framework Demoiselle. | |
22 | + | |
23 | + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
24 | + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
25 | + do Software Livre (FSF). | |
26 | + | |
27 | + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
28 | + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
29 | + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
30 | + para maiores detalhes. | |
31 | + | |
32 | + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
33 | + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses /> | |
34 | + ou escreva para a Fundação do Software Livre (FSF) Inc., | |
35 | + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
36 | +--> | |
37 | +<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"> | |
38 | + | |
39 | + <modelVersion>4.0.0</modelVersion> | |
40 | + | |
41 | + <artifactId>demoiselle-rest</artifactId> | |
42 | + <packaging>jar</packaging> | |
43 | + | |
44 | + <parent> | |
45 | + <groupId>br.gov.frameworkdemoiselle</groupId> | |
46 | + <artifactId>demoiselle-extension-parent</artifactId> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | + <relativePath>../../../parent/extension</relativePath> | |
49 | + </parent> | |
50 | + | |
51 | + <name>Demoiselle Framework REST Extension</name> | |
52 | + <description> | |
53 | + REST Extension | |
54 | + </description> | |
55 | + <url>http://www.frameworkdemoiselle.gov.br</url> | |
56 | + | |
57 | + <licenses> | |
58 | + <license> | |
59 | + <name>GNU Lesser General Public License, Version 3</name> | |
60 | + <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url> | |
61 | + </license> | |
62 | + </licenses> | |
63 | + | |
64 | + <organization> | |
65 | + <name>SERPRO - Serviço Federal de Processamento de Dados</name> | |
66 | + <url>http://www.serpro.gov.br</url> | |
67 | + </organization> | |
68 | + | |
69 | + <dependencies> | |
70 | + <dependency> | |
71 | + <groupId>br.gov.frameworkdemoiselle</groupId> | |
72 | + <artifactId>demoiselle-servlet</artifactId> | |
73 | + </dependency> | |
74 | + <dependency> | |
75 | + <groupId>javax.ws.rs</groupId> | |
76 | + <artifactId>jsr311-api</artifactId> | |
77 | + </dependency> | |
78 | + | |
79 | + <!-- for tests --> | |
80 | + <dependency> | |
81 | + <groupId>org.jboss.arquillian.container</groupId> | |
82 | + <artifactId>arquillian-glassfish-embedded-3.1</artifactId> | |
83 | + <scope>test</scope> | |
84 | + </dependency> | |
85 | + <dependency> | |
86 | + <groupId>org.glassfish.main.extras</groupId> | |
87 | + <artifactId>glassfish-embedded-all</artifactId> | |
88 | + <scope>test</scope> | |
89 | + </dependency> | |
90 | + <dependency> | |
91 | + <groupId>org.apache.httpcomponents</groupId> | |
92 | + <artifactId>httpclient</artifactId> | |
93 | + <version>4.3</version> | |
94 | + <scope>test</scope> | |
95 | + </dependency> | |
96 | + | |
97 | + <!-- | |
98 | + <dependency> | |
99 | + <groupId>commons-httpclient</groupId> | |
100 | + <artifactId>commons-httpclient</artifactId> | |
101 | + <version>3.1</version> | |
102 | + <scope>test</scope> | |
103 | + </dependency> | |
104 | + --> | |
105 | + </dependencies> | |
106 | + | |
107 | + <repositories> | |
108 | + <repository> | |
109 | + <id>sonatype-nexus-snapshots</id> | |
110 | + <name>Sonatype Nexus Snapshots</name> | |
111 | + <url>https://oss.sonatype.org/content/repositories/snapshots</url> | |
112 | + <snapshots> | |
113 | + <enabled>true</enabled> | |
114 | + </snapshots> | |
115 | + <releases> | |
116 | + <enabled>false</enabled> | |
117 | + </releases> | |
118 | + </repository> | |
119 | + <repository> | |
120 | + <id>sonatype-nexus-releases</id> | |
121 | + <name>Sonatype Nexus Releases</name> | |
122 | + <url>https://oss.sonatype.org/content/repositories/releases</url> | |
123 | + <snapshots> | |
124 | + <enabled>false</enabled> | |
125 | + </snapshots> | |
126 | + <releases> | |
127 | + <enabled>true</enabled> | |
128 | + </releases> | |
129 | + </repository> | |
130 | + </repositories> | |
131 | + | |
132 | + <profiles> | |
133 | + <profile> | |
134 | + <id>arquillian-test</id> | |
135 | + <dependencies> | |
136 | + <dependency> | |
137 | + <groupId>javax.ws.rs</groupId> | |
138 | + <artifactId>jsr311-api</artifactId> | |
139 | + <scope>provided</scope> | |
140 | + </dependency> | |
141 | + </dependencies> | |
142 | + </profile> | |
143 | + </profiles> | |
144 | +</project> | ... | ... |
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/AuthenticationExceptionMapper.java
0 → 100644
... | ... | @@ -0,0 +1,17 @@ |
1 | +package br.gov.frameworkdemoiselle.internal.implementation; | |
2 | + | |
3 | +import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; | |
4 | + | |
5 | +import javax.ws.rs.core.Response; | |
6 | +import javax.ws.rs.ext.ExceptionMapper; | |
7 | +import javax.ws.rs.ext.Provider; | |
8 | + | |
9 | +import br.gov.frameworkdemoiselle.security.AuthenticationException; | |
10 | +@Provider | |
11 | +public class AuthenticationExceptionMapper implements ExceptionMapper<AuthenticationException> { | |
12 | + | |
13 | + @Override | |
14 | + public Response toResponse(AuthenticationException exception) { | |
15 | + return Response.status(SC_UNAUTHORIZED).entity(exception.getMessage()).build(); | |
16 | + } | |
17 | +} | ... | ... |
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/AuthorizationExceptionMapper.java
0 → 100644
... | ... | @@ -0,0 +1,18 @@ |
1 | +package br.gov.frameworkdemoiselle.internal.implementation; | |
2 | + | |
3 | +import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN; | |
4 | + | |
5 | +import javax.ws.rs.core.Response; | |
6 | +import javax.ws.rs.ext.ExceptionMapper; | |
7 | +import javax.ws.rs.ext.Provider; | |
8 | + | |
9 | +import br.gov.frameworkdemoiselle.security.AuthorizationException; | |
10 | + | |
11 | +@Provider | |
12 | +public class AuthorizationExceptionMapper implements ExceptionMapper<AuthorizationException> { | |
13 | + | |
14 | + @Override | |
15 | + public Response toResponse(AuthorizationException exception) { | |
16 | + return Response.status(SC_FORBIDDEN).build(); | |
17 | + } | |
18 | +} | ... | ... |
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/DefaultExceptionMapper.java
0 → 100644
... | ... | @@ -0,0 +1,33 @@ |
1 | +//package br.gov.frameworkdemoiselle.internal.implementation; | |
2 | +// | |
3 | +//import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR; | |
4 | +// | |
5 | +//import java.util.ResourceBundle; | |
6 | +// | |
7 | +//import javax.inject.Inject; | |
8 | +//import javax.ws.rs.core.Response; | |
9 | +//import javax.ws.rs.ext.ExceptionMapper; | |
10 | +//import javax.ws.rs.ext.Provider; | |
11 | +// | |
12 | +//import org.slf4j.Logger; | |
13 | +// | |
14 | +//import br.gov.frameworkdemoiselle.annotation.Name; | |
15 | +// | |
16 | +//@Provider | |
17 | +//public class DefaultExceptionMapper implements ExceptionMapper<Throwable> { | |
18 | +// | |
19 | +// @Inject | |
20 | +// @Name("demoiselle-rest-bundle") | |
21 | +// private ResourceBundle bundle; | |
22 | +// | |
23 | +// @Inject | |
24 | +// private Logger logger; | |
25 | +// | |
26 | +// @Override | |
27 | +// public Response toResponse(Throwable throwable) { | |
28 | +// logger.error(throwable.getMessage(), throwable); | |
29 | +// | |
30 | +// String message = bundle.getString("internal.server.error"); | |
31 | +// return Response.status(SC_INTERNAL_SERVER_ERROR).entity(message).build(); | |
32 | +// } | |
33 | +//} | ... | ... |
impl/extension/rest/src/main/java/br/gov/frameworkdemoiselle/internal/implementation/NotLoggedInExceptionMapper.java
0 → 100644
... | ... | @@ -0,0 +1,31 @@ |
1 | +package br.gov.frameworkdemoiselle.internal.implementation; | |
2 | + | |
3 | +import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; | |
4 | + | |
5 | +import javax.ws.rs.core.Response; | |
6 | +import javax.ws.rs.ext.ExceptionMapper; | |
7 | +import javax.ws.rs.ext.Provider; | |
8 | + | |
9 | +import br.gov.frameworkdemoiselle.security.NotLoggedInException; | |
10 | + | |
11 | +@Provider | |
12 | +public class NotLoggedInExceptionMapper implements ExceptionMapper<NotLoggedInException> { | |
13 | + | |
14 | + @Override | |
15 | + public Response toResponse(NotLoggedInException exception) { | |
16 | + // HttpServletRequest request = Beans.getReference(HttpServletRequest.class); | |
17 | + // String path = request.getRequestURI().substring(request.getContextPath().length()); | |
18 | + // | |
19 | + // Response response; | |
20 | + // | |
21 | + // if (path.indexOf("/api") > -1) { | |
22 | + // response = Response.status(SC_UNAUTHORIZED).header("WWW-Authenticate", "Basic realm=default").build(); | |
23 | + // } else { | |
24 | + // response = Response.status(SC_UNAUTHORIZED).build(); | |
25 | + // } | |
26 | + // | |
27 | + // return response; | |
28 | + | |
29 | + return Response.status(SC_UNAUTHORIZED).build(); | |
30 | + } | |
31 | +} | ... | ... |
impl/extension/rest/src/main/resources/demoiselle-rest-bundle.properties
0 → 100644
... | ... | @@ -0,0 +1,36 @@ |
1 | +# Demoiselle Framework | |
2 | +# Copyright (C) 2010 SERPRO | |
3 | +# ---------------------------------------------------------------------------- | |
4 | +# This file is part of Demoiselle Framework. | |
5 | +# | |
6 | +# Demoiselle Framework is free software; you can redistribute it and/or | |
7 | +# modify it under the terms of the GNU Lesser General Public License version 3 | |
8 | +# as published by the Free Software Foundation. | |
9 | +# | |
10 | +# This program is distributed in the hope that it will be useful, | |
11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | +# GNU General Public License for more details. | |
14 | +# | |
15 | +# You should have received a copy of the GNU Lesser General Public License version 3 | |
16 | +# along with this program; if not, see <http://www.gnu.org/licenses/> | |
17 | +# or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
18 | +# Fifth Floor, Boston, MA 02110-1301, USA. | |
19 | +# ---------------------------------------------------------------------------- | |
20 | +# Este arquivo é parte do Framework Demoiselle. | |
21 | +# | |
22 | +# O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
23 | +# modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
24 | +# do Software Livre (FSF). | |
25 | +# | |
26 | +# Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
27 | +# GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
28 | +# APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
29 | +# para maiores detalhes. | |
30 | +# | |
31 | +# Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
32 | +# "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses/> | |
33 | +# ou escreva para a Fundação do Software Livre (FSF) Inc., | |
34 | +# 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
35 | + | |
36 | +internal.server.error=Erro interno do servidor | ... | ... |
impl/extension/se/.gitignore
impl/extension/se/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
impl/extension/servlet/.gitignore
impl/extension/servlet/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../../../parent/extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
impl/extension/servlet/src/main/java/br/gov/frameworkdemoiselle/util/BasicAuthFilter.java
... | ... | @@ -81,6 +81,7 @@ public class BasicAuthFilter implements Filter { |
81 | 81 | } |
82 | 82 | |
83 | 83 | private boolean performLogin(String header, HttpServletRequest request) { |
84 | + boolean result = false; | |
84 | 85 | SecurityContext securityContext = Beans.getReference(SecurityContext.class); |
85 | 86 | |
86 | 87 | if (header != null) { |
... | ... | @@ -91,9 +92,10 @@ public class BasicAuthFilter implements Filter { |
91 | 92 | credentials.setPassword(basicCredentials[1]); |
92 | 93 | |
93 | 94 | securityContext.login(); |
95 | + result = securityContext.isLoggedIn(); | |
94 | 96 | } |
95 | 97 | |
96 | - return securityContext.isLoggedIn(); | |
98 | + return result; | |
97 | 99 | } |
98 | 100 | |
99 | 101 | private void performLogout() { | ... | ... |
parent/archetype/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-framework-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../framework</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
parent/bom/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-framework-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../framework</relativePath> |
49 | 49 | </parent> |
50 | 50 | |
... | ... | @@ -72,42 +72,47 @@ |
72 | 72 | <dependency> |
73 | 73 | <groupId>br.gov.frameworkdemoiselle</groupId> |
74 | 74 | <artifactId>demoiselle-core</artifactId> |
75 | - <version>2.4.1-SNAPSHOT</version> | |
75 | + <version>2.5.0-SNAPSHOT</version> | |
76 | 76 | </dependency> |
77 | 77 | <dependency> |
78 | 78 | <groupId>br.gov.frameworkdemoiselle</groupId> |
79 | 79 | <artifactId>demoiselle-jta</artifactId> |
80 | - <version>2.4.1-SNAPSHOT</version> | |
80 | + <version>2.5.0-SNAPSHOT</version> | |
81 | 81 | </dependency> |
82 | 82 | <dependency> |
83 | 83 | <groupId>br.gov.frameworkdemoiselle</groupId> |
84 | 84 | <artifactId>demoiselle-jdbc</artifactId> |
85 | - <version>2.4.1-SNAPSHOT</version> | |
85 | + <version>2.5.0-SNAPSHOT</version> | |
86 | 86 | </dependency> |
87 | 87 | <dependency> |
88 | 88 | <groupId>br.gov.frameworkdemoiselle</groupId> |
89 | 89 | <artifactId>demoiselle-jpa</artifactId> |
90 | - <version>2.4.1-SNAPSHOT</version> | |
90 | + <version>2.5.0-SNAPSHOT</version> | |
91 | 91 | </dependency> |
92 | 92 | <dependency> |
93 | 93 | <groupId>br.gov.frameworkdemoiselle</groupId> |
94 | 94 | <artifactId>demoiselle-servlet</artifactId> |
95 | - <version>2.4.1-SNAPSHOT</version> | |
95 | + <version>2.5.0-SNAPSHOT</version> | |
96 | + </dependency> | |
97 | + <dependency> | |
98 | + <groupId>br.gov.frameworkdemoiselle</groupId> | |
99 | + <artifactId>demoiselle-rest</artifactId> | |
100 | + <version>2.5.0-SNAPSHOT</version> | |
96 | 101 | </dependency> |
97 | 102 | <dependency> |
98 | 103 | <groupId>br.gov.frameworkdemoiselle</groupId> |
99 | 104 | <artifactId>demoiselle-jsf</artifactId> |
100 | - <version>2.4.1-SNAPSHOT</version> | |
105 | + <version>2.5.0-SNAPSHOT</version> | |
101 | 106 | </dependency> |
102 | 107 | <dependency> |
103 | 108 | <groupId>br.gov.frameworkdemoiselle</groupId> |
104 | 109 | <artifactId>demoiselle-se</artifactId> |
105 | - <version>2.4.1-SNAPSHOT</version> | |
110 | + <version>2.5.0-SNAPSHOT</version> | |
106 | 111 | </dependency> |
107 | 112 | <dependency> |
108 | 113 | <groupId>br.gov.frameworkdemoiselle</groupId> |
109 | 114 | <artifactId>demoiselle-jmx</artifactId> |
110 | - <version>2.4.1-SNAPSHOT</version> | |
115 | + <version>2.5.0-SNAPSHOT</version> | |
111 | 116 | </dependency> |
112 | 117 | <!-- |
113 | 118 | <dependency> |
... | ... | @@ -260,6 +265,13 @@ |
260 | 265 | <version>${transaction.version}</version> |
261 | 266 | </dependency> |
262 | 267 | |
268 | + <!-- jsr-311 api --> | |
269 | + <dependency> | |
270 | + <groupId>javax.ws.rs</groupId> | |
271 | + <artifactId>jsr311-api</artifactId> | |
272 | + <version>${rest.version}</version> | |
273 | + </dependency> | |
274 | + | |
263 | 275 | <!-- logger api --> |
264 | 276 | <dependency> |
265 | 277 | <groupId>org.slf4j</groupId> |
... | ... | @@ -410,6 +422,7 @@ |
410 | 422 | <el.version>2.2</el.version> |
411 | 423 | <servlet.version>2.5</servlet.version> |
412 | 424 | <persistence.version>2.0.0</persistence.version> |
425 | + <rest.version>1.1.1</rest.version> | |
413 | 426 | |
414 | 427 | <hibernate.version>4.1.7.Final</hibernate.version> |
415 | 428 | <hibernate.validator.version>4.2.0.Final</hibernate.validator.version> | ... | ... |
parent/extension/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-framework-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../framework</relativePath> |
49 | 49 | </parent> |
50 | 50 | |
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | <dependency> |
72 | 72 | <groupId>br.gov.frameworkdemoiselle</groupId> |
73 | 73 | <artifactId>demoiselle-framework-bom</artifactId> |
74 | - <version>2.4.1-SNAPSHOT</version> | |
74 | + <version>2.5.0-SNAPSHOT</version> | |
75 | 75 | <scope>import</scope> |
76 | 76 | <type>pom</type> |
77 | 77 | </dependency> | ... | ... |
parent/framework/pom.xml
parent/jsf/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-servlet-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../servlet</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
parent/minimal/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-framework-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../framework</relativePath> |
49 | 49 | </parent> |
50 | 50 | |
... | ... | @@ -72,7 +72,7 @@ |
72 | 72 | <dependency> |
73 | 73 | <groupId>br.gov.frameworkdemoiselle</groupId> |
74 | 74 | <artifactId>demoiselle-framework-bom</artifactId> |
75 | - <version>2.4.1-SNAPSHOT</version> | |
75 | + <version>2.5.0-SNAPSHOT</version> | |
76 | 76 | <scope>import</scope> |
77 | 77 | <type>pom</type> |
78 | 78 | </dependency> | ... | ... |
... | ... | @@ -0,0 +1,138 @@ |
1 | +<!-- | |
2 | + Demoiselle Framework | |
3 | + Copyright (C) 2010 SERPRO | |
4 | + ============================================================================ | |
5 | + This file is part of Demoiselle Framework. | |
6 | + | |
7 | + Demoiselle Framework is free software; you can redistribute it and/or | |
8 | + modify it under the terms of the GNU Lesser General Public License version 3 | |
9 | + as published by the Free Software Foundation. | |
10 | + | |
11 | + This program is distributed in the hope that it will be useful, | |
12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | + GNU General Public License for more details. | |
15 | + | |
16 | + You should have received a copy of the GNU Lesser General Public License version 3 | |
17 | + along with this program; if not, see <http://www.gnu.org/licenses /> | |
18 | + or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
19 | + Fifth Floor, Boston, MA 02110-1301, USA. | |
20 | + ============================================================================ | |
21 | + Este arquivo é parte do Framework Demoiselle. | |
22 | + | |
23 | + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
24 | + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
25 | + do Software Livre (FSF). | |
26 | + | |
27 | + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
28 | + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
29 | + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
30 | + para maiores detalhes. | |
31 | + | |
32 | + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
33 | + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses /> | |
34 | + ou escreva para a Fundação do Software Livre (FSF) Inc., | |
35 | + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
36 | +--> | |
37 | +<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"> | |
38 | + | |
39 | + <modelVersion>4.0.0</modelVersion> | |
40 | + | |
41 | + <artifactId>demoiselle-rest-parent</artifactId> | |
42 | + <packaging>pom</packaging> | |
43 | + | |
44 | + <parent> | |
45 | + <groupId>br.gov.frameworkdemoiselle</groupId> | |
46 | + <artifactId>demoiselle-servlet-parent</artifactId> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | + <relativePath>../servlet</relativePath> | |
49 | + </parent> | |
50 | + | |
51 | + <name>Demoiselle Framework REST Parent</name> | |
52 | + <description> | |
53 | + Especialização do POM mínimo, contendo configurações úteis para todas as aplicações REST que utilizam o framework. | |
54 | + </description> | |
55 | + <url>http://www.frameworkdemoiselle.gov.br</url> | |
56 | + | |
57 | + <licenses> | |
58 | + <license> | |
59 | + <name>GNU Lesser General Public License, Version 3</name> | |
60 | + <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url> | |
61 | + </license> | |
62 | + </licenses> | |
63 | + | |
64 | + <organization> | |
65 | + <name>SERPRO - Serviço Federal de Processamento de Dados</name> | |
66 | + <url>http://www.serpro.gov.br</url> | |
67 | + </organization> | |
68 | + | |
69 | + <dependencies> | |
70 | + <dependency> | |
71 | + <groupId>br.gov.frameworkdemoiselle</groupId> | |
72 | + <artifactId>demoiselle-rest</artifactId> | |
73 | + <scope>compile</scope> | |
74 | + <exclusions> | |
75 | + <exclusion> | |
76 | + <groupId>javax.ws.rs</groupId> | |
77 | + <artifactId>jsr311-api</artifactId> | |
78 | + </exclusion> | |
79 | + </exclusions> | |
80 | + </dependency> | |
81 | + </dependencies> | |
82 | + | |
83 | + <profiles> | |
84 | + <profile> | |
85 | + <id>tomcat6</id> | |
86 | + </profile> | |
87 | + <profile> | |
88 | + <id>tomcat7</id> | |
89 | + </profile> | |
90 | + <profile> | |
91 | + <id>glassfish3</id> | |
92 | + </profile> | |
93 | + <profile> | |
94 | + <id>weblogic12</id> | |
95 | + </profile> | |
96 | + <profile> | |
97 | + <id>jboss6</id> | |
98 | + </profile> | |
99 | + <profile> | |
100 | + <id>jboss7</id> | |
101 | + <activation> | |
102 | + <activeByDefault>true</activeByDefault> | |
103 | + </activation> | |
104 | + <dependencies> | |
105 | + <dependency> | |
106 | + <groupId>javax.ws.rs</groupId> | |
107 | + <artifactId>jsr311-api</artifactId> | |
108 | + <scope>provided</scope> | |
109 | + </dependency> | |
110 | + </dependencies> | |
111 | + </profile> | |
112 | + </profiles> | |
113 | + | |
114 | + <repositories> | |
115 | + <repository> | |
116 | + <id>sonatype-nexus-snapshots</id> | |
117 | + <name>Sonatype Nexus Snapshots</name> | |
118 | + <url>https://oss.sonatype.org/content/repositories/snapshots</url> | |
119 | + <snapshots> | |
120 | + <enabled>true</enabled> | |
121 | + </snapshots> | |
122 | + <releases> | |
123 | + <enabled>false</enabled> | |
124 | + </releases> | |
125 | + </repository> | |
126 | + <repository> | |
127 | + <id>sonatype-nexus-releases</id> | |
128 | + <name>Sonatype Nexus Releases</name> | |
129 | + <url>https://oss.sonatype.org/content/repositories/releases</url> | |
130 | + <snapshots> | |
131 | + <enabled>false</enabled> | |
132 | + </snapshots> | |
133 | + <releases> | |
134 | + <enabled>true</enabled> | |
135 | + </releases> | |
136 | + </repository> | |
137 | + </repositories> | |
138 | +</project> | ... | ... |
parent/se/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
parent/servlet/pom.xml
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | <parent> |
45 | 45 | <groupId>br.gov.frameworkdemoiselle</groupId> |
46 | 46 | <artifactId>demoiselle-extension-parent</artifactId> |
47 | - <version>2.4.1-SNAPSHOT</version> | |
47 | + <version>2.5.0-SNAPSHOT</version> | |
48 | 48 | <relativePath>../extension</relativePath> |
49 | 49 | </parent> |
50 | 50 | ... | ... |
pom.xml
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | <modelVersion>4.0.0</modelVersion> |
40 | 40 | |
41 | 41 | <artifactId>demoiselle-framework-build</artifactId> |
42 | - <version>2.4.1-SNAPSHOT</version> | |
42 | + <version>2.5.0-SNAPSHOT</version> | |
43 | 43 | <packaging>pom</packaging> |
44 | 44 | |
45 | 45 | <parent> |
... | ... | @@ -62,6 +62,7 @@ |
62 | 62 | <module>parent/extension</module> |
63 | 63 | <module>parent/jsf</module> |
64 | 64 | <module>parent/servlet</module> |
65 | + <module>parent/rest</module> | |
65 | 66 | <module>parent/se</module> |
66 | 67 | <module>parent/archetype</module> |
67 | 68 | <module>impl/core</module> |
... | ... | @@ -71,6 +72,7 @@ |
71 | 72 | <module>impl/extension/jta</module> |
72 | 73 | <module>impl/extension/se</module> |
73 | 74 | <module>impl/extension/servlet</module> |
75 | + <module>impl/extension/rest</module> | |
74 | 76 | <module>impl/extension/jmx</module> |
75 | 77 | <!-- |
76 | 78 | <module>impl/extension/jaas</module> | ... | ... |