Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Arquillian JRebel Extension - File mapping
<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>
/
org/
acme/
A.class
B.class
beans.xml
ShrinkWrap.create(WebArchive.class)
.addClasses(A.class, B.class)
.addAsWebInfResource(
Descriptors.create(BeansDescriptor.class).alternative(A.class));
@aslakknutsen
Copy link
Author

aslakknutsen commented Apr 24, 2012

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.

@aslakknutsen
Copy link
Author

aslakknutsen commented Apr 25, 2012

@aslakknutsen
Copy link
Author

aslakknutsen commented Jun 13, 2012

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