Updated Maven Overlay Project How To (markdown)

master
srmoore 2012-07-10 10:09:42 -07:00
parent e5ec620b3a
commit 962b28325a
1 changed files with 5 additions and 1 deletions

@ -109,4 +109,8 @@
At this point you should be able to do a `mvn package` from the `example-openid-connect-overlay` level and you'll get a .war file at `example-openid-connect-overlay/my-openid-connect/target/my-openid-connect-server.war`. Remember this name was set in the `example-openid-connect-overlay/pom.xml` as the `finalName`. At this point you should be able to do a `mvn package` from the `example-openid-connect-overlay` level and you'll get a .war file at `example-openid-connect-overlay/my-openid-connect/target/my-openid-connect-server.war`. Remember this name was set in the `example-openid-connect-overlay/pom.xml` as the `finalName`.
6. Any files you create in the `my-openid-connect` maven project will be inserted into the resultant war file. If you use the same name as a file in `OpenID-Connect-Java-Spring-Server` project, such as `example-openid-connect-overlay/my-openid-connect/src/main/resources/META-INF/persistence.xml`, the version from the `my-openid-connect` project will be used in the .war file. This is good for setting up things like database connections. You may also create new Spring beans with new names (in `my-openid-connect/src/main/java/...`) that implement or override the standard openid-connect beans. If you mark these with the Spring Framework's `@Primary` annotation, Spring will use your class instead of the default classes. You may need to add additional dependencies to the `my-openid-connect/pom.xml` configurations so you're code will compile. 6. Any files you create in the `my-openid-connect` maven project will be inserted into the resultant war file. If you use the same name as a file in `OpenID-Connect-Java-Spring-Server` project, such as `example-openid-connect-overlay/my-openid-connect/src/main/resources/META-INF/persistence.xml`, the version from the `my-openid-connect` project will be used in the .war file. This is good for setting up things like database connections. You may also create new Spring beans with new names (in `my-openid-connect/src/main/java/...`) that implement or override the standard openid-connect beans. If you mark these with the Spring Framework's `@Primary` annotation, Spring will use your class instead of the default classes. You may need to add additional dependencies to the `my-openid-connect/pom.xml` configurations so you're code will compile.
***
### Files that are good and bad to overlay
Some files shouldn't be overlayed, such as web.xml and application-context.xml. Other files are good to overlay such as data-context.xml and local-config.xml.