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 73990 - Make Ant module work in JNLP mode
Summary: Make Ant module work in JNLP mode
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 90485 90486
Blocks:
  Show dependency tree
 
Reported: 2006-03-25 16:18 UTC by Jesse Glick
Modified: 2006-12-02 22:37 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2006-03-25 16:18:41 UTC
Should be possible to run Ant when using the JNLP launch mode.
Comment 1 Jesse Glick 2006-03-25 16:35:47 UTC
First draft. Known issues:

1. Most ant-*.jar optional task JARs not yet included. Just need some Ant script
hacking to get them included by wildcard.

2. Tasks like (unforked) <javac> can only run if tools.jar can be found.
Currently you have to run javaws from a JDK installation for this to happen.
Tested on Linux and will probably work OK with any Sun JDK but may not work with
other JDKs; needs testing on Mac OS X in particular.

3. Currently assumes that the javaws app classloader is a URLClassLoader, and
hack to include tools.jar in the "classpath" may interact poorly with e.g. JPDA
support. Should probably be changed to use a more intelligent class loader.

4. Some file names probably need to be changed a bit to be more distinctive.

5. If you have an external module suite based on a NB platform with the patch,
and you just do e.g. Run JNLP, it will *not* work - the build will fail on the
Ant module. Rather, you need to run nbbuild/build.xml#build-jnlp to create a
platform JNLP repository, then define ${jnlp.platform.codebase} accordingly, and
this will work. The problem is that by default,
apisupport/harness/release/jnlp.xml#jnlp-generate-platform-repository is run and
this target rejects the Ant module. Not sure how you (Yarda) envisioned this
being solved in the future.

6. ${ant.home} will not be defined, so scripts relying on this will fail. In
particular, compiling against ${ant.home}/lib/ant.jar cannot work:

http://issues.apache.org/bugzilla/show_bug.cgi?id=21856

7. Miscellaneous files from Ant are not bundled, so scripts relying on e.g.
${ant.home}/etc/junit-frames.xsl will also fail. Probably these resources ought
to be bundled inside an appropriate JAR and referenced as classpath entries
instead. TBD if a change in Ant itself can fix this problem.

On the positive side, what does work:

1. Should show Ant Version etc. in settings as usual. Default Ant Home is blank
but you should be able to set it to a custom external location.

2. Tasks like <javac> work if running from a JDK and not a JRE.

3. Custom IDE tasks like <nbbrowse> work if the module is included.

Checking in ant/build.xml;
/shared/data/ccvs/repository/ant/build.xml,v  <--  build.xml
new revision: 1.112; previous revision: 1.111
done
Checking in ant/src/org/apache/tools/ant/module/AntCustomizer.java;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/AntCustomizer.java,v
 <--  AntCustomizer.java
new revision: 1.21; previous revision: 1.20
done
Checking in ant/src/org/apache/tools/ant/module/AntSettings.java;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/AntSettings.java,v
 <--  AntSettings.java
new revision: 1.40; previous revision: 1.39
done
Checking in ant/src/org/apache/tools/ant/module/bridge/AntBridge.java;
/shared/data/ccvs/repository/ant/src/org/apache/tools/ant/module/bridge/AntBridge.java,v
 <--  AntBridge.java
new revision: 1.29; previous revision: 1.28
done
Checking in ant/src-bridge/org/apache/tools/ant/module/bridge/impl/BridgeImpl.java;
/shared/data/ccvs/repository/ant/src-bridge/org/apache/tools/ant/module/bridge/impl/BridgeImpl.java,v
 <--  BridgeImpl.java
new revision: 1.33; previous revision: 1.32
done
Checking in nbbuild/build.properties;
/shared/data/ccvs/repository/nbbuild/build.properties,v  <--  build.properties
new revision: 1.378; previous revision: 1.377
done
Checking in nbbuild/antsrc/org/netbeans/nbbuild/MakeJNLP.java;
/shared/data/ccvs/repository/nbbuild/antsrc/org/netbeans/nbbuild/MakeJNLP.java,v
 <--  MakeJNLP.java
new revision: 1.15; previous revision: 1.14
done
Comment 2 Jesse Glick 2006-12-02 22:29:40 UTC
ant/build.xml 1.120 fixes #1 and #4.
Comment 3 Jesse Glick 2006-12-02 22:37:53 UTC
#5 is a general issue not limited to this module.

#6 is fixed in Ant 1.7.0, if scripts will use ${ant.core.lib}.

#2, #3, and #7 now filed separately, so marking essentially fixed.