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 52239 articles. 40 followers. Post

1 Replies
169 Views

Similar Articles

[PageSpeed] 46


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

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

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

How do i generate a tuple from a generator ?
Hi, I have a situation where i want a tuple from a generator/sequence comprehension. I am wondering, is this possible ? or is this just a bad idea all together? class iterator(object): __slots__ = ('__iters',) def __init__(self,*args): assert len(args) != 0 self.__iters = tuple( __builtins__.iter(arg) for arg in args ) def __iter__(self,*args): return self def next(self): return [ i.next() for i in self.__iters ] # HERE I WANT A TUPLE This can also be accomplished with a generator function, but requires while True loop. is that b...

RE: Generator not generating
Jeff Lowery wrote: > def plot_dist(self): > file =3D None; >=20 > file =3D nextFile().next() # call to generator here ^^^^^^^^^^ > I trace through this in the debugger and the call to nextFile().next() > always starts at the beginning of the function (it always returns the > first file in C:/somedir). >=20 > So what stoopid mistake am I overlooking here? I am running v2.3, BTW. You're restarting the generator every time ... Tim Delaney ...

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

Chop code generator generator
Hi there does not anyone remember the "chop" code generator generator once upon a time available from ftp://beethoven.cs.colostate.edu/pub/chop/0.6.tar.Z During 1993-1996? it was freely available from this FTP. It is also described in this paper: "Fast Code Generation Using Automatically-Generated Decision Trees", ACM SIGPLAN '90 PLDI. Does anybody have a copy of "chop"? Could you upload it somewhere? thanks in advance ...

RE: Generator not generating #2
Wow, that make sense but somehow I've managed to (ab)use generators several times like this before and (by luck) avoided the problem. For example, the previous one I wrote did file.readline(), so the generator worked because the file pointer was incremented. No such thing as a directory pointer, I guess =3D^P Thanks. Now if I can only break my bad habits... -----Original Message----- From: python-list-bounces+j.lowery=3Df5.com@python.org [mailto:python-list-bounces+j.lowery=3Df5.com@python.org] On Behalf Of Christopher T King Sent: Thursday, July 22, 2004 5:52 PM To: python-list@python....

Generator functions subclass generator?
An iterator class is a class with an __iter__ method that returns self and a __next__ method that on each call returns one not-yet-returned item of the actual or virtual collection it represents and raises StopIteration when there are no more items to return. 'Generator' (3.1 name) is one of several built-in iterator classes. A generator function is a function with keyword 'yield' in its body. Its presence results in four special behaviors. 1. When the generator function is called, it returns a generator instance inst instead of executing its body code. 2. When inst.__n...

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

When are compiler generated functions generated?
Suppose I had this class: class NonCopyable { private: NonCopyable(const NonCopyable&); NonCopyable& operator=(const NonCopyable&); }; ////////////////////////////////////////////////////////// // BigClass.h class BigClass : NonCopyable { private: typedef std::vector<Widget> VecWidget; typedef std::set<VecWidget> VecWidgetSet; typedef std::multi_map<DooDad, VecWidgetSet> OneReallyUglyMap; OneReallyUglyMap m_reallyUglyMap; }; ///////////////////////////////////////////////////////////////////////////// In my project, there are 100 .CPP fil...

what do you use for generating generating documentation?
I would like to know what people use for documentation. I am looking for something that would extract documentation strings from functions and other things and generate HTML and maybe other formats. I know of Kirschke's Inverse Literate Programming,[1] but I wonder what else has proven useful for people. Thanks, Tamas [1] http://lki-www.informatik.uni-hamburg.de/~kirschke/invlit.html -- Posted via a free Usenet account from http://www.teranews.com On Sat, 12 May 2007 11:50:00 -0400, Tamas Papp <tkpapp@gmail.com> wrote: > I would like to know what people use for documenta...

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

Problems with email.Generator.Generator
Hi All, The following piece of code is giving me issues: from email.Charset import Charset,QP from email.MIMEText import MIMEText charset = Charset('utf-8') charset.body_encoding = QP msg = MIMEText( u'Some text with chars that need encoding: \xa3', 'plain', ) msg.set_charset(charset) print msg.as_string() Under Python 2.4.2, this produces the following output, as I'd expect: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Some text with chars that need encoding: =A3 However, under Python 2.4...

Traffic generators and Packet generators
Hi I am searching for user level standalone traffic generators and packet generators for windows and linux both. I tried hping but it is not giving much higher rate. There exists several ones like D-ITG or so but I need a tool which doesnt require the receiver part. Can any one guide me. For windows; I am currently using TFGen but it is a not packet generator rather using the utilization factor in bps. Thanks ...

Signal generator / Function Generator
Hi Does anyone know of any free software that would allow a RISC OS machine to act as a (simple) signal generator for looking at simple filters on a scope? I found a python program that doesn't produce any output I suspect this line may need to be changed to the RISC OS equivalent, if there is one. audio=file('/dev/audio', 'wb') -- Jess Iyonix In article <a71c54f552.jess@itworkshop.invalid>, Jess <phantasm_39@hotmail.com> wrote: > Hi > Does anyone know of any free software that would allow a RISC OS >...

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

the best compiler generator generating c#
Could anyone suggest me an easy-to-use and reliable compiler compiler that produce c# target code? I have been trying Antlr for a long time while found antlr v2 is quite challenging to use and v3 is far from being for practical use. Antlr v3 is on its experimental stage, it does not report grammar errors, such as non-deterministic problem, and can produce wrong code. Thanks I agree, antlr v2 has issues, but when looking for a decent parser generator for my compiler i eventually felt it was the best -- that said this was a year and a half ago, so i could hope that since then someone has actua...