Hi I am using Apache TomEE 1.7.0, and I am trying to deploy a war file
generated with Shrinkwrap into an embedded Apache TomEE. I have seen in
github that in current snapshot this code has been improved to make it
easier. But I am trying to do it with 1.7.0 without much success.

My code is:

try {

  Configuration configuration = new Configuration();
  String tomeeDir =
Files.createTempDirectory("apache-tomee").toFile().getAbsolutePath();
  configuration.setDir(tomeeDir);
  configuration.setHttpPort(8080);

  container = new Container();
  final File app = new
File(Files.createTempDirectory("app").toFile().getAbsolutePath());
  app.deleteOnExit();

  archive.as(ZipExporter.class).exportTo(new File(app, "app.war"), true);
  container.start();
  container.deploy("app", app);

  container.await();
} catch (Exception e) {
          throw new IllegalArgumentException(e);
}

and the war file contains a Servlet extending HttpServlet and annotated
with @WebServlet. I have inspected the dir where log says the application
is deployed INFO: Deployed Application(path=/tmp/app9073998430735933142)

and Servlet is there so I am not sure what is wrong.

Can you see something wrong here?


-- 
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+

Reply via email to