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 162173 - [67cat] Run for Maven Enterprise Application picks random war project
Summary: [67cat] Run for Maven Enterprise Application picks random war project
Status: RESOLVED INCOMPLETE
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-07 22:00 UTC by big_al
Modified: 2011-03-04 11:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description big_al 2009-04-07 22:00:26 UTC
[ JDK VERSION : 1.6.* ]

Steps to reproduce:

1. Create a Maven Enterprise Application
2. Create a second Maven web application and add it to the Enterprise
Application
3. Select Run for the Enterprise Application

When this is done, the web application shown in the browser after
deploy cannot be predicted. Sometimes it is the first web app from
the original Enterprise Application, sometimes its the second web
application added.

Expected outcome:

I would have expected that NetBeans always run the first web
application (webapp) defined in the enterprise application:

            <plugin>
                <artifactId>maven-ear-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <displayName>MyApp</displayName>
                    <description>My App explained</description>
                    <version>5</version>
                    <modules>
                        <webModule>
                            <groupId>${groupId}</groupId>
                            <artifactId>webapp</artifactId>
                            <contextRoot>/webapp</contextRoot>
                           
<bundleFileName>webapp-${version}.war</bundleFileName>
                        </webModule>
                        <webModule>
                            <groupId>${groupId}</groupId>
                            <artifactId>webservices</artifactId>
                            <contextRoot>/ws</contextRoot>
                           
<bundleFileName>webservices-${version}.war</bundleFileName>
                        </webModule>
                        <ejbModule>
                            <groupId>${groupId}</groupId>
                            <artifactId>myapp-ejb</artifactId>
                           
<bundleFileName>myapp-ejb-${version}.jar</bundleFileName>
                        </ejbModule>
                    </modules>
                </configuration>
            </plugin>
Comment 1 Milos Kleint 2009-04-10 15:04:50 UTC
done, the ordering is no done based on the pom dependencies ordering, and if present the ear plugin configuration is
taken into account.
http://hg.netbeans.org/main/rev/78de5ebfc96f

Comment 2 Quality Engineering 2009-04-11 06:52:41 UTC
Integrated into 'main-golden', will be available in build *200904110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/78de5ebfc96f
User: Milos Kleint <mkleint@netbeans.org>
Log: #162173 sort j2ee modules based on the order in project pom. Give the ordering in the pom's ear plugin configuration even more priority.
Comment 3 big_al 2009-05-25 13:28:52 UTC
I haven't been able to verify that this works. It still opens a random project when I Run Maven enterprise apps with more than one war. What information do 
you need in order to troubleshoot?
Comment 4 Milos Kleint 2009-06-26 12:59:05 UTC
http://hg.netbeans.org/main/rev/ca3cd8074645 orders return values from another api method, but it seems to be still
random (even though the return values are consistent. reassigning to j2eeserver for evaluation. 
Comment 5 Quality Engineering 2009-06-27 05:39:42 UTC
Integrated into 'main-golden', will be available in build *200906270201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ca3cd8074645
User: Milos Kleint <mkleint@netbeans.org>
Log: #162173 make all methods returning anything related to modules to return it in the correct order (as in pom config)
Comment 6 Petr Hejl 2011-02-18 14:19:16 UTC
Can you retest with 7.0 Beta2? There were many fixes in EAR area. Can you also attach the sample application and/or provide exact steps to reproduce this?
Comment 7 Petr Hejl 2011-03-04 11:37:58 UTC
I'm not able to reproduce and there is no response from reporter.