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 51818 articles. 38 followers. Post

1 Replies
122 Views

Similar Articles

[PageSpeed] 14


  • 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 ...

FYI InnerBuilder, an IntelliJ IDEA plugin that adds a 'Builder' action to the Generate menu (Alt+Insert) which generates an inner builder class as described in Effective Java
https://github.com/analytically/innerbuilder IntelliJ IDEA plugin that adds a 'Builder' action to the Generate menu (Alt+Insert) which generates an inner builder class as described in Effective Java. Works with IntelliJ IDEA 12.x and 13.x. Enjoy! ...

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...

generating DIMLApp.class and MLApp.class from mlapp.tlb
I'm trying to build up communication between a JAVA interface and MATLAB engine for sending and retrieving data via ActiveX protocol. What was known is a couple of JAVA classes-DIMLApp.class and MLApp.class can be generated through mlapp.tlb file but practically I still havent found a way to generate and import these classes into a SDK tool (i.e. Eclipse which is the tool I'm now using). So what do I need to do to proceed the generation and importation procedure to my JAVA code. Any help would be appreciated. Jason ...

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...

Compiler-generated or class implemented base class destructor ?
Hi in Item 6 of his book Effective C++, Scott Meyers displays a class named "Uncopyable", which is aimed to be privately inherited by any class you wish not to be copyable. Here is the class. I include it in an small example program of mine : ============================== #include <iostream> class Uncopyable { protected: Uncopyable() {} ~Uncopyable() {} private: Uncopyable(const Uncopyable&); Uncopyable& operator=(const Uncopyable&); }; class A: private Uncopyable { public: A(int it): i(it) {} int i; }; main () { A a(...

Is it possible for me to get the class file of dynamically generated proxy class?
I come to the proxy class when I am debugging my application, but Ican't get into it. Is is possible for me to get the class file ofdynamically generated proxy class so that I can decompile and dig intoit?In my memory, we can write any class in classpath into a file. But Iforget how to do it. On Aug 19, 3:45 am, billdavi...@gmail.com wrote:> I come to the proxy class when I am debugging my application, but I> can't get into it. Is is possible for me to get the class file of> dynamically generated proxy class so that I can decompile and dig into> it?>> In my memory, we...

class templated ctor generates copy ctor for the class. Is this a bug?
struct foo { foo() {} #if !0 template<class V> foo(V &v) { v.dummy(); } #elif 0 template<class V> foo(const V &v) { v.dummy(); } #elif 0 template<class V> foo(const V v) { v.dummy(); } #elif 0 template<class V> foo(V v) { v.dummy(); } #endif }; int main() { foo f; foo v(f); // <-- this line const foo cf; foo w(cf); const foo x(cf); return 0; } What happens here is that foo v(f) seems to pick the non-ifdeffed line in foo as a copy ctor instead of generating default ones for the class and picking those ones. Is this a a bug in...

Re: Compiler-generated or class implemented base class destructor ?
On Tuesday, April 5, 2011 5:21:19 PM UTC-4, ptyxs wrote: > My question is just this : why should the destructor of Uncopyable be > class implemented ? Why not compiler-generated ? Uncopyable is meant to be instantiated only as a subobject of derived classes. The default constructor and destructor are therefore defined with protected access. The compiler-generated versions would be public, allowing dubious code: Uncopyable dubious; -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do thi...

Re: Compiler-generated or class implemented base class destructor ? #2
On Thursday, April 7, 2011 7:37:43 PM UTC-4, ptyxs wrote: > Le 06/04/2011 21:43, Jeffrey Schwab a �crit : > > > > On Tuesday, April 5, 2011 5:21:19 PM UTC-4, ptyxs wrote: > > > >> My question is just this : why should the destructor of Uncopyable be > >> class implemented ? Why not compiler-generated ? > > The compiler-generated versions would be public, allowing > > dubious code: > > > > Uncopyable dubious; > I am not sure I understand your last (interrupted ?) line though. That line should be rejected by ...

Why Eclipse FreeUML generated class diagram is so spread out, taking a lot of space between classes?
Hi,I have installed FreeUML Eclipse plugin and etc, in order to generate the UML class diagram. It indeed generated the class diagram. But the picture is so loosely spread out. A lot of extra spaces between each class block. A long, long, long line connecting each class block, with a simple word "import" next to it. This makes it very hard to see on the computer screen, very hard to see on the printed out hard-copy.The positions of each class is fixed. I cannot grab them to new locations. www wrote:...>I have installed FreeUML Eclipse ..I recommend same advice as for this thread.....

Generator not generating
Hi, Although I'm no Python expert, I have written generators in the past that have worked like a charm. Don't know why this one doesn't: **** class App: """ A simple Tk application that plots random lines """ def __init__(self, master): # create the main frame frame =3D Frame(master) frame.pack() # create a canvas within the frame self.canvas =3D Canvas(frame, width=3D400, height=3D400) self.canvas.pack(side=3DTOP) # create a button below the canvas and within the frame ...

IllegalAccessError in generated class
I'm currently working on a project using BCEL to instrument classes as they are loaded. I'm running into the following exception (stack trace at the bottom of this post): Exception in thread "main" java.lang.IllegalAccessError: class sun.reflect.GeneratedSerializationConstructorAccessor1 cannot access its superclass sun.reflect.SerializationConstructorAccessorImpl This error seems totally bizzare to me, since it looks like MethodAccessGenerator is generating a bogus class. Some googling around finds other people who have had this problem when using programs li...

Generating methods in a class
Dear All, I have a class the looks something like this: class file: def __init__(self): pass def file2ps(self): return 'ps' def file2jpg(self): return 'jpg' def file2gif(self): return 'gif' etc What is a quick way of generating all these methods? I'm thinking along the lines of: class file: formats=['ps', 'ps2', 'hpgl', 'pcl', 'mif', 'pic', 'gd', 'gd2', 'gif', 'jpg'] def __init__(self): for frmt in self.format...

RDoc and generated classes
I've got a set of about 26 classes that are all very similar, and I'm using a loop (containing _n_ lines of code) in some C code to create them (instead of using 26*n lines of code). Naturally, RDoc can't parse those definitions out, but I'd like them documented. For now, I'm doing something like this: #ifdef DONT_DEFINE___RDOC_PURPOSES_ONLY x = rb_define_class_under( MyModule, "Class1", ParentClass ) x = rb_define_class_under( MyModule, "Class2", ParentClass ) ... x = rb_define_class_under( MyModule, "Class26", Pare...

Dynamically generating classes?
Hi, In Python I can do this: >>> def create_class(name): ... import new ... c = new.classobj(name, tuple([object]), {}) ... def __init__(self, value): ... self.value = value ... setattr(c, "__init__", new.instancemethod(__init__, None, c)) ... return c ... >>> MyClass = create_class("MyClass") >>> >>> obj = MyClass(value=10) >>> print obj.value 10 Is there anything similar in Ruby? Or do I need to use eval()? --Jonas Galvez On Wed, 28 Sep 2005, Jonas Galvez wrote: > Hi, > > In P...

HTML generated by JavaDoc
JavaDoc uses URLs like this: file://localhost/J:/Program%20Files/java/jdk1.5.0_05/docs/api/java/io/PrintWriter.html#printf(java.lang.String, java.lang.Object...) note the space after String, Isn't that a bug? 1. HTML validator complains about it. 2. when I replace the space with %20, Opera and IE don't go to the right place. Netscape, Mozilla and Firefox do. 3. Only alphanumeric characters and dashes are permitted in anchors, so the dots, commas ( etc are all illegal. 3. even the space encoded with %20 is illegal. -- Canadian Mind Products, Roedy Green. http://mindprod.com Ja...

skeleton javadoc generation
I have 140 classes that need javadocing. What tools can insert the common bits, do the @param @return @throws from the sigs and maybe go through after and add stuff like <code> tags to class references? TIA -- Mike W On Mon, 10 Apr 2006 15:49:03 GMT, "VisionSet" <spam@ntlworld.com> wrote, quoted or indirectly quoted someone who said : >I have 140 classes that need javadocing. >What tools can insert the common bits, do the @param @return @throws from >the sigs and maybe go through after and add stuff like <code> tags to class >references? Eclipse i...