This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 170990 - JSF framework work strange for JavaEE6 maven web projects
Summary: JSF framework work strange for JavaEE6 maven web projects
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Alexey Butenko
URL:
Keywords:
Depends on: 165043
Blocks:
  Show dependency tree
 
Reported: 2009-08-27 13:56 UTC by Jaroslav Pospisil
Modified: 2009-10-12 15:19 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
adds "maven-pom" volume to jsf lib definition (1011 bytes, patch)
2009-09-10 13:54 UTC, David Simonek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Pospisil 2009-08-27 13:56:14 UTC
Build 200908260201,JDK1.6.0_15,Win Vista

Create new JavaEE6 Maven Web Application,open Properties/Frameworks, add JSF Framework and click Finish. IDE either
hangs up entirelyfor tens of minutes (10-15 my guess)  nad then project is created, but without WelcomeJSF.jsp page.
Comment 1 Milos Kleint 2009-08-28 13:12:29 UTC
http://hg.netbeans.org/main/rev/8184ca645deb done for issue 156972 makes sure the project is not stored in AWT.
It still can take considerable amount of time. The jsf webframework adds a library to the project classpath. Because it
doesn't define "maven-pom" volume in the library definition, we check against the nexus indexes (that's where most
amount of time is spent the first time around (if working with fresh IDE userdir).

The consumed time is only avoidable by the jsf support adding proper maven-pom volume to the library. The reason for not
having welcome .jsf is probably also to be tracked backt o the jsf support. Reassigning.
Comment 2 Alexey Butenko 2009-09-08 14:55:52 UTC
Library added via ProjectClassPathModifier.addLibraries and it is passed to maven CPExtender, so 
why it can take care about maven-pom volume?
Comment 3 David Simonek 2009-09-09 16:53:21 UTC
??? I'm not sure I understand...

If library doesn't have "maven-pom" volume in the library definition, it makes our maven support struggle and guess,
which is time consuming as we see. What maven support do Milos explained a bit in a post above and in more detail on
forum: http://forums.netbeans.org/topic16233.html

So please would you add maven-pom volume in your library definition, like for example it's done for junit lib in
junit/resources/junit_3_8_2_lib.xml:

 <volume>
        <!-- please check with mkleint@netbeans.org before/after updating this or "classpath" section -->
        <type>maven-pom</type>
        <resource>http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.pom</resource>
    </volume>

Thanks! (In case your library is created dynamically in code, you'll need to add mentioned volume in code).

I see no way how this could be solved in maven support modules, that's why we are asking to add maven-pom volume, like
it's done for all libraries that came into touch with Maven. Reassigning back...
Comment 4 Alexey Butenko 2009-09-10 08:56:58 UTC
I can add it, but it is not clear for me what volume should be added, especially the resource section?
Comment 5 Jaroslav Pospisil 2009-09-10 09:26:31 UTC
Currently,in latest trunk builds,the delay is much shorter,when adding JSF or Struts framework. There's still missing
WelcomeJSF.jsp page, which could be caused by issue 165043,however.
Comment 6 David Simonek 2009-09-10 13:53:02 UTC
In resource section, there should be url pointing to maven repository where "mavenized" library is stored. I tried to
look at your module, I guess library is jsf20? I searched in maven repos, and will attach modified library definition xml.

I found jsf-api in version 2.0, but jsf-impl I found only in SNAPSHOT version, it seems that final artifact is not yet
available in maven repositories. Btw, both artifacts are in java-net repository, not in Maven central one.

Please verify that library versions I found are correct. I tested my patch and it seems to work OK. Previously, library
jars were copied to the project that user has created, which contradicts Maven philosophy a bit. Anyway, just verify my
patch and I believe you can integrate, thanks.

Comment 7 David Simonek 2009-09-10 13:54:05 UTC
Created attachment 87435 [details]
adds "maven-pom" volume to jsf lib definition
Comment 8 David Simonek 2009-09-10 13:59:30 UTC
Btw, I checked struts and it seems to be OK in terms of "maven-pom" volume.
Comment 9 Alexey Butenko 2009-09-10 14:19:14 UTC
Thanks David, I've checked JSF12 library and maven-pom is also there, but there is also facelets 1.1.14 lib (web.facelets010114), which can be used for JSF 
project, ant it has no maven-pom value. But it seems that I found values for it. So I'll push it soon.
Comment 10 Alexey Butenko 2009-09-10 14:25:26 UTC
http://hg.netbeans.org/web-main/rev/190b04d1c702
Comment 11 David Simonek 2009-09-10 14:49:44 UTC
Great, thanks for cooperation....but I have some comments

- probably there are a couple of typos: <resources> instead of <resource>?, according to
http://www.netbeans.org/dtds/library-declaration-1_0.dtd only <resource> is supported

- I believe you don't need to list "commons-*" in myfaces.xml section, as they are transitive dependencies of
myfaces-all. Maven automated dependency support will take care of transitive deps, it is just primary library what needs
to be specified AFAIK. Maven will load transitive dependencies according to "dependency" section of myfaces-all Maven
POM file.
Comment 12 Alexey Butenko 2009-09-10 14:57:36 UTC
Yes, it was typos. And I removed commons-* list 
http://hg.netbeans.org/web-main/rev/36a1866176f6
Comment 13 Alexey Butenko 2009-09-10 14:59:40 UTC
And one more typo http://hg.netbeans.org/web-main/rev/bdd839b2c0f9
Comment 14 Quality Engineering 2009-09-11 21:52:48 UTC
Integrated into 'main-golden', will be available in build *200909111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/190b04d1c702
User: Alexey Butenko <alexeybutenko@netbeans.org>
Log: #170990: JSF framework work strange for JavaEE6 maven web projects
Comment 15 Jaroslav Pospisil 2009-10-12 15:19:01 UTC
v.