Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Ensure zanata-model from Maven reactor is used
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Aug 16, 2016
1 parent 14b0b2e commit eecf341
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions zanata-war/src/test/java/org/zanata/arquillian/Deployments.java
Expand Up @@ -90,26 +90,27 @@ private static File[] runtimeAndTestDependenciesFromPom() {
// google-collections gets pulled in by arquillian and
// conflict with guava.
new RejectDependenciesStrategy(false,
"com.google.collections:google-collections",
"net.bull.javamelody:javamelody-core",
"com.google.collections:google-collections"))
// org.zanata dependencies should be on classpath, provided by Maven
"org.zanata:zanata-liquibase",
"org.zanata:zanata-model"
// and any other org.zanata dependencies in future...
))
.asFile();
}

@Deployment(name = "zanata.war")
public static Archive<?> createDeployment() {
WebArchive archive =
ShrinkWrap.create(WebArchive.class, DEPLOYMENT_NAME + ".war");
// TODO add org.zanata packages on classpath first, exclude any libraries with colliding classes
archive.addAsLibraries(runtimeAndTestDependenciesFromPom());

// Local packages
Filter<ArchivePath> archivePathFilter = object -> {
// Avoid the model package (for some reason it's being included
// as a class file)
return !object.get().startsWith("/org/zanata/model/") &&
!object.get().startsWith("/org/zanata/util/RequestContextValueStore") &&
notUnusedGwtClientCode(object) &&
notUnitTest(object);
};
Filter<ArchivePath> archivePathFilter = object ->
notUnusedGwtClientCode(object) &&
notUnitTest(object);
archive.addPackages(true, archivePathFilter, "org.zanata");

// Resources (descriptors, etc)
Expand Down

0 comments on commit eecf341

Please sign in to comment.