I am using Apache Ant to generate Javadoc for my program which has many projects (or modules). However, I want to generate Javadoc for Interfaces only, and I do not know how to check if a file is a class or interface in Ant. Someone suggested me that I should use <fileset> and specify a list of files to exclude or include. However, there are hundreds of files in my program and specifying a list of class files to exclude is impossible.
Does anyone have some ideas, please?
I don't believe this is possible unless you write your own custom ant-task, (which wouldn't be that hard actually) and reference that in your Ant-script.
Another, (much uglier) way would be to generate the complete java-doc and remove non-interface files. These could for instance be identified by looking at the allclasses-frame.html:
ComponentView
<I>Composite</I>
where you have both the type (in the title=...) and file (href=...) available.
Have you considered writing your own doclet? Instead of trying to get ant to do the work, create a doclet that knows how to discard every non-interface. Then, using the javadoc task in ant is simple.
Hope that helps.
Related
I'd really like to be able to run some Rascal's program from outside the REPL (e.g. as part of a script, or called from another program). What I'm using Rascal for is and intermediate stage in a larger framework so I am wondering what the best way to go about integrating executing the Rascal code from another program.
Right now the best way is to package your code together with the Rascal shell executable jar. There is a convenience class JavaToRascal for calling into Rascal code. Sometimes it requires some thinking to add your own modules to the Rascal search path using IRascalSearchPathContributors, but if you include a RASCAL.MF file with the right properties it all should go automatically.
If you are thinking of an Eclipse plugin, then the best way is to let your plugin depend on the rascal-eclipse plugin and use ProjectEvaluatorFactory to get access to the interpreter.
Caveat: since we are moving to a compiled system, the code you write for this kind of integration will change. This is the reason we haven't documented the API for calling Rascal from Java yet.
As I was pondering the same question, this is the (maybe trivial) answer I came up with:
java -jar /path/to/rascal-shell-stable.jar path/to/myProgram.rsc
You have to be aware that Rascal calculates module names from the current directory (don't know if it supports something like Java's CLASS_PATH), so in the above example myProgram.rsc should have a module declaration of module path::to::myProgram. Calculated and declared module name have to match.
As stated in my title, basically I'm struggling on how to go about to include required files for a Delphi program to compile. I'm experimenting with Jenkins and using the execute Windows batch command for building the Delphi program (Delphi 2006 is used). It would be nice if there is some sort of generic method to find/include the required files since including it manually defeats the point of automation. Does anyone have experience with this? Or maybe know a script or batch that can include the needed files?
Thanks in advance if anyone can help!
When you use dcc32.exe directly, be sure, that all required include paths are set correctly in dcc32.cfg (-I). See here.Another option would be to use msbuild to build your projects.
Is there anywhere that can give you a tutorial or anything on creating a Debian package using Ant?
I'm being told its already a part of Ant but I've never seen any functions even remotely associated with it.
I don't want to use ant-deb-task either seeing as its not actually part of Ant.
There is no task for this in the core Ant distribution.
There are examples for ant-deb-task available in the examples file on the download page.
Another option is jdeb which also provides documentation.
Is it possible to use ant's antlr task to do code generation with the stringtemplate library?
If not, is it better to just execute a java class from command line to code gen w/ stringtemplate?
I've found this link which is close to what I want, but I am having a hard time setting this up properly. That library is not able to see antlr for some reason. link text
It depends of the complexity of the code that you want to generate. In case of our company, we extended org.apache.tools.ant.Task with the generation logic for java code. After that, both ant task and template files were packaged in a jar file.
The team I work for manages a large collection of technical documentation which is written in LaTeX.
Currently all the documentation we have is manually built by the editors and then checked into a version control system. Sometimes people forget to compile their documents so we have a situation where the PDF and .tex files are often out of step. Unfortunately when this happens our users find themselves reading old versions of our document.
I've managed to hack a simple script to build PDFs using Make - it's rather clumsy.
I was wondering if there was a better way to do it? Most people in our department use Eclipse + Pydev for a Python project which means we are all very familiar with this IDE. I know that Ant plays nicely with Eclipse, so might we be able to use this tool for our doc building?
So what's the best way of doing this? I hope I will not have to learn everything there is to know about a new build-system in order to automate the building of some quite simple docs.
There is an external Ant task for LaTeX PDF generation, though the site is in German.
To use it, download the jar to a location on your machine, then define a taskdef as follows:
<taskdef name="latex" classname="de.dokutransdata.antlatex.LaTeX"
classpath="/path/to/ant/lib/ant_latex.jar"/>
Then to use it, define a target like this:
<target name="doLaTeX">
<latex
latexfile="${ltx2.file}"
verbose="on"
clean="on"
pdftex="off"
workingDir="${basedir}"
/>
</target>
Where ltx2.file is the file to process.
This is a link to the howto page listing the parameters. If you need any more options, my German is just about passable enough to explain, maybe.
There is also a maven plugin for LaTeX, but I can't find any documentation.
Haven't tried it, but I remember seeing a blog post about it.
If you know python, this blog post might be interesting
EDIT: Also, I would assume that you're using some kind of version control system, and I can't say for sure, but I use git to manage all my latex docs, and it might be possible to use some kind of post-commit hook to execute a script to rebuild the document. This would depend on how your repository is structured... just thinking out loud, so to speak.
I went into great detail on a large number of build systems for latex in this question, but its slightly different in your case. I think you want rubber or latexmk. The latex-makefile seems a good idea, but only supports building via postscript, which might not be your build process.
In general, its a good idea to keep generated files outside of version control for just this reason. A good exception is when specialist build tools are not widely available, and your situation sounds similar. You might do better with a commit-hook to build automatically upon commit.
I guess I should also point out that committing something without first building it and checking it is a deadly sin, so a better solution might be to stamp that out.
Maven is a better alternative as build system compared to Ant. So I would recommend a maven-plugin to generate PDF from LaTeX sources. Have a look at mathan-latex-maven-plugin