Hi created https://issues.apache.org/jira/browse/TOMEE-1045 to track this
issue

*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 Romain Manni-Bucau <[email protected]>

> Hi
>
> that sounds normal since in fact the unpacked archive will be deployed the
> first time. Maybe we could just correct the path in the plugin...
>
> *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]>
>
>> I found the solution. The plugin is apparently not moving the WAR
>> anywhere.
>> It only unpacks the WAR in the folder where the WAR is located. Therefore
>> the only difference between the two paths are that the one for deploying
>> includes the period and the war extension '.war'. My two paths look like
>> this:
>>
>> Deploy path:
>>
>> ${project.build.directory}${file.separator}${project.build.finalName}.${project.packaging}
>>
>> Undeploy path;
>> ${project.build.directory}${file.separator}${project.build.finalName}
>>
>> When I started on this task I thought the TomEE Maven plugin has the same
>> functionality as the Tomcat plugin which can deploy a WAR file on a remote
>> server and undeploy it again. This turns out not to be the case. Maybe I
>> can find time to extend the plugin some time in the future
>>
>> Regards
>> Esben
>>
>>
>> On Tue, Sep 24, 2013 at 4:19 PM, Romain Manni-Bucau
>> <[email protected]>wrote:
>>
>> > The path needs to be the deployed path. I don't recall if it is logged
>> when
>> > deploying but it is for sure in the container logs
>> >
>> > *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]>
>> >
>> > > I am not sure what you mean. I need to be able to do it through the
>> > > tomee-plugin because the tests eventually need to be executed against
>> a
>> > > test server where the production version of the WAR must be deployed
>> on.
>> > >
>> > > I have made a new workspace on a local drive so now I can deploy and
>> run
>> > > the tests. That is nice but doesn't solve the basic problem.
>> > >
>> > > Next I want to undeploy the WAR when I have tested it. I am trying to
>> use
>> > > the following configuration
>> > >
>> > > <execution>
>> > > <id>tomee-undeploy</id>
>> > > <goals>
>> > >  <goal>undeploy</goal>
>> > > </goals>
>> > > <phase>post-integration-test</phase>
>> > >  <configuration>
>> > > <tomeeVersion>1.5.2</tomeeVersion>
>> > >  <tomeeClassifier>plus</tomeeClassifier>
>> > >  <tomeeHost>${tomeeHostName}</tomeeHost>
>> > >  <tomeeHttpPort>${tomee.http.port}</tomeeHttpPort>
>> > >  <path>${warToDeployPath}</path>
>> > >
>> > > </configuration>
>> > >  </execution>
>> > >
>> > > where the path comes from this definition
>> > >
>> > >
>> >
>> <warToDeployPath>${project.build.directory}\${project.build.finalName}.${project.packaging}</warToDeployPath>
>> > >
>> > > This works for the deployment execution but not for the undeploy
>> > execution
>> > > which gives the following error
>> > >
>> > > [INFO] --- tomee-maven-plugin:1.5.2:undeploy (tomee-undeploy) @
>> > > DeployService ---
>> > > [DEBUG] Configuring mojo
>> > > org.apache.openejb.maven:tomee-maven-plugin:1.5.2:undeploy from plugin
>> > > realm
>> > ClassRealm[plugin>org.apache.openejb.maven:tomee-maven-plugin:1.5.2,
>> > > parent: sun.misc.Launcher$AppClassLoader@709db0ad]
>> > > [DEBUG] Configuring mojo
>> > > 'org.apache.openejb.maven:tomee-maven-plugin:1.5.2:undeploy' with
>> basic
>> > > configurator -->
>> > > [DEBUG]   (f) path =
>> C:\workspace1\DeployService\target\DeployService.war
>> > > [DEBUG]   (f) tomeeHost = localhost
>> > > [DEBUG]   (f) tomeeHttpPort = 36913
>> > > [DEBUG] -- end configuration --
>> > > sep 24, 2013 3:46:14 PM org.apache.openejb.client.EventLogger log
>> > > INFO: RemoteInitialContextCreated{providerUri=
>> > > http://localhost:36913/tomee/ejb}
>> > > [INFO]
>> > >
>> ------------------------------------------------------------------------
>> > > [INFO] BUILD FAILURE
>> > > [INFO]
>> > >
>> ------------------------------------------------------------------------
>> > > [INFO] Total time: 4.927s
>> > > [INFO] Finished at: Tue Sep 24 15:46:14 CEST 2013
>> > > [INFO] Final Memory: 21M/334M
>> > > [INFO]
>> > >
>> ------------------------------------------------------------------------
>> > > [ERROR] Failed to execute goal
>> > > org.apache.openejb.maven:tomee-maven-plugin:1.5.2:undeploy
>> > (tomee-undeploy)
>> > > on project DeployService: Execution tomee-undeploy of goal
>> > > org.apache.openejb.maven:tomee-maven-plugin:1.5.2:undeploy failed:
>> > > C:\workspace1\DeployService\target\DeployService.war -> [Help 1]
>> > > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>> execute
>> > > goal org.apache.openejb.maven:tomee-maven-plugin:1.5.2:undeploy
>> > > (tomee-undeploy) on project DeployService: Execution tomee-undeploy of
>> > goal
>> > > org.apache.openejb.maven:tomee-maven-plugin:1.5.2:undeploy failed:
>> > > C:\workspace1\DeployService\target\DeployService.war
>> > >
>> > > In the docs it says that the path should be the same but that doesn't
>> > seem
>> > > to be the case ?
>> > >
>> > > Regards
>> > > Esben
>> > >
>> > >
>> > > On Tue, Sep 24, 2013 at 2:34 PM, Romain Manni-Bucau
>> > > <[email protected]>wrote:
>> > >
>> > > > Maybe cause java is faked by the path on windows. basically you can
>> > > deploy
>> > > > from maven (mvn:groupid:artifactid:version:war) or http on trunk
>> > > >
>> > > > *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]>
>> > > >
>> > > > > The 1.6.0-SNAPSHOT didn't solve the path problem. But thanks for
>> the
>> > > help
>> > > > > so far anyway :-)
>> > > > >
>> > > > >
>> > > > > On Tue, Sep 24, 2013 at 2:13 PM, Esben Rugbjerg <
>> > > [email protected]
>> > > > > >wrote:
>> > > > >
>> > > > > > Good news :-) Using version 1.5.2 solved the problem with the
>> > > different
>> > > > > > version of the serilization classes. I'll try the
>> 1.6.0-SNAPSHOT to
>> > > se
>> > > > if
>> > > > > > it solves the problem with the path to a network drive.
>> > > > > >
>> > > > > >
>> > > > > > On Tue, Sep 24, 2013 at 1:42 PM, Romain Manni-Bucau <
>> > > > > [email protected]
>> > > > > > > wrote:
>> > > > > >
>> > > > > >>
>> > > > > >>
>> > > > >
>> > > >
>> > >
>> >
>> http://central.maven.org/maven2/org/apache/openejb/maven/tomee-maven-plugin/
>> > > > > >> 1.5.2
>> > > > > >> ;)
>> > > > > >>
>> > > > > >> if it doesn't try please give it a try on 1.6.0-SNAPSHOT (needs
>> > > apache
>> > > > > >> snapshot repo)
>> > > > > >>
>> > > > > >> *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]>
>> > > > > >>
>> > > > > >> > Yes, thats what I thought. I think the problem must be in the
>> > > > plugin.
>> > > > > I
>> > > > > >> am
>> > > > > >> > using the official server version 1.5.2 from
>> > > > > >> > http://tomee.apache.org/downloads.html I am using version
>> 1.0.1
>> > > of
>> > > > > the
>> > > > > >> > plugin. Is there a newer one which is in sync with the 1.5.2
>> > > server
>> > > > ?
>> > > > > >> >
>> > > > > >> > Regards
>> > > > > >> > Esben
>> > > > > >> >
>> > > > > >> >
>> > > > > >> > On Tue, Sep 24, 2013 at 12:45 PM, Romain Manni-Bucau
>> > > > > >> > <[email protected]>wrote:
>> > > > > >> >
>> > > > > >> > > basically means you use a tomee and a tomee mvn plugin with
>> > > > > different
>> > > > > >> > > version i think
>> > > > > >> > >
>> > > > > >> > > *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]>
>> > > > > >> > >
>> > > > > >> > > > I'll try to see if I can get trunk up and running.
>> > > > > >> > > >
>> > > > > >> > > > By the way. If I run it from a local drive and the webapp
>> > > > actually
>> > > > > >> gets
>> > > > > >> > > > deployed I get the following warning:
>> > > > > >> > > >
>> > > > > >> > > > [DEBUG] Configuring mojo
>> > > > > >> > > >
>> 'org.apache.openejb.maven:tomee-maven-plugin:1.0.1:deploy'
>> > > with
>> > > > > >> basic
>> > > > > >> > > > configurator -->
>> > > > > >> > > > [DEBUG]   (f) path = c:\DeployService.war
>> > > > > >> > > > [DEBUG]   (f) tomeeHost = localhost
>> > > > > >> > > > [DEBUG]   (f) tomeeHttpPort = 36913
>> > > > > >> > > > [DEBUG] -- end configuration --
>> > > > > >> > > > sep 24, 2013 12:35:52 PM
>> > org.apache.openejb.client.EventLogger
>> > > > log
>> > > > > >> > > > INFO: RemoteInitialContextCreated{providerUri=
>> > > > > >> > > > http://localhost:36913/tomee/ejb}
>> > > > > >> > > > sep 24, 2013 12:35:53 PM
>> > org.apache.openejb.client.EventLogger
>> > > > log
>> > > > > >> > > > WARNING: RequestFailed{server=
>> > > http://localhost:36913/tomee/ejb}
>> > > > > >> > > > EJBRequest{deploymentId='openejb/Deployer',
>> > > > > >> > > > type=EJB_OBJECT_BUSINESS_METHOD, method='deploy',
>> > > > > primaryKey='null'}
>> > > > > >> > > > {error=Cannot read the response from the server
>> (OEJP/3.1) :
>> > > > > >> > > > org.apache.openejb.assembler.classic.AppInfo; local class
>> > > > > >> incompatible:
>> > > > > >> > > > stream classdesc serialVersionUID = 7690895426891445405,
>> > local
>> > > > > class
>> > > > > >> > > > serialVersionUID = -8446165016999701001}
>> > > > > >> > > >
>> > > > > >> > > > But it still deploys.
>> > > > > >> > > >
>> > > > > >> > > > Regards
>> > > > > >> > > > Esben
>> > > > > >> > > >
>> > > > > >> > > >
>> > > > > >> > > > On Tue, Sep 24, 2013 at 12:16 PM, Romain Manni-Bucau
>> > > > > >> > > > <[email protected]>wrote:
>> > > > > >> > > >
>> > > > > >> > > > > Hi
>> > > > > >> > > > >
>> > > > > >> > > > > Wonder if it works on trunk, i remember i hack
>> something
>> > > close
>> > > > > in
>> > > > > >> > > another
>> > > > > >> > > > > context on a recent version.
>> > > > > >> > > > > Le 24 sept. 2013 12:09, "Esben Rugbjerg" <
>> > > > > [email protected]>
>> > > > > >> a
>> > > > > >> > > > > écrit :
>> > > > > >> > > > >
>> > > > > >> > > > > > Hi again
>> > > > > >> > > > > >
>> > > > > >> > > > > > I have made a few more tests. I turns out that the
>> > problem
>> > > > > >> occurs
>> > > > > >> > if
>> > > > > >> > > > the
>> > > > > >> > > > > > file that I try to deploy is located on a network
>> drive.
>> > > > > >> > > > > >
>> > > > > >> > > > > > If I use
>> > > > > >> > > > > > <path>c:\DeployService.war</path>
>> > > > > >> > > > > > it works
>> > > > > >> > > > > >
>> > > > > >> > > > > > The drive with the letter 'y' is a network drive. If
>> I
>> > > use:
>> > > > > >> > > > > > <path>y;\DeployService.war</path>
>> > > > > >> > > > > > it doesn't work
>> > > > > >> > > > > >
>> > > > > >> > > > > > I am normally running through a Cygwin terminal but
>> have
>> > > > also
>> > > > > >> tried
>> > > > > >> > > > > through
>> > > > > >> > > > > > a normal shell (cmd.exe) and the problem occurs in
>> both
>> > > > cases.
>> > > > > >> > > > > >
>> > > > > >> > > > > > Bug or feature or something that is not related to
>> Maven
>> > > and
>> > > > > the
>> > > > > >> > > TomEE
>> > > > > >> > > > > > plugin ?
>> > > > > >> > > > > >
>> > > > > >> > > > > > Regards
>> > > > > >> > > > > > Esben
>> > > > > >> > > > > >
>> > > > > >> > > > > >
>> > > > > >> > > > > > On Tue, Sep 24, 2013 at 11:06 AM, Romain Manni-Bucau
>> > > > > >> > > > > > <[email protected]>wrote:
>> > > > > >> > > > > >
>> > > > > >> > > > > > > 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
>> > > > > >> > > > > > > > =================
>> > > > > >> > > > > > > >
>> > > > > >> > > > > > >
>> > > > > >> > > > > >
>> > > > > >> > > > > >
>> > > > > >> > > > > >
>> > > > > >> > > > > > --
>> > > > > >> > > > > > =================
>> > > > > >> > > > > > 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
>> > > > > >> > > > =================
>> > > > > >> > > >
>> > > > > >> > >
>> > > > > >> >
>> > > > > >> >
>> > > > > >> >
>> > > > > >> > --
>> > > > > >> > =================
>> > > > > >> > 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
>> > > > > > =================
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > =================
>> > > > > 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
>> > > =================
>> > >
>> >
>>
>>
>>
>> --
>> =================
>> cand.polyt.
>> Esben Rugbjerg
>> Guldborgvej 44, 3.th.
>> 2000 Frederiksberg
>> Danmark
>> email: [email protected]
>> mobil-tlf.: +45 28715166
>> =================
>>
>
>

Reply via email to