Created
April 24, 2012 20:05
-
-
Save aslakknutsen/2483202 to your computer and use it in GitHub Desktop.
Arquillian JRebel Extension - File mapping
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
<application> | |
<classpath> | |
<dir name="/home/aslak/project/target/classes"> | |
<include name="org/acme/B.class" /> | |
<include name="org/acme/A.class" /> | |
</dir> | |
<dir name="/home/aslak/other_project/target/classes"> | |
<include name="org/acme/C.class" /> | |
<include name="org/acme/D.class" /> | |
</dir> | |
<dir name="/tmp/dynamically/created/my.war" /> <!-- location of dynamically created assets, beans.xml --> | |
<classpath> | |
<web> | |
<dir name="/home/aslak/project/src/main/webapp"> | |
<include name="index.html" /> | |
</dir> | |
</web> | |
</application> |
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
/ | |
org/ | |
acme/ | |
A.class | |
B.class | |
beans.xml |
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
ShrinkWrap.create(WebArchive.class) | |
.addClasses(A.class, B.class) | |
.addAsWebInfResource( | |
Descriptors.create(BeansDescriptor.class).alternative(A.class)); |
Rebel XML Manual: http://zeroturnaround.com/reference-manual/app.html
In archive:
/WEB-INF/web.xml
/index.html
Resolved to:
/home/project/src/main/webapp/WEB-INF/web.xml
/home/project/src/main/webapp/index.html
Common root: /home/project/src/main/webapp
rebel.xml:
<web directory="common_root">
<include>index.html</include>
<include>WEB-INF/web.xml</include>
</web>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ShrinkWrap represents a subset of the full application and can link the added resources back to the original file on disk instead of having to write everything to a tmp folder and reference the dir in rebel.xml. Referencing the full original dir e.g. target/classes will deploy a lot more then just the defined subset.