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 104935 - Web Project does not build dependent projects
Summary: Web Project does not build dependent projects
Status: RESOLVED INVALID
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Radko Najman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-28 09:45 UTC by Adam Sotona
Modified: 2007-06-21 13:36 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 Adam Sotona 2007-05-28 09:45:30 UTC
Any dependency between Web and Standard or Web and Mobile projects are not built.
The dependencies are visible in project.xml but not in build-impl.xml.
Comment 1 Radko Najman 2007-06-05 15:17:56 UTC
The issue does not affect IDE users but it can block module writers.
Comment 2 Adam Sotona 2007-06-05 16:42:41 UTC
This issue affects IDE users only. 
No dependent projects (library projects) are built by web project type!
Comment 3 Jan Horvath 2007-06-12 16:04:18 UTC
Adame I'm not able to reproduce this issue. Please add more details.
Comment 4 Adam Sotona 2007-06-14 10:44:43 UTC
I am not able to reproduce it now because I am not able to create web project at all:
ava.lang.NoClassDefFoundError: org/netbeans/modules/websvc/api/jaxws/project/config/Endpoints

However the case is simple:
Create web project and any other project as a library project (j2se, j2me).
Add dependency and check "build required projects".
Click build and if the library project is realy build then the issue is already fixed.

For me it worked that any changes in dependeces stored in project.xml were not propagated to build-impl.xml so the
dependent projects were not built.
Comment 5 Lukas Jungmann 2007-06-14 12:26:06 UTC
I didn't notice that NCDFE filed anywhere in websvc component. Adam, can you file it there with build number, your ide
config and steps to reproduce, please? Thanks.
Comment 6 Adam Sotona 2007-06-14 13:00:02 UTC
I've just filled #106649, I found it today when trying to reproduce this issue.
Comment 7 Adam Sotona 2007-06-14 15:02:18 UTC
It is always reproducible in the lates daily build 200706131200.

Complete build output showing no lib projects beeing built:
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
C:\work\WebApplication4\nbproject\build-impl.xml:450: Warning: Could not find file
C:\work\MobileApplication7\dist\MobileApplication7.jar to copy.
BUILD FAILED (total time: 1 second)


fragment of the project.xml showing the dependency is set:
        <references xmlns="http://www.netbeans.org/ns/ant-project-references/2">
            <reference>
                <foreign-project>MobileApplication7</foreign-project>
                <artifact-type>jar</artifact-type>
                <script>${project.MobileApplication7}/build.xml</script>
                <target>jar</target>
                <clean-target>clean</clean-target>
                <id>jar</id>
                <properties>
                    <property name="config.active"/>
                </properties>
            </reference>

fragment of the build-impl.xml showing that the dependency is not there:
    <target depends="init" if="no.dist.ear.dir" name="deps-module-jar" unless="no.deps"/>
    <target depends="init" if="dist.ear.dir" name="deps-ear-jar" unless="no.deps"/>
    <target depends="init, deps-module-jar, deps-ear-jar" name="deps-jar" unless="no.deps"/>

Comment 8 Adam Sotona 2007-06-14 15:09:24 UTC
your web/project/src/org/netbeans/modules/web/project/resources/build-impl.xsl is missing transformation for 
                xmlns:projdeps2="http://www.netbeans.org/ns/ant-project-references/2"

the code transforming projdeps2 in Mobility looks like this:
            <xsl:variable name="references2" select="/project:project/project:configuration/projdeps2:references"/>
            <xsl:for-each select="$references2/projdeps2:reference[not('jar') or projdeps2:artifact-type = 'jar']">
                <xsl:variable name="subproj" select="projdeps2:foreign-project"/>
                <xsl:variable name="subtarget">
                    <xsl:choose>
                        <xsl:when test="'jar'">
                            <xsl:value-of select="projdeps2:target"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:value-of select="projdeps2:clean-target"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:variable>
                <xsl:variable name="script" select="projdeps2:script"/>
                <xsl:choose>
                    <xsl:when test="projdeps2:properties">
                        <ant target="{$subtarget}" inheritall="false" antfile="{$script}">
                            <xsl:for-each select="projdeps2:properties/projdeps2:property">
                                <property name="{@name}" value="{.}"/>
                            </xsl:for-each>
                        </ant>
                    </xsl:when>
                    <xsl:otherwise>
                        <ant target="{$subtarget}" inheritall="false" antfile="{$script}"/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
Comment 9 Radko Najman 2007-06-21 13:36:33 UTC
Cannot reproduce, it works fine for me. I created a web project, Java library, added a dependency and built the web
project. Java library was built as well and jar file was contained in the created war file.