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 199242 - <antversion> not properly declared
Summary: <antversion> not properly declared
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 181262
  Show dependency tree
 
Reported: 2011-06-07 16:36 UTC by kellyohair
Modified: 2011-06-10 14:50 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 kellyohair 2011-06-07 16:36:25 UTC
My ant scripts worked fine, I upgrade to the latest NetBeans and I can no longer run the version of ant I have used for many years because NetBeans has changed my ant script logic and now depends on a feature only available in a newer version of ant, namely indexMetaInf="${jar.index.metainf}" in that crazy copylibs logic.

BUILD FAILED
.../nbproject/build-impl.xml:693: The following error occurred while executing this line:
.../nbproject/build-impl.xml:520: copylibs doesn't support the "indexMetaInf" attribute


Yeah yeah I see lots of posts of 'just use ant 1.8.2' , well I can't just do that. I need to continue to use ant 1.7.1 and I need NetBeans to not throw roadblocks in the way.

Why is NetBeans forcing me to use ant 1.8.2?

So my choices are that I modify the horrific ant logic from NetBeans (build-impl.xml) and live with constantly editing that complicated file, or I just abandon all use of the NetBeans ant support logic and write my own ant script (I really hate to write ant logic, bruises my brain), or just abandon NetBeans completely and switch to Eclipse or some other IDE.
This is very frustrating, I like NetBeans, but I have NEVER liked the way this ant logic was done or convoluted way I had to work with it.
Part of this is a total frustration with ant, but the way NetBeans has implemented the build-impl.xml file is just pushing me over the edge.
Comment 1 Jesse Glick 2011-06-07 21:11:17 UTC
From time to time we use new features available in the bundled Ant release. This is not a bug. However, j2seproject's apparently are using a 1.8.0+ feature now, so the fix of bug #181262 was incomplete: <antversion atleast="1.7.1"/> should be <antversion atleast="1.8.0"/> (I suppose), which would print a more polite message when run on 1.7.1. Leaving open for that.

(In reply to comment #0)
> modify the horrific ant logic from NetBeans
> (build-impl.xml) and live with constantly editing that complicated file

Never edit build-impl.xml. You can override specific targets in build.xml, in this case just -init-macrodef-copylibs.

> just abandon all use of the NetBeans ant support logic and write my own ant
> script

Using your own Ant script may be best if you have specialized needs, such as being required to use an obsolete Ant release for some reason.

Or if you have a particular snapshot of the build scripts you are satisfied with, you can decide to forgo future updates and bug fixes; just revert sources to the last known good state, and delete genfiles.properties.

Or use Maven, in which case there is no need for any IDE-generated scripts to begin with.
Comment 2 Tomas Zezula 2011-06-08 09:36:06 UTC
Fixed jet-main 551594c13c85
Comment 3 Quality Engineering 2011-06-10 14:50:08 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/551594c13c85
User: Tomas Zezula <tzezula@netbeans.org>
Log: #199242:<antversion> not properly declared