[
https://issues.jboss.org/browse/SHRINKWRAP-325?page=com.atlassian.jira.pl...
]
Karel Piwko commented on SHRINKWRAP-325:
----------------------------------------
I'm using following hack if the
multimodule/multiprofile/extra-difficult-example-to-build testing comes in place:
In parent pom, I define:
{code:xml}
<module>example</module>
<module>example-test</module>
{code}
Example knows how to build itself, and with specifying ${build.finalName}, there is
nothing easier than do
{code}
private static final String GETTINGSTARTED =
"../example/target/example.war";
@Deployment
public static WebArchive example() {
return ShrinkWrap.createFromZipFile(WebArchive.class, new File(GETTINGSTARTED));
}
{code}
There are some drawbacks though:
1. It takes more time to build two modules
2. It hard to make live changes in IDE
3. It requires to execute "package" phase instead of "test"
Maven based shrinkwrap WebArchive creator that adds all WEB-INF
descriptors, classes, test classes and webapp resources too (not just dependencies and
test dependencies)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: SHRINKWRAP-325
URL:
https://issues.jboss.org/browse/SHRINKWRAP-325
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Geoffrey De Smet
Assignee: Karel Piwko
Priority: Critical
The MavenDependencyResolver is nice, but it does only half the job.
We still have to manually add "target/guvnor-webapp-5.3.0-SNAPSHOT/"
or "target/classes" and "target/test-classes" and
"src/webapp/WEB-INF/*" files etc.
But all that info is in the pom model, so it would be nice to have a feature as a facade
for that.
Something like
{code}
ShrinkWrap.createEntirelyFromMavenPom("pom.xml", includeEntireTestClasspath).
{code}
Note that it can include the entire test classpath (for helper classes under
"target/test-classes" and dependencies such as Mockito).
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira