You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adam Hardy <ad...@cyberspaceroad.com> on 2006/10/05 22:35:47 UTC

maven and WTP in eclipse

Hi All

I'm trying out the Eclipse Web Tools Platform (WTP) to see what it 
offers in terms of the development cycle, and I'm trying to configure a 
maven-ised 'dynamic web' project.

I have tomcat configured in Eclipse, and I have associated the maven 
project with tomcat, but trying to start it proves that Eclipse hasn't 
added the Maven dependencies to the project's classpath.

I cannot see any way to do this and I think I must do it manually in the 
config files in my project, but I haven't found any reference about what 
files or attributes to edit.

Does anyone have any experience with this?

Thanks
Adam

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


Re: maven and WTP in eclipse

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Rod,

what steps do you go through to get the WTP project deployed with maven 
filtering?

Tomcat in Eclipse is reading the classpath OK and is pointing at the 
unfiltered web resources in my project, so it falls over as soon as it 
sees the place holders such as ${root.context} or ${db.connection}.



Adam

Adam Hardy wrote:
> Aha. So it works with the maven-eclipse-plugin. Great. It's been a while 
> since I used that, I transferred over to the Eclipse mavenide plugin 
> some time ago, it has several advantages over the other - but they're 
> peripheral really.
> 
> I'll try it out tomorrow.
> 
> Rod Coffin on 05/10/06 22:00, wrote:
>> I do this frequently using the Maven eclipse plugin.  This plugin will
>> generate the necessary Eclipse project files from your Maven 
>> metadata.  You
>> can find information on the plugin at:
>> http://maven.apache.org/plugins/maven-eclipse-plugin/.  You will need to
>> specify the version of WTP that you are using.  For example:
>>
>> "mvn eclipse:eclipse -Dwtpversion=1.5"
>>
>> Also, you'll want to either create a M2_REPO classpath variable 
>> yourself or
>> have the plugin do it for you by executing the eclipse:add-maven-repo 
>> goal.
>>
>> On 10/5/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>>> I'm trying out the Eclipse Web Tools Platform (WTP) to see what it
>>> offers in terms of the development cycle, and I'm trying to configure a
>>> maven-ised 'dynamic web' project.
>>>
>>> I have tomcat configured in Eclipse, and I have associated the maven
>>> project with tomcat, but trying to start it proves that Eclipse hasn't
>>> added the Maven dependencies to the project's classpath.
>>>
>>> I cannot see any way to do this and I think I must do it manually in the
>>> config files in my project, but I haven't found any reference about what
>>> files or attributes to edit.


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


Re: maven and WTP in eclipse

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Aha. So it works with the maven-eclipse-plugin. Great. It's been a while since I 
used that, I transferred over to the Eclipse mavenide plugin some time ago, it 
has several advantages over the other - but they're peripheral really.

I'll try it out tomorrow.

Thanks
Adam

Rod Coffin on 05/10/06 22:00, wrote:
> I do this frequently using the Maven eclipse plugin.  This plugin will
> generate the necessary Eclipse project files from your Maven metadata.  You
> can find information on the plugin at:
> http://maven.apache.org/plugins/maven-eclipse-plugin/.  You will need to
> specify the version of WTP that you are using.  For example:
> 
> "mvn eclipse:eclipse -Dwtpversion=1.5"
> 
> Also, you'll want to either create a M2_REPO classpath variable yourself or
> have the plugin do it for you by executing the eclipse:add-maven-repo goal.
> 
> On 10/5/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>>
>> Hi All
>>
>> I'm trying out the Eclipse Web Tools Platform (WTP) to see what it
>> offers in terms of the development cycle, and I'm trying to configure a
>> maven-ised 'dynamic web' project.
>>
>> I have tomcat configured in Eclipse, and I have associated the maven
>> project with tomcat, but trying to start it proves that Eclipse hasn't
>> added the Maven dependencies to the project's classpath.
>>
>> I cannot see any way to do this and I think I must do it manually in the
>> config files in my project, but I haven't found any reference about what
>> files or attributes to edit.


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


Re: maven and WTP in eclipse

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Adam Hardy wrote:
> Srepfler,
> make sure you're using the latest maven-eclipse-plugin snapshot from 
> the snapshots repo at http://people.apache.org/maven-snapshot-repository
>
> This supports 1.5.
>
> I can't help you with the jboss stuff, sorry, but it sounds like you 
> have got your inter-project dependencies mixed up.
>
> An EAR file doesn't produce a JAR artifact and you can't make a maven 
> dependency on it because it doesn't have any of its own classes. You 
> should make a dependency on the each jar directly in your war pom, 
> installing them in your repo is they are not actual projects nor on 
> the maven repo.
>
> HTH
> Adam
>
I perhaps explained incorrectly, my War has a dependency on the EJB 
module, not on the EAR and I declare it in the War.
What happens is that the eclipse:eclipse task links the library 
installed in the repo not the eclipse project. Did this make more sense?
<dependency>
      <groupId>it.linksystem.csai</groupId>
      <artifactId>CSAIEJB</artifactId>
      <type>ejb</type>
      <scope>provided</scope>
</dependency>

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


Re: maven and WTP in eclipse

Posted by Adam Hardy <ad...@cyberspaceroad.com>.
Srepfler,
make sure you're using the latest maven-eclipse-plugin snapshot from the 
snapshots repo at http://people.apache.org/maven-snapshot-repository

This supports 1.5.

I can't help you with the jboss stuff, sorry, but it sounds like you 
have got your inter-project dependencies mixed up.

An EAR file doesn't produce a JAR artifact and you can't make a maven 
dependency on it because it doesn't have any of its own classes. You 
should make a dependency on the each jar directly in your war pom, 
installing them in your repo is they are not actual projects nor on the 
maven repo.

HTH
Adam


Srepfler Srgjan wrote:
> Rod Coffin wrote:
>> Hi Adam,
>>
>> I do this frequently using the Maven eclipse plugin.  This plugin will
>> generate the necessary Eclipse project files from your Maven 
>> metadata.  You
>> can find information on the plugin at:
>> http://maven.apache.org/plugins/maven-eclipse-plugin/.  You will need to
>> specify the version of WTP that you are using.  For example:
>>
>> "mvn eclipse:eclipse -Dwtpversion=1.5"
>>
>> Also, you'll want to either create a M2_REPO classpath variable 
>> yourself or
>> have the plugin do it for you by executing the eclipse:add-maven-repo 
>> goal.
>>
>> HTH,
>>
>> Rod
>>
>> On 10/5/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>>>
>>> Hi All
>>>
>>> I'm trying out the Eclipse Web Tools Platform (WTP) to see what it
>>> offers in terms of the development cycle, and I'm trying to configure a
>>> maven-ised 'dynamic web' project.
>>>
>>> I have tomcat configured in Eclipse, and I have associated the maven
>>> project with tomcat, but trying to start it proves that Eclipse hasn't
>>> added the Maven dependencies to the project's classpath.
>>>
>>> I cannot see any way to do this and I think I must do it manually in the
>>> config files in my project, but I haven't found any reference about what
>>> files or attributes to edit.
>>>
>>> Does anyone have any experience with this?
>>>
> It seems the current version supports only 1.0 R7 none, are you using 
> some other version?
> I personally am having a problem to deploy an EAR containing a War and 
> EJB module from eclipse to JBoss. Does anyone have this problem? Has 
> anyone managed to deploy an maven EAR project using the application 
> server explorer in eclipse? Also as I run the command to generate the 
> workspace as the Web module references the EJB module it expects a jar 
> artifact, is there a way to make that reference to a project reference 
> so that classes compiled in the ejb module get picked up by the Web 
> project?
> Also, I noticed the EAR project seems to have a java facet, isn't this 
> incorrect?


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


Re: maven and WTP in eclipse

Posted by Srepfler Srgjan <sr...@lnksystem.com>.
Rod Coffin wrote:
> Hi Adam,
>
> I do this frequently using the Maven eclipse plugin.  This plugin will
> generate the necessary Eclipse project files from your Maven 
> metadata.  You
> can find information on the plugin at:
> http://maven.apache.org/plugins/maven-eclipse-plugin/.  You will need to
> specify the version of WTP that you are using.  For example:
>
> "mvn eclipse:eclipse -Dwtpversion=1.5"
>
> Also, you'll want to either create a M2_REPO classpath variable 
> yourself or
> have the plugin do it for you by executing the eclipse:add-maven-repo 
> goal.
>
> HTH,
>
> Rod
>
> On 10/5/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>>
>> Hi All
>>
>> I'm trying out the Eclipse Web Tools Platform (WTP) to see what it
>> offers in terms of the development cycle, and I'm trying to configure a
>> maven-ised 'dynamic web' project.
>>
>> I have tomcat configured in Eclipse, and I have associated the maven
>> project with tomcat, but trying to start it proves that Eclipse hasn't
>> added the Maven dependencies to the project's classpath.
>>
>> I cannot see any way to do this and I think I must do it manually in the
>> config files in my project, but I haven't found any reference about what
>> files or attributes to edit.
>>
>> Does anyone have any experience with this?
>>
>> Thanks
>> Adam
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
It seems the current version supports only 1.0 R7 none, are you using 
some other version?
I personally am having a problem to deploy an EAR containing a War and 
EJB module from eclipse to JBoss. Does anyone have this problem? Has 
anyone managed to deploy an maven EAR project using the application 
server explorer in eclipse? Also as I run the command to generate the 
workspace as the Web module references the EJB module it expects a jar 
artifact, is there a way to make that reference to a project reference 
so that classes compiled in the ejb module get picked up by the Web project?
Also, I noticed the EAR project seems to have a java facet, isn't this 
incorrect?

Thanks,
Srgjan

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


Re: maven and WTP in eclipse

Posted by Rod Coffin <rf...@gmail.com>.
Hi Adam,

I do this frequently using the Maven eclipse plugin.  This plugin will
generate the necessary Eclipse project files from your Maven metadata.  You
can find information on the plugin at:
http://maven.apache.org/plugins/maven-eclipse-plugin/.  You will need to
specify the version of WTP that you are using.  For example:

"mvn eclipse:eclipse -Dwtpversion=1.5"

Also, you'll want to either create a M2_REPO classpath variable yourself or
have the plugin do it for you by executing the eclipse:add-maven-repo goal.

HTH,

Rod

On 10/5/06, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>
> Hi All
>
> I'm trying out the Eclipse Web Tools Platform (WTP) to see what it
> offers in terms of the development cycle, and I'm trying to configure a
> maven-ised 'dynamic web' project.
>
> I have tomcat configured in Eclipse, and I have associated the maven
> project with tomcat, but trying to start it proves that Eclipse hasn't
> added the Maven dependencies to the project's classpath.
>
> I cannot see any way to do this and I think I must do it manually in the
> config files in my project, but I haven't found any reference about what
> files or attributes to edit.
>
> Does anyone have any experience with this?
>
> Thanks
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>