This repository has been archived by the owner on Jun 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from paypal/develop
Bringing in 2.3.4-RELEASE changes to master
- Loading branch information
Showing
18 changed files
with
179 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,4 @@ test-output/ | |
.idea/ | ||
*.iml | ||
|
||
release_steps.txt | ||
.DS_Store | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
changes in develop branch | ||
rev all 4 poms to release | ||
update /README | ||
set the new RELEASE version in Quick Start | ||
update /mds/USAGE | ||
set the new RELEASE version | ||
update /mds/RELEASE_NOTES | ||
check if it has all contributions (improvements and fixes) | ||
set delivery date | ||
set 3rd party versions | ||
build everything to make sure it is Ok | ||
check in changes to develop branch (Revving up to version 2.1.0-RELEASE) | ||
merge all changes from develop branch to master (Bringing in 2.1.0 changes to master) | ||
|
||
checkout master branch | ||
git pull | ||
build everything to make sure it is Ok | ||
release from master | ||
comment out cobertura plugin and cobertura reporting plugin in resteasy-spring-boot-starter/pom.xml (BUT NOT CHECK IT IN!) | ||
deploy to MavenCentral(mvn clean install deploy -Possrh) | ||
remove comment marks for cobertura plugin and cobertura reporting plugin | ||
manual sonatype release | ||
Staging Repositories | ||
Close (the one with sources and everything) | ||
Release | ||
tag new release from master | ||
git tag -a 2.1.0-RELEASE | ||
git push origin 2.1.0-RELEASE | ||
|
||
Close GitHub Milestone that has just been released | ||
|
||
git checkout develop | ||
rev develop branch to next snapshot version | ||
rev all 4 poms in to next snapshot version | ||
build everything to make sure it is Ok | ||
update /README | ||
set the new SNAPSHOT version in Quick Start | ||
update /mds/USAGE | ||
set the new SNAPSHOT version | ||
update /mds/RELEASE NOTES | ||
create new version section by copying latest one | ||
set delivery date to TBD | ||
set third-parties to TBD | ||
set contributions (improvements and fixes) to TBD | ||
check in changes to develop branch (Preparing for version 2.1.1-SNAPSHOT) | ||
|
||
Create a new GitHub Milestone and assign issues to it (if any) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
sample-app/src/main/java/com/sample/app/CustomContainerResponseFilter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.sample.app; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
import javax.ws.rs.container.ContainerRequestContext; | ||
import javax.ws.rs.container.ContainerResponseContext; | ||
import javax.ws.rs.container.ContainerResponseFilter; | ||
import javax.ws.rs.ext.Provider; | ||
import java.io.IOException; | ||
|
||
/** | ||
* Custom container request filter just to | ||
* exercise Spring beans as providers and, | ||
* specifically, in this case, as a filter. | ||
* | ||
* @author Fabio Carvalho (facarvalho@paypal.com or fabiocarvalho777@gmail.com) | ||
*/ | ||
@Component | ||
@Provider | ||
public class CustomContainerResponseFilter implements ContainerResponseFilter { | ||
|
||
@Autowired | ||
private CustomSingletonBean customSingletonBean; | ||
|
||
@Override | ||
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) throws IOException { | ||
|
||
// This will cause a NPE if this bean couldn't be injected, | ||
// and that is all we want to check. No need for assertions here | ||
customSingletonBean.amIAlive(); | ||
|
||
// Checks if request has a HTTP header named "ping". | ||
// If it does, adds an HTTP header named "pong" to the response. | ||
// The header value is irrelevant. | ||
if(requestContext.getHeaderString("ping") != null) { | ||
responseContext.getHeaders().add("pong", "pong"); | ||
} | ||
} | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
sample-app/src/main/java/com/sample/app/CustomExceptionMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.sample.app; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Component; | ||
|
||
import javax.ws.rs.NotFoundException; | ||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.Response; | ||
import javax.ws.rs.ext.ExceptionMapper; | ||
import javax.ws.rs.ext.Provider; | ||
|
||
/** | ||
* Custom exception mapper for 404 cases. | ||
* | ||
* @author Fabio Carvalho (facarvalho@paypal.com or fabiocarvalho777@gmail.com) | ||
*/ | ||
@Component | ||
@Provider | ||
public class CustomExceptionMapper implements ExceptionMapper<NotFoundException> { | ||
|
||
@Autowired | ||
private CustomSingletonBean customSingletonBean; | ||
|
||
@Override | ||
public Response toResponse(NotFoundException exception) { | ||
|
||
// This will cause a NPE if this bean couldn't be injected, | ||
// and that is all we want to check. No need for assertions here | ||
customSingletonBean.amIAlive(); | ||
|
||
Response.ResponseBuilder responseBuilder = Response.status(Response.Status.NOT_FOUND).entity("The resource you've requested, has not been found!"); | ||
responseBuilder.type(MediaType.TEXT_PLAIN); | ||
return responseBuilder.build(); | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
sample-app/src/main/java/com/sample/app/CustomSingletonBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.sample.app; | ||
|
||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* This singleton Spring bean just exists to | ||
* test that injections work normally in | ||
* JAX-RS provider beans | ||
* | ||
* @author Fabio Carvalho (facarvalho@paypal.com or fabiocarvalho777@gmail.com) | ||
*/ | ||
@Component | ||
public class CustomSingletonBean { | ||
|
||
public boolean amIAlive() { | ||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters