Maven generates needless javadocs for generated classes

  • Permalink
  • submit to reddit
  • Email
  • Follow


I'm working on a multi-module project that is build with maven and run
on IBM WAS 6 server. 
We used to use a plugin made in-house for deploying to WAS back when we
used maven 2.2.1 for the builds, but I encountered some problems with
transitive dependencies when upgrading to maven 3, and found switching
to org.codehaus.mojo:was6-maven-plugin easier than trying to get the
in-house plugin to work. 
Now I have noticed that when I generate the javadocs (with
javadoc:aggregate from the multiproject directory), I end up having
javadocs for not only the classes written and maintained by ourselves,
but also for the classes generated by the deployment plugin. They just
needlessly clutter up the class list, nobody here is really interested
in the javadocs for generated classes anyway.

was6-maven-plugin generates the deployment sources in
target/generated-sources under each subproject directory and they seem
to be included in the -sourcepath option for the javadoc generation, is
there a way to leave them out and only generate from the src directory
of each project? 
Or to at least skip every source file beginning with "EJS" (those
classes are all generated by the deployment plugin)? 

The only helpful option I found in the javadoc plugin documentation at 
http://maven.apache.org/plugins/maven-javadoc-plugin/aggregate-mojo.html 
was excludePackageNames, but most of the generated classes use the same
package names as our own classes.
I have tried the -Dwas6.skip command line parameter, but it didn't help.

-- 
Jukka Lahtinen
0
Reply Jukka 2/22/2011 12:57:39 PM

See related articles to this posting

Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> writes:

> I'm working on a multi-module project that is build with maven and run
> on IBM WAS 6 server. 
> Now I have noticed that when I generate the javadocs (with
> javadoc:aggregate from the multiproject directory), I end up having
> javadocs for not only the classes written and maintained by ourselves,
> but also for the classes generated by the deployment plugin. They just
...
> was6-maven-plugin generates the deployment sources in
> target/generated-sources under each subproject directory and they seem
> to be included in the -sourcepath option for the javadoc generation, is
> there a way to leave them out and only generate from the src directory
> of each project? 

OK, I tried adding the sourcepath element to the javadoc plugin
configuration to override the maven default, and it worked. This is just
a little bit ugly, because I had to define it like 
${project.basedir}/module1/src/main/java;${project.basedir}/module2/src/main/java;...
listing the source directories for each of the 16 subprojects defined
within the modules element (represented here with "module1" and
"module2"), making the sourcepath element in the pom.xml uncomfortably
long.
I also tried
${project.basedir}/src/main/java;${project.basedir}/*/src/main/java;
but it didn't seem to work.

> Or to at least skip every source file beginning with "EJS" (those
> classes are all generated by the deployment plugin)? 

I would really prefer having some javadoc option like
-excludeclass EJS*
but the -exclude option seems to only exclude whole packages, not
classnames defined with a pattern.

-- 
Jukka Lahtinen
0
Reply Jukka 2/24/2011 7:27:00 AM
comp.lang.java.programmer 51689 articles. 37 followers. Post

1 Replies
106 Views

Similar Articles

[PageSpeed] 42

  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

javac generates bytecode using an inner class but does not generate the code for that class?
This here came up on the Soot mailing list... (see http://www.sable.mcgill.ca/pipermail/soot-list/2007-June/001238.html). It would be great if you could comment on the problem if you know of anything that could be helpful. I have a problem with inner classes, in particular the way javac generates them. Assume you have the following small Java source example: ======== public class SootProblem { public SootProblem() { if (false) { Runnable myRunnable = new Runnable() { public void run() {} ...

Dynamic generation of doc-strings of dynamically generated classes
Hi! I've asked Google, but have not found any useful information there. Situation: I have a base class, say >>> class base(object): ImportantClassAttribute = None Now, I want to dynamically generate subclasses of base. That's not a problem. However, I very much want those subclasses to have individual doc-strings. More precicely, I want that important class attribute to be reflected in the doc-string. That's the problem. The only way I've managed to accomplish that is something like the following. >>> ImportantClassAttribute = 7 >>&g...

WANTED: Serialisation code generator that generates C++ classes from XML and uses libxml2
Hello, I am trying to track down an open source code generator that will create C++ classes when given an XML schema (XSD). I would like the generated code to use libxml2 to do the XML parsing. I wonder if anyone here knows of such a generator. I could not find one in the C++ library/tools list produced by Nikki Lock. The tool needs to be cross-platform. I am using Windoze-XP with Visual Studio 2005 (please don't laugh). For portability reasons I also try to compile any new code with GCC (via cygwin). I have found XSD, which generates code that uses xercesc. This is close b...

VO2.8 SP1 : Automation Server Base Class Generation : defines not generated !
Hi VO'ers, Upgrading from VO2.7 (2740) to VO2.8 SP1 (2822), I'm faced to missing defines : After generating "Microsoft Oulook 11.0" Automation Server, The DEFINES of the selected class (in this case "_Application") are generated (in a seperated module) but NOT the ones of the "Containing objects" (Exemple : _CommandBars) ! Below the step-by-step procedure : - Tools > Automation Server.. - Select "Microsoft Oulook 11.0 Object Library" - Check - "Include description info" - "Include containing objects" ...

Generating a derived class from a base class
Hello, I have a base class with a number of pure virtual functions. I will have to write a large number of derived classes and I wish to generate the derived class definitions programmatically as containing the list of all pure virtual functions present in the base class. class Base { public: <function decl 1> <pure virtual function decl 2> ... <function decl n> private: ... }; I'd like to generate the following header file content programmatically: class Derived1 : public Base { private: <list of pure virtual functions from B...

class generator
Hi, I'm looking for a tool (preferable with a gui but thats not essential) that will generate my class header and .cxx file. i.e. I tell the tool that my class is to have attributes x,y,z, of type a, b, c etc. and it will generate the header and .cxx... i.e. essentially to save me time each time I have to add a new class to my project. I'm on windows with borland c++ builder. thanks much GrahamO bob@blah.com wrote: > I'm looking for a tool [..] > > I'm on windows with borland c++ builder. Have you tried asking in a Windows newsgroup or a Borland C++ Builder ...

Calling a local class from a run-time generated class
I'm trying to create, using the ASM library, a class which calls methods in an another class specified at run-time (passed as its Class object). I don't think my problem is ASM-related, that's why I'm asking here. My approach works just fine when the class being called is declared "public", but not if it's a local class in some member method. The local class I'm trying to call looks like this in javap: class de.enyo.pcre.PatternTest$1T extends java.lang.Object SourceFile: "PatternTest.java" InnerClass: #87= #1; //T=class de/enyo/pcre/Patte...

Swing JPanel generator from class (for class attribute editing)
Is there any tool (public domain or otherwise) that will generate JPanels or JDialogs to edit the attributes of a class? A default instance editor? I've looked at many of the GUI builders, and for the most part I think I prefer to hand code my GUI code. But it would be nice to have an initial implementation to start with -- a JTextField in the view-controller for every String in the model, a JTable for every array or ArrayList in the model, a button for every class reference variable that would open a dialog for that class, a checkbox for every boolean, etc. It seems like it would be ...

(jsp) class loader not finding generated JSP class
I hope my subject line is close enough. Assume a JSP file that calls a static function "A" on some class. "A" then goes down the stack looking for what class called it. It then tries to get a Class object for that class with forName. It works when the function is called from a class I create outside of the JSP. But when called from inside a JSP scriptlet, the className it finds on the stack is one (I assume is) genated by the compile from JSP into a Java class file, and it does not find that one. I get the ClassNotFound exception. So I guess that means the class load...