Hi all,
I've just submitted PR#172 ([1]). This is a PR that patches maven
sources and builds an external binary to compile against. I'd like to
explain what I've done and I'm requesting your opinion.
- What I've done:
1.- I indicated that I wanted to download sources from Maven. I did this
by adding to the external/binaries-list the following line:
6B72432EA1C5296783007365BB7C9A6B39DFB730
xml-resolver:xml-resolver:1.2:sources
By doing so the build script will automatically download
external/xml-resolver-1.2-sources.jar for me (thanks, guys!).
2.- I created a patch file external/xml-resolver-1.2-netbeans.patch
against the Maven sources. Note this is not against the tar.gz file you
can find elsewhere, but against Maven sources explicitly. (see [2])
3.- I modified the "build.xml" file of the module (see [3]) hooking in
the projectized-common.-javac-init ant task task. The hook:
3.1.- Checks if the external/resolver-1.2.jar file exists.
3.2.- If the file does not exist then:
3.2.1.- Unzips the maven sources.
3.2.2.- Applies the patch.
3.2.3.- Compiles the result.
3.2.4.- Builds the external/resolver-1.2.jar file.
- What I'm requesting
The thing seems to work well (cross fingers for travis results). And has
the added benefit of not modifying the "nbbuild/" directory. So all this
keeps inside the module.
I'd like to request your opinion on the approach. Is it a good idea to
modify the build.xml script? Is "-javac-init" the proper task to hook into?
Thanks,
Antonio
[1] https://github.com/apache/incubator-netbeans/pull/172
[2]
The patch
https://github.com/vieiro/incubator-netbeans/blob/netbeans-54-module-review-o.apache.xml.resolver/o.apache.xml.resolver/external/xml-resolver-1.2-netbeans.patch
[3]
The modified build.xml
https://github.com/vieiro/incubator-netbeans/blob/netbeans-54-module-review-o.apache.xml.resolver/o.apache.xml.resolver/build.xml
|