OK,
I think I understand what happens.
The following line of the build.xml file:
<includesfile name="${build}/${module}.javafiles"/>
Makes sure only the files defined in the .javafiles file end up being part
of the jar.
The listing in the .javafiles file is generated by the @cdk.module
annotation at the beginning of every class definition.
Interesting mechanism. Took me a day to figure out. J
Regards,
Nick
From: Nick Vandewiele [mailto:[email protected]]
Sent: Wednesday, July 24, 2013 5:45 PM
To: 'Joos Kiener'
Cc: [email protected]
Subject: Re: [Cdk-user] ant dist-large after adding custom classes to cdk?
Hi Joos,
Thanks for your answer.
I understand the use of cdk as a dependency to other projects. But assume
that I created classes whose function should be part of CDK and not of a
custom project.
One example is the SMILES parser that is notoriously bad at keeping track of
unpaired electrons. I created a custom class that took of care of this and
is called from SMILESParser. Or think of adding new atom types in
CDKAtomTypeMatcher. Or adding isotope info to atomcontainers parsed using
the InchIParser, etc.
These aforementioned pieces of code run fine from within my development
environment (ic: Eclipse). But once I decide I want to have my project as a
production release, I want to call cdk from a single jar, thus my calling
"ant dist-large". That's where the shit hits the fan. Any thoughts on this?
Regards,
Nick
From: Joos Kiener [mailto:[email protected]]
Sent: Wednesday, July 24, 2013 4:40 PM
To: Nick Vandewiele
Cc: [email protected]
Subject: Re: [Cdk-user] ant dist-large after adding custom classes to cdk?
Hi Nick,
no you don't need to do that. I suggest you remove everything you put into
the cdk folder again and just build it normally. You then use CDK as a
dependency in your own project. There is no need to only have one jar. You
can have as many as you want but the must all be on the classpath:
http://en.wikipedia.org/wiki/Classpath_%28Java%29
Your jar file then must only have a classpath entry in its manifest file
pointing to the cdk dependency (usually in folder lib):
http://en.wikipedia.org/wiki/Classpath_%28Java%29#Setting_the_path_in_a_Mani
fest_file
I suggest you use an IDE like netbeans as it makes this stuff a lot easier.
Best Regards,
Joos
Am 24.07.2013 14:51, schrieb Nick Vandewiele:
Hi,
I wanted to build a single jar file of the CDK using "ant dist-large"
defined in build.xml. It fails with messages such as
./cdk/build/src/extra/org/openscience/cdk/qsar/descriptors/molecular/DoubleB
ondsDescriptor.java:11: cannot find symbol: class IMolecularDescriptor
I think the reason why it failed is because I created some classes (eg
custom made molecular descriptors, vide supra) and just put them in the cdk
folder structure where I thought they belonged to. However, the build file
apparently looks into the build folder and then runs into trouble.
Any thoughts on how to make sure that custom made classes don't result in
build fails? The documentation wasn't that helpful for this matter.
Thanks in advance,
Nick
----------------------------------------------------------------------------
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831
<http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> &iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user