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 198848 - Copy Dependent Libraries fails
Summary: Copy Dependent Libraries fails
Status: RESOLVED WORKSFORME
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-24 10:30 UTC by _ proxity
Modified: 2011-05-27 10:53 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
ant debug output (314.80 KB, text/x-log)
2011-05-26 07:40 UTC, _ proxity
Details
Google App Engine output (2.04 KB, text/x-log)
2011-05-26 07:41 UTC, _ proxity
Details
Main and dependent project (28.82 KB, application/zip)
2011-05-26 08:55 UTC, _ proxity
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ proxity 2011-05-24 10:30:22 UTC
I've updated from NetBeans 6.9 to 7.0. 
The update process has set the new option "Project/Properties/Packaging/Copy Dependent Libraries" to true for all my library projects.

The main project is a web app which uses the Google App Engine module from kenai.com. When I run the main project I always get a BUILD FAILED because 

<copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
  <fileset dir="${build.classes.dir}"/>
  <manifest>
    <attribute name="Class-Path" value="${jar.classpath}"/>
    <customize/>
  </manifest>
</copylibs>

in build-impl.xml of the library projects always fails with

copylibs doesn't support the "indexMetaInf" attribute

If I turn "Project/Properties/Packaging/Copy Dependent Libraries" off for all library projects I can run the main projects as on NetBeans 6.9.
Comment 1 Tomas Zezula 2011-05-24 16:12:53 UTC
The Ant 1.8.0 or newer is needed to support indexMetaInf.
The NB 7.0 comes with Ant 1.8.2 (Apache Ant(TM) version 1.8.2 compiled on December 20 2010).
Don't you have your own Ant set?
Can you attach ant debug output?
Comment 2 David Konecny 2011-05-24 22:04:51 UTC
Web Project do not even have this option.
Comment 3 _ proxity 2011-05-25 06:27:24 UTC
David, the building of the library projects fails when they are built as dependent projects.
Comment 4 _ proxity 2011-05-25 06:44:30 UTC
Tomas, I suspect that the Google App Engine is the problem.

A Clean & Build of the main project works. I assume that this is done by
NetBeans' ant.

Only running works not. May be GAE uses its own ant for building and local
deployment. The latest version of the official GAE SDK contains an old version
of ant:

appengine-java-sdk-1.5.0.1/lib/shared/jsp/repackaged-appengine-ant-launcher-1.7.1.jar
appengine-java-sdk-1.5.0.1/lib/shared/jsp/repackaged-appengine-ant-1.7.1.jar
Comment 5 Tomas Zezula 2011-05-25 08:40:11 UTC
Right, the Google App Engine is the problem.
I have no idea which part of j2ee project it should belong.
Reassigning back to David to do reevaluation.
The GAP support should overload the init-macrodef-copylibs if it uses older ant.
Comment 6 David Konecny 2011-05-25 22:42:59 UTC
Could you please go to Tools->Options->Miscellaneous->Ant and set Verbose Level to debug and execute Run and save the Ant output into a file and append it here. It would also help us if you could attach a sample WebProject using GAE and a dependent project to demonstrate the problem. Thanks for your help. At the moment I assume that GAE support for NB is doing something wrong. You could as well as file this problem for them to evaluate first but since we already started talking about it I'm happy to evaluate it.
Comment 7 _ proxity 2011-05-26 07:40:09 UTC
Created attachment 108513 [details]
ant debug output
Comment 8 _ proxity 2011-05-26 07:41:22 UTC
Created attachment 108514 [details]
Google App Engine output
Comment 9 _ proxity 2011-05-26 07:44:02 UTC
David, I attached the logfiles.

Do you need the whole project dirs, e.g. as a zip archive?
Comment 10 Tomas Zezula 2011-05-26 07:52:16 UTC
How the Google App engine output is related to the build output (ant debug output)?
The Google App engine output is not in verbose mode.
The build (ant debug output) uses correctly ant 1.8.2 but I don't know from where the Google App engine output comes.
If you can share the project (or some simple test case) it would be great.
The Google App Engine suport comes from http://kenai.com/projects/nbappengine/pages/Home, right?
Comment 11 _ proxity 2011-05-26 08:28:48 UTC
Yes, it's the plug-in from Kenai. I wrote a posting about it on my blog http://machineplant.com I really want to see it integrated in NetBeans! :-)
The GAE output is displayed in the output window in a tab of its own. The GAE plug-in offers no switches, so I assume it will need some hacking to get verbose output here.
Comment 12 _ proxity 2011-05-26 08:55:36 UTC
Created attachment 108517 [details]
Main and dependent project

These more or less empty projects are enough to trigger the problem.
Comment 13 Tomas Zezula 2011-05-26 08:56:07 UTC
Thanks.
I will download the module and try.
Comment 14 David Konecny 2011-05-26 21:24:48 UTC
Sorry proxity, this is GAE integration into NetBeans issue. You should file this problem into their bugzilla and ask them to fix it. The problem is following:

GAE NB plugin creates ant-deploy file under nbproject directory and it contains "runserver" target which depends on project compilation. And when you request GAE server to be started in the IDE what happens is that this "runserver" target is executed. And it must be here where different Ant version jumps into game and is used to start the server *but* also build the project because "runserver" target depends on project's "dist" target.

On the other hand I must say that I cannot reproduce your problem. I'm using latest dev build of NB but everything runs fine and I never got "indexMetaInf problem". So perhaps the problem is in your local environment?? Some older version of Ant sitting somewhere and interfering??
Comment 15 _ proxity 2011-05-27 10:53:06 UTC
I removed the RPM ant-1.7.1-7.jpp5 from my system. Now it works!
May be the GAE plug-in used it for running my web-app, because it was available on the $PATH.

Thanks for you help!