Hi

path needs to be the war file (/foo/bar/myapp.war)

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/9/24 Esben Rugbjerg <[email protected]>

> Hi Romain,
>
> Thanks for your answer.
>
> I have tried a lot of combinations after looking in the documentation, but
> haven't figured out exactly what the path should point to.
>
> What exactly should the path be a path to (the WAR to be deployed or the
> destination directory) ? Can you give me an example ?
>
> I found this
> <path>${project.build.directory}\RestSimpleDemo.war</path>
> in the thread called
> Re: <path> under maven-tomee plugin configuration when running tomee:deploy
> which led me to believe that it should be the path to WAR to be deployed
> which I think
>
> <path>${project.build.directory}${file.separator}${project.build.finalName}.${project.packaging}</path>
> should point at it and this is also the case.
>
> I get the following debug output when I run Maven:
>
>
> [DEBUG] Configuring mojo
> 'org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy' with basic
> configurator -->
> [DEBUG]   (f) path =
> Y:\tp124295DDrev\workspaceJenkins\DeployService\target\DeployService.war
> [DEBUG]   (f) tomeeHost = localhost
> [DEBUG]   (f) tomeeHttpPort = 36913
> [DEBUG] -- end configuration --
> sep 24, 2013 10:55:52 AM org.apache.openejb.client.EventLogger log
> INFO: RemoteInitialContextCreated{providerUri=
> http://localhost:36913/tomee/ejb}
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 20.194s
> [INFO] Finished at: Tue Sep 24 10:55:53 CEST 2013
> [INFO] Final Memory: 18M/188M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy (tomee-deploy) on
> project DeployService: Execution tomee-deploy of goal
> org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy failed: The bean
> encountered a non-application exception; nested exception is:
> [ERROR] org.apache.openejb.OpenEJBRuntimeException:
> java.io.FileNotFoundException:
> Y:\tp124295DDrev\workspaceJenkins\DeployService\target\DeployService.war
> (Den angivne sti blev ikke fundet)
> [ERROR] -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy
> (tomee-deploy) on project DeployService: Execution tomee-deploy of goal
> org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy failed: The bean
> encountered a non-application exception; nested exception is:
>         org.apache.openejb.OpenEJBRuntimeException:
> java.io.FileNotFoundException:
> Y:\tp124295DDrev\workspaceJenkins\DeployService\target\DeployService.war
> (Den angivne sti blev ikke fundet)
>
> Regards
> Esben
>
> On Tue, Sep 24, 2013 at 6:39 AM, Romain Manni-Bucau
> <[email protected]>wrote:
>
> > Hi
> >
> > Here is the tomee mvn plugin doc
> > http://tomee.apache.org/tomee-maven-plugin.html
> >
> > I think your path is wrong (seems you put a name and not a path)
> > Le 24 sept. 2013 00:15, "Esben Rugbjerg" <[email protected]> a
> > écrit :
> >
> > > Hi,
> > >
> > > I am trying to do some integration testing using Maven and TomEE. But I
> > > have problems deploying the WAR using the Maven plugin.
> > >
> > > I have a small servlet which should deploy applications using our own
> old
> > > deployment system.
> > > I have a deployment motor for test (DummyDeploymentMotor) and one for
> > > production (NshDeploymentMotor).
> > >
> > > I have a pom.xml where I build both a test-war and a production-war
> > > including different deployment motor classes. The correct class
> > > is injected into the servlet using the @Inject and @Alternative
> > annotations
> > > and the beans.xml pointing at the correct class is generated during
> > build.
> > >
> > > The main servlet is annotated with:
> > > @WebServlet(name = "DeployServiceServlet", urlPatterns = { "/deployee"
> },
> > > loadOnStartup = 0)
> > > @MultipartConfig
> > >
> > > I can execute the integration tests against the test version of the
> > > application if I start up TomEE from Maven in the pre-integration-test
> > > phase, run the tests in the
> > > integration-test phase and close down the TomEE in the
> > > post-integration-test phase. I am using the following configuration in
> > the
> > > pom.xml
> > >
> > > <plugin>
> > >  <groupId>org.apache.openejb.maven</groupId>
> > > <artifactId>tomee-maven-plugin</artifactId>
> > >  <version>1.0.1</version>
> > > <executions>
> > > <execution>
> > >  <id>tomee-run</id>
> > > <phase>pre-integration-test</phase>
> > > <goals>
> > >  <goal>start</goal>
> > > </goals>
> > > <configuration>
> > >  <tomeeVersion>1.5.2</tomeeVersion>
> > > <tomeeClassifier>plus</tomeeClassifier>
> > >  <tomeeHttpPort>${tomee.http.port}</tomeeHttpPort>
> > > <path>/${project.build.finalName}</path>
> > >  <fork>true</fork>
> > > </configuration>
> > > </execution>
> > >  <execution>
> > > <id>tomee-shutdown</id>
> > > <goals>
> > >  <goal>stop</goal>
> > > </goals>
> > > <phase>post-integration-test</phase>
> > >  </execution>
> > > </executions>
> > > </plugin>
> > >  As far as I can see the WAR is actually not deployed the TomEE is
> simply
> > > pointed to the path of the directory containing the files that will go
> > into
> > > the
> > >  WAR. Is this correct ?
> > >  I try to deploy the WAR using the following configuration:
> > >  <plugin>
> > > <groupId>org.apache.openejb.maven</groupId>
> > > <artifactId>tomee-maven-plugin</artifactId>
> > >  <version>1.0.1</version>
> > > <executions>
> > > <execution>
> > >  <id>tomee-deploy</id>
> > > <phase>pre-integration-test</phase>
> > > <goals>
> > >  <goal>deploy</goal>
> > > </goals>
> > > <configuration>
> > >  <tomeeVersion>1.5.2</tomeeVersion>
> > >  <tomeeClassifier>plus</tomeeClassifier>
> > >  <tomeeHost>${tomeeHostName}</tomeeHost>
> > >  <tomeeHttpPort>${tomee.http.port}</tomeeHttpPort>
> > >   <path>${project.build.finalName}</path>
> > >
> > >
> >
> <warFile>${project.build.directory}${file.separator}${project.build.finalName}.${project.packaging}</warFile>
> > >  </configuration>
> > > </execution>
> > > <execution>
> > >  <id>tomee-undeploy</id>
> > > <goals>
> > > <goal>undeploy</goal>
> > >  </goals>
> > > <phase>post-integration-test</phase>
> > > </execution>
> > >  </executions>
> > > </plugin>
> > >
> > > When I try to run Maven with a profile containing this configuration I
> > get
> > > the following error:
> > >
> > > [ERROR] Failed to execute goal
> > > org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy (tomee-deploy)
> > on
> > > project DeployService:
> > > Execution tomee-deploy of goal
> > > org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy failed:
> > > org.apache.openejb.loader.Files$FileDoesNotExistException:
> > > Does not exist: C:\Program
> > Files\apache-tomee-plus-1.5.2\bin\DeployService:
> > > Does not exist: C:\Program
> > Files\apache-tomee-plus-1.5.2\bin\DeployService
> > > -> [Help 1]
> > >
> > > Nothing appears in the webapps folder on the server but in the bin
> > folder a
> > > empty folder called 'DeployService.unpacked' is created
> > >
> > > If I change the <path> to
> > >
> > >
> >
> ${project.build.directory}${file.separator}${project.build.finalName}.${project.packaging}
> > > i.e. the same as the <warFile> then I get the following error:
> > >
> > > [ERROR] Failed to execute goal
> > > org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy (tomee-deploy)
> > on
> > > project DeployService:
> > > Execution tomee-deploy of goal
> > > org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy failed: The
> bean
> > > encountered a non-application exception;
> > > nested exception is:
> > > [ERROR] org.apache.openejb.OpenEJBRuntimeException:
> > > java.io.FileNotFoundException:
> > >
> Y:\tp124295DDrev\workspaceJenkins\DeployService\target\DeployService.war
> > >
> > > The file is of course prestent at the listed path.
> > >
> > > There is not created any new folder in the bin folder.
> > >
> > > The TomEE I try to deploy on is version 1.5.2 just like the one
> > referenced
> > > in the pom.xml.
> > >
> > > What could the problem be and where should I start looking ?
> > >
> > > My Java version is oracle170-64 on a Windows 7.
> > >
> > > Please tell if you need more information in order to help me.
> > >
> > > Regards
> > > Esben Rugbjerg
> > >
> > > --
> > > =================
> > > cand.polyt.
> > > Esben Rugbjerg
> > > Guldborgvej 44, 3.th.
> > > 2000 Frederiksberg
> > > Danmark
> > > email: [email protected]
> > > mobil-tlf.: +45 28715166
> > > =================
> > >
> >
>
>
>
> --
> =================
> cand.polyt.
> Esben Rugbjerg
> Guldborgvej 44, 3.th.
> 2000 Frederiksberg
> Danmark
> email: [email protected]
> mobil-tlf.: +45 28715166
> =================
>

Reply via email to