NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

How to decide a maven project also is a web application project?

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
difficult



Joined: 04 Jan 2009
Posts: 52

PostPosted: Tue Jun 21, 2011 11:01 am    Post subject: How to decide a maven project also is a web application project? Reply with quote

There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?
Back to top
Milos Kleint
Posted via mailing list.





PostPosted: Tue Jun 21, 2011 11:09 am    Post subject: [platform-dev] Re: There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans? Reply with quote

It's not clear to me what problem you are trying to solve.

based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)

Milos

On Tue, Jun 21, 2011 at 1:01 PM, difficult <address-removed> wrote:
Quote:
There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?




Back to top
difficult



Joined: 04 Jan 2009
Posts: 52

PostPosted: Wed Jun 22, 2011 10:38 am    Post subject: Re: [platform-dev] Re: There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans? Reply with quote

Milos Kleint wrote:
It's not clear to me what problem you are trying to solve.

based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)

Milos

On Tue, Jun 21, 2011 at 1:01 PM, difficult <address-removed> wrote:
Quote:
There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?


I am develping a plugin for netbeans which extend the web project type.like the example show in NetBeans Project Type Extension Module Tutorial ,I implement my LookupProvider and in method createAdditionalLookup,if this is a web application, a new lookup item will add to the lookup.I want do this same if the project is a maven web project, but How can't I deside a project is a maven web project?
Back to top
Milos Kleint
Posted via mailing list.





PostPosted: Wed Jun 22, 2011 11:03 am    Post subject: [platform-dev] Re: How to decide a maven project also is a web application project? Reply with quote

in your LookupProvider implementation you would grab the
NbMavenProject instance from the project's base lookup and get
MavenProject instance from it. then just getPackaging() == "war" and
you got your maven web project.

for a more complex example code, see
http://hg.netbeans.org/main-golden/file/c981ede67f8d/maven.j2ee/src/org/netbeans/modules/maven/j2ee/J2eeLookupProvider.java

Milos

On Wed, Jun 22, 2011 at 12:39 PM, difficult <address-removed> wrote:
Quote:

Milos Kleint wrote:
Quote:
It's not clear to me what problem you are trying to solve.

based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)

Milos

On Tue, Jun 21, 2011 at 1:01 PM, difficult <address-removed> wrote:

Quote:
There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?




I am develping a plugin for netbeans which  extend the web project type.like the example show in NetBeans Project Type Extension Module Tutorial   (http://platform.netbeans.org/tutorials/nbm-projectextension.html),I implement my LookupProvider and in method createAdditionalLookup,if this is a web application, a new lookup item will add to the lookup.I want do this same if the project is a maven web project, but How can't I deside a project is a maven web project?




Back to top
Geertjan Wielenga
Posted via mailing list.





PostPosted: Wed Jun 22, 2011 11:51 am    Post subject: [platform-dev] Re: How to decide a maven project also is a web application project? Reply with quote

On 06/22/2011 12:39 PM, difficult wrote:
Quote:
Milos Kleint wrote:
Quote:
It's not clear to me what problem you are trying to solve.

based on packaging maybe? or anything else from the resolved
MavenProject instance (like a maven plugin configuration).
Please note however that your own LookupProvider implementation and
it's content will probably clash with the default maven.j2ee module
(which is bridging the maven and j2ee support codebases)

Milos

On Tue, Jun 21, 2011 at 1:01 PM, difficult<address-removed> wrote:

Quote:
There is a Maven project which is also a web application,when open the project ,how to decide this project is a web application in my custom LookupProvider Implement in netbeans?


I am develping a plugin for netbeans which extend the web project type

But why? What is it that you are trying to create?

Gj



Quote:
.like the example show in NetBeans Project Type Extension Module Tutorial (http://platform.netbeans.org/tutorials/nbm-projectextension.html),I implement my LookupProvider and in method createAdditionalLookup,if this is a web application, a new lookup item will add to the lookup.I want do this same if the project is a maven web project, but How can't I deside a project is a maven web project?



Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo