You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kvpetrov <kp...@arrowheadgrp.com> on 2006/06/03 00:33:06 UTC

eclipse, wtp, maven and web apps

Eclipse allows you to deploy the web applications using the WTP's servers. It
seems like it uses the src/main/webapp folder and it also supplies the
classpath which is comprised of target/classes folder and all the
dependencies that you define in your POM.

Isn't it wrong though to use the src/main/webapp folder? I can imagine that
the real webapp folder when gets built might be different from the src one
because of filtering for example. It can also look differently because of
some plugin that assemples some other sources in the final webapp folder. Is
it possible to use instead of src/main/webapp target/<webapp_name> ?
--
View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4688055
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by Jamie Bisotti <jb...@gmail.com>.
On 6/7/06, Alexandre Poitras <al...@gmail.com> wrote:
>
> By the way, when I speak about the Eclipse Maven plugin, I am speaking
> about this one http://maven.apache.org/eclipse-plugin.html. I guess in
> the future, there is going to be a more complete Maven builder
> included.
>
> On 6/7/06, Alexandre Poitras <al...@gmail.com> wrote:
> > Well this may be possible in the future with the eclipse maven plugin.
> Anyway,
> > packaging a web app is not something you do regularly. I think you are
> > being a bit idealistic here. It's not optimal but in the mean time it
> > works correctly. Never seen any performance issue and I don't agree
> > with what you have defined as problems.
> >
> > On 6/7/06, kvpetrov <kp...@arrowheadgrp.com> wrote:
> > >
> > > I don't think turning off autobuild feature of Eclipse is a good idea.
> I like
> > > Eclipse compiling my java classes on fly. There two problems with the
> > > current behavior:
> > > 1) I don't want to waste my CPU on copying files back and forward
> taking
> > > into account that the resulting application is not usable anyway
> because
> > > Eclipse just can't build it right. Instead of trying to build it on
> its own
> > > when you publish the app Eclipse should call appropriate maven goals
> when a
> > > resource is touched. Basically, this is more of a problem for the
> Eclipse
> > > maven plugin that can't get triggered when a particular resource is
> changed
> > > within Eclipse project.
> > >
> > > 2) Because the resulted app is invalid I can not associate the project
> with
> > > a server and start it within Eclipse.
> > >
> > > Of course, I found ways around this problem but I still think that
> what
> > > WTP+Maven do now is completely wrong. Eclipse can still compile java
> classes
> > > on fly it does not prevent maven from correctly assembling the app and
> > > providing it to WTP for deployment.
> > > --
> > > View this message in context:
> http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4763221
> > > Sent from the Maven - Users forum at Nabble.com.
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Just curious, but have you filed any JIRA issues for the things you consider
to be bugs, or enhancements?  If not, I'd encourage you to do so in order
for them to be considered in future development.  Good luck!

-- 
Jamie Bisotti

Re: eclipse, wtp, maven and web apps

Posted by Alexandre Poitras <al...@gmail.com>.
By the way, when I speak about the Eclipse Maven plugin, I am speaking
about this one http://maven.apache.org/eclipse-plugin.html. I guess in
the future, there is going to be a more complete Maven builder
included.

On 6/7/06, Alexandre Poitras <al...@gmail.com> wrote:
> Well this may be possible in the future with the eclipse maven plugin. Anyway,
> packaging a web app is not something you do regularly. I think you are
> being a bit idealistic here. It's not optimal but in the mean time it
> works correctly. Never seen any performance issue and I don't agree
> with what you have defined as problems.
>
> On 6/7/06, kvpetrov <kp...@arrowheadgrp.com> wrote:
> >
> > I don't think turning off autobuild feature of Eclipse is a good idea. I like
> > Eclipse compiling my java classes on fly. There two problems with the
> > current behavior:
> > 1) I don't want to waste my CPU on copying files back and forward taking
> > into account that the resulting application is not usable anyway because
> > Eclipse just can't build it right. Instead of trying to build it on its own
> > when you publish the app Eclipse should call appropriate maven goals when a
> > resource is touched. Basically, this is more of a problem for the Eclipse
> > maven plugin that can't get triggered when a particular resource is changed
> > within Eclipse project.
> >
> > 2) Because the resulted app is invalid I can not associate the project with
> > a server and start it within Eclipse.
> >
> > Of course, I found ways around this problem but I still think that what
> > WTP+Maven do now is completely wrong. Eclipse can still compile java classes
> > on fly it does not prevent maven from correctly assembling the app and
> > providing it to WTP for deployment.
> > --
> > View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4763221
> > Sent from the Maven - Users forum at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by Alexandre Poitras <al...@gmail.com>.
Well this may be possible in the future with the eclipse maven plugin. Anyway,
packaging a web app is not something you do regularly. I think you are
being a bit idealistic here. It's not optimal but in the mean time it
works correctly. Never seen any performance issue and I don't agree
with what you have defined as problems.

On 6/7/06, kvpetrov <kp...@arrowheadgrp.com> wrote:
>
> I don't think turning off autobuild feature of Eclipse is a good idea. I like
> Eclipse compiling my java classes on fly. There two problems with the
> current behavior:
> 1) I don't want to waste my CPU on copying files back and forward taking
> into account that the resulting application is not usable anyway because
> Eclipse just can't build it right. Instead of trying to build it on its own
> when you publish the app Eclipse should call appropriate maven goals when a
> resource is touched. Basically, this is more of a problem for the Eclipse
> maven plugin that can't get triggered when a particular resource is changed
> within Eclipse project.
>
> 2) Because the resulted app is invalid I can not associate the project with
> a server and start it within Eclipse.
>
> Of course, I found ways around this problem but I still think that what
> WTP+Maven do now is completely wrong. Eclipse can still compile java classes
> on fly it does not prevent maven from correctly assembling the app and
> providing it to WTP for deployment.
> --
> View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4763221
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by kvpetrov <kp...@arrowheadgrp.com>.
I don't think turning off autobuild feature of Eclipse is a good idea. I like
Eclipse compiling my java classes on fly. There two problems with the
current behavior:
1) I don't want to waste my CPU on copying files back and forward taking
into account that the resulting application is not usable anyway because
Eclipse just can't build it right. Instead of trying to build it on its own
when you publish the app Eclipse should call appropriate maven goals when a
resource is touched. Basically, this is more of a problem for the Eclipse
maven plugin that can't get triggered when a particular resource is changed
within Eclipse project.

2) Because the resulted app is invalid I can not associate the project with
a server and start it within Eclipse.

Of course, I found ways around this problem but I still think that what
WTP+Maven do now is completely wrong. Eclipse can still compile java classes
on fly it does not prevent maven from correctly assembling the app and
providing it to WTP for deployment. 
--
View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4763221
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by Alexandre Poitras <al...@gmail.com>.
It isn't a problem, your ide compiling/debugging functionalities are
enough to write and test your code. In that case, you just need Maven
to produce a valid Eclipse project according to the pom. If it's still
bother you, just turn off Eclipse automatic build features and run
Maven from Eclipse as an external tool.

Most of the time I use Maven only to execute indivual goals while I
let continuum, which run on a different server, in charge of
retrieving the project lastest sources and deploying nightly builds on
our internal repository.

Work like a charm in our case.

On 6/6/06, kvpetrov <kp...@arrowheadgrp.com> wrote:
>
> Maven has an eclipse plugin that would create eclipse configuration for a WTP
> web application.
>
> Let's imagine that you have created a web application in maven and now you
> want to work with it using Eclipse. You would do something like this:
> mvn -Dwtpversion=1.0 eclipse:eclipse
>
> Now, you open Eclipse, create a server (for example a Tomcat server), open
> the project and publish it to the server you have just defined.
> The publishing part I believe is wrong. WTP plugin starts assembling the
> application for you which does not make any sense for me.
>
> It will create a folder
> workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/ROOT
> and will copy your src/main/webapp into it. Then it will populate the
> WEB-INF/lib folder with your dependencies, and finally will copy your
> compiled classes under WEB-INF/classes.
>
> Though this might work for you, it is definitely not the right approach. It
> is not WTP plugin which should assemble the application. Maven already
> creates the application in target/webapp This is the folder that needs to be
> published.
> --
> View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4738255
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by kvpetrov <kp...@arrowheadgrp.com>.
Maven has an eclipse plugin that would create eclipse configuration for a WTP
web application. 

Let's imagine that you have created a web application in maven and now you
want to work with it using Eclipse. You would do something like this:
mvn -Dwtpversion=1.0 eclipse:eclipse

Now, you open Eclipse, create a server (for example a Tomcat server), open
the project and publish it to the server you have just defined.
The publishing part I believe is wrong. WTP plugin starts assembling the
application for you which does not make any sense for me. 

It will create a folder 
workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/ROOT
and will copy your src/main/webapp into it. Then it will populate the
WEB-INF/lib folder with your dependencies, and finally will copy your
compiled classes under WEB-INF/classes.

Though this might work for you, it is definitely not the right approach. It
is not WTP plugin which should assemble the application. Maven already
creates the application in target/webapp This is the folder that needs to be
published.
--
View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4738255
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
kvpetrov wrote:
> I can't believe I am the only one who encountered this problem. Guys, help!
> --
> View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4720818
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>   
I didn't understand exactly what do you mean. Can you make an example?
Srgjan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: eclipse, wtp, maven and web apps

Posted by kvpetrov <kp...@arrowheadgrp.com>.
I can't believe I am the only one who encountered this problem. Guys, help!
--
View this message in context: http://www.nabble.com/eclipse%2C-wtp%2C-maven-and-web-apps-t1725424.html#a4720818
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org