Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
276 changed files
with
1,322 additions
and
820 deletions.
There are no files selected for viewing
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
22 changes: 0 additions & 22 deletions
22
tck/src/main/java/jakarta/json/bind/cdi/customizedmapping/adapters/beans.xml
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
tck/src/main/java/jakarta/json/bind/cdi/customizedmapping/serializers/beans.xml
This file was deleted.
Oops, something went wrong.
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
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
57 changes: 57 additions & 0 deletions
57
tck/src/main/java/jakarta/json/bind/tck/ShrinkwrapHelper.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package jakarta.json.bind.tck; | ||
|
||
import org.jboss.shrinkwrap.api.Archive; | ||
import org.jboss.shrinkwrap.api.ArchivePath; | ||
import org.jboss.shrinkwrap.api.Filter; | ||
import org.jboss.shrinkwrap.api.Filters; | ||
import org.jboss.shrinkwrap.api.GenericArchive; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.jboss.shrinkwrap.api.importer.ExplodedImporter; | ||
import org.jboss.shrinkwrap.api.spec.WebArchive; | ||
|
||
public class ShrinkwrapHelper { | ||
|
||
public static WebArchive createDefaultWar(Class<?> testClass) { | ||
return ShrinkWrap.create(WebArchive.class, testClass.getSimpleName() + ".war") | ||
.addPackages(true, testClass.getPackage().getName()); | ||
} | ||
|
||
// public static WebArchive buildDefaultApp(String appName, String... packages) throws Exception { | ||
// String appArchiveName = appName.endsWith(".war") ? appName : appName + ".war"; | ||
// WebArchive app = ShrinkWrap.create(WebArchive.class, appArchiveName); | ||
// for (String p : packages) { | ||
// if (p.endsWith(".*")) | ||
// app = app.addPackages(true, p.replace(".*", "")); | ||
// else | ||
// app = app.addPackages(false, p); | ||
// } | ||
// String testAppResourcesDir = (appPath == null ? "" : appPath) + "test-applications/" + appName + "/resources/"; | ||
// if (new File(testAppResourcesDir).exists()) { | ||
// app = (WebArchive) addDirectory(app, testAppResourcesDir); | ||
// } | ||
// return app; | ||
// } | ||
|
||
/** | ||
* Recursively adds a folder and all of its contents to an archive. | ||
* | ||
* @param a The archive to add the files to | ||
* @param dir The directory which will be recursively added to the archive. | ||
*/ | ||
public static Archive<?> addDirectory(Archive<?> a, String dir) throws Exception { | ||
return addDirectory(a, dir, Filters.includeAll()); | ||
} | ||
|
||
/** | ||
* Recursively adds a folder and all of its contents matching a filter to an archive. | ||
* | ||
* @param a The archive to add the files to | ||
* @param dir The directory which will be recursively added to the archive. | ||
* @param filter A filter indicating which files should be included in the archive | ||
*/ | ||
public static Archive<?> addDirectory(Archive<?> a, String dir, Filter<ArchivePath> filter) throws Exception { | ||
return a.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(dir).as(GenericArchive.class), | ||
"/", filter); | ||
} | ||
|
||
} |
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
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
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
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
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
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
Oops, something went wrong.