users@glassfish.java.net

Re: archive questiion

From: Sanjeeb Sahoo <sahoo_at_sun.com>
Date: Thu, 18 Nov 2010 19:15:06 +0530

Well, you seem to be packaging the executable inside your war as a
resource. One part is clear. Now you need to tell us who is trying to
consume the executable and how? If you provide an exception stack, that
would help decipher the details as well.

Sahoo
On Thursday 18 November 2010 03:57 PM, forums_at_java.net wrote:
> @RunWith(Arquillian.class)
> @Run(RunModeType.AS_CLIENT)//RunModeType.AS_CLIENT)IN_CONTAINER
> public class DocUtilsServiceTest {
> @Deployment
> public static WebArchive getDeployment() {
> String str = "C:" + File.separator + "Dokumente und
> Einstellungen" + File.separator + "user + File.separator + "Eigene
> Dateien" +
> File.separator + "NetBeansProjects" + File.separator + "WS-DocUtils" +
> File.separator + "build" + File.separator + "web" + File.separator +
> "WEB-INF" + File.separator + "resources" + File.separator +
> "wkhtmltopdf.exe";
> File file = new File(str);
> WebArchive archive = ShrinkWrap.create(WebArchive.class,
> "test.war");
> archive.addClasses(DocUtilsService.class);
> archive.addPackages(true,
> DocUtilsHTML2PDFConverterException.class.getPackage(),
> HTML2PDFConverterProperties.class.getPackage(),
> ProcessStreamReader.class.getPackage());
> archive.addManifestResource(EmptyAsset.INSTANCE,
> ArchivePaths.create("beans.xml"));
> archive.addWebResource(file, "resources/"+file.getName());
> <--------------------------------------------------------- add the
> external
> app. to archive
> System.out.println(archive.toString(Formatters.VERBOSE));
> return archive;
> }
>
> here I build the archive
>
>
>
> in my class i dn't invoke it i just test the class that invoks it,
> this why i
> want to set the path so that class know where it is.
>
>
>
>
> --
>
> [Message sent by forum member 'yahya_h']
>
> View Post: http://forums.java.net/node/719994
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>