Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 243313 - Custom Maven War WebResources / Project structure pane bug
Custom Maven War WebResources / Project structure pane bug
Status: RESOLVED FIXED
Product: javaee
Classification: Unclassified
Component: Maven
8.0
PC Windows 7
: P3 with 1 vote (vote)
: 8.0.1
Assigned To: Martin Janicek
issues@javaee
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-27 08:22 UTC by FredJeck
Modified: 2014-07-22 07:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Screenshot-A (92.52 KB, image/png)
2014-03-27 08:22 UTC, FredJeck
Details
Screenshot-B (7.03 KB, image/png)
2014-03-27 08:24 UTC, FredJeck
Details
default src/main/webapp not visible (30.67 KB, image/jpeg)
2014-06-18 07:35 UTC, roti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description FredJeck 2014-03-27 08:22:43 UTC
Created attachment 146345 [details]
Screenshot-A

Hello, 

I'm managing a multi-company / multi environment project using maven profiles with a specific maven-war-plugin configuration.
This is done by declaring two entries in the plugin's webresouces section :
- One containing company specific configuration (location is defined using profile-declared variables)
- The standard one under src/main/webapp containing common files

This configuration seems to be managed correctly by netbeans which shows in the project structure the various WebInf directories, except that one entry is always duplicated (see screenshots).

Worse, when switching profiles, the display is completely messed up.

Below an extract of my pom.xml file :

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <containerConfigXML>src/main/config/${env.company}/${env.name}/webapp/context.xml</containerConfigXML>
                    <webResources>
                        <resource>
                            <directory>src/main/config/${env.company}/${env.name}/webapp/WEB-INF</directory>
                            <filtering>true</filtering>
                            <targetPath>WEB-INF</targetPath>
                        </resource>
                        <resource>
                            <directory>src/main/webapp/WEB-INF</directory>
                            <filtering>true</filtering>
                            <targetPath>WEB-INF</targetPath>
                            <includes>
                                <include>**/*.jsp</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
Comment 1 FredJeck 2014-03-27 08:24:57 UTC
Created attachment 146346 [details]
Screenshot-B

Screenshot after switching a profile.
From times to times, the directory icon for the empty node is replaced by a file icon.
Comment 2 Martin Janicek 2014-03-28 10:45:12 UTC
Thanks, I will take a look at it.
Comment 3 roti 2014-06-18 07:34:57 UTC
Hello!

 I have similar problem.

When I have additional webResources defined, the default src/main/webapp not visible.

pom.xml snippet:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <webResources>
                    <resource>
                        <!-- custom files by defined profile variable -->
                        <directory>src/main/resources/${myProfile}/webapp</directory>
                    </resource>
                </webResources>
            </configuration>
        </plugin>
    </plugins>
</build>


The default src/main/webapp should be visible always, if not excluded with an exact directive.

Thanx
Comment 4 roti 2014-06-18 07:35:26 UTC
Created attachment 147709 [details]
default src/main/webapp not visible
Comment 5 Martin Janicek 2014-07-09 12:00:41 UTC
Thanks you both guys for reporting the problem. I'm able to reproduce the problem using your pom snippets. I'm going to fix it ASAP
Comment 6 Martin Janicek 2014-07-09 12:50:01 UTC
Fixed by change-set: web-main #a8db2e08622e

Can you guys please test the result in a few days when a new daily build containing the changes will be available? Thanks in advance!
Comment 7 Quality Engineering 2014-07-10 02:45:32 UTC
Integrated into 'main-silver', will be available in build *201407100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a8db2e08622e
User: Martin Janicek <mjanicek@netbeans.org>
Log: #243313 - Custom Maven War WebResources / Project structure pane bug
Comment 8 roti 2014-07-14 07:23:32 UTC
Sorry, but 201407100001 on http://bits.netbeans.org/dev/nightly/ gives 404, and 201407090001 is the latest.
Comment 9 Martin Janicek 2014-07-14 07:47:21 UTC
I have no direct control over the web pages [1]. Could you please wait and when you will be able to get nightly build from date 10.7 or newer than try it out?


[1] http://bits.netbeans.org/dev/nightly/
Comment 10 roti 2014-07-21 20:40:20 UTC
tested with 2014-07-21_00-01-50 and works great!
Thanx!
Comment 11 Martin Janicek 2014-07-22 07:08:26 UTC
Awesome, thanks for given me a message!


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