maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID" <dk0...@att.com>
Subject RE: Dependency error with javadoc:aggregate, and confused about overall javadoc aggregate setup
Date Fri, 28 Oct 2016 22:44:43 GMT
> -----Original Message-----
> From: Jochum Jesko [mailto:J.Jochum@elettronica.de]
> Sent: Thursday, October 27, 2016 11:41 PM
> To: Maven Users List <users@maven.apache.org>
> Subject: AW: Dependency error with javadoc:aggregate, and confused about
> overall javadoc aggregate setup
> 
> I had some problems with the javadoc:aggregate goal myself and have
> written an e-mail concerning this topic to the issues@maven.apache.org
> list two days ago. But my problems seems different to yours, still this
> might be of use to you.
> Essentially my solution was to use the javadoc:aggregate-jar goal. Here
> is an excerpt of my parent pom to generate one aggregated javadoc in the
> parent project and individual javadocs in each module during the
> 'package' phase.

Thanks.  I incorporated some of this.  I'm still not sure exactly how some of this is working.

One thing I notice is that although the "javadoc:aggregate-jar" goal works as expected, I
find that when I just run "mvn clean install", it also runs the "aggregate-jar" task.  Considering
it's now in the "package" phase, I guess I can understand that.  What would I have to do to
make it so that this only runs when I manually run the "javadoc:aggregate-jar" goal?

For reference, what I've added to my top-level POM is the following:
-----------------
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.4</version>
				<configuration>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
				<executions>
					<execution>
						<id>module-javadoc-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<show>protected</show>
							<detectLinks>true</detectLinks>
						</configuration>
					</execution>
                    <execution>
                        <id>aggregated-documentation</id>
                        <phase>package</phase>
                        <inherited>false</inherited>
                        <goals>
                            <goal>aggregate-jar</goal>
                        </goals>
                        <configuration>
                            <show>protected</show>
                            <detectLinks>true</detectLinks>
                        </configuration>
                    </execution>
				</executions>
			</plugin>
----------------

> 
> <project ... >
> 	<modelVersion>4.0.0</modelVersion>
> 	<groupId>my-group-id</groupId>
> 	<artifactId>my-artifact-id</artifactId>
> 	<version>1.0</version>
> 	...
> 
> 	<packaging>pom</packaging>
> 	<modules>
> 		<module>module-1</module>
> 		<module>module-2</module>
> 		<module>module-3</module>
> 		...
> 	</modules>
> 
> 	<build>
> 		<plugins>
> 			...
> 
> 			<!-- Create Javadoc -->
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-javadoc-plugin</artifactId>
> 				<version>2.10.4</version>
> 				<configuration>
> 					<!-- Force Javadoc creation regardless of
> errors -->
> 					<additionalparam>-
> Xdoclint:none</additionalparam>
> 				</configuration>
> 				<executions>
> 
> 					<!-- Create a packaged javadoc for each
> module -->
> 					<execution>
> 						<id>module-javadoc-jar</id>
> 						<phase>package</phase>
> 						<goals>
> 							<goal>jar</goal>
> 						</goals>
> 						<configuration>
> 							<show>private</show>
> 							<detectLinks>true</detectLinks>
> 
> 	<excludePackageNames>*.temp.*</excludePackageNames>
> 						</configuration>
> 					</execution>
> 
> 					<!-- Create aggregated javadoc -->
> 					<execution>
> 						<id>aggregated-documentation</id>
> 						<phase>package</phase>
> 						<!-- Make sure only this 'main' parent
> project creates the aggregated
> 							javadoc, not any other children,
> which are parents to sub-modules. -->
> 						<inherited>false</inherited>
> 						<goals>
> 							<goal>aggregate-jar</goal>
> 						</goals>
> 						<configuration>
> 							<show>private</show>
> 							<detectLinks>true</detectLinks>
> 
> 	<excludePackageNames>*.temp.*</excludePackageNames>
> 						</configuration>
> 					</execution>
> 				</executions>
> 			</plugin>
> 			...
> 
> 		</plugins>
> 	</build>
> </project>
> 
> Hope I could help.
> 
> -----Urspr√ľngliche Nachricht-----
> Von: KARR, DAVID [mailto:dk068x@att.com]
> Gesendet: Donnerstag, 27. Oktober 2016 22:40
> An: users@maven.apache.org
> Betreff: Dependency error with javadoc:aggregate, and confused about
> overall javadoc aggregate setup
> 
> I have a somewhat largish multi-project build.  It's all building
> successfully right now.
> 
> I'm working on generating an aggregate Javadoc artifact.  We're not
> generating a "site".  It seems like the existing docs assume the use of
> that, so it's not completely clear how to set this up if we're not
> generating a site.  I have read the docs for the plugin, but there are
> things I don't understand.
> 
> From what I can gather, I have to have a javadoc plugin definition in
> the top-level aggregate POM, and I suppose I have to have a Javadoc
> plugin definition in each of the child POMs (there are many of them).
> 
> In the parent POM, I added a javadoc plugin spec to the "build/plugins"
> section, with "aggregate" set to true.
> 
> I also put one in the "pluginManagement/plugins" section with
> "aggregate" set to false, but I have a feeling this isn't doing
> anything.
> 
> I then ran from the top-level "mvn Javadoc:aggregate".  This gave me the
> following (elided) error:
> --------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-
> plugin:2.10.4:aggregate (default-cli) on project <toplevelproject>: An
> error has occurred in JavaDocs report generation: Missing:
> [ERROR] ----------
> [ERROR] 1) org.apache.httpcomponents:httpclient-osgi:bundle:4.5.2
> [ERROR]
> [ERROR] Try downloading the file manually from the project website.
> [ERROR]
> [ERROR] Then, install it using the command:
> [ERROR] mvn install:install-file ...
> [ERROR]
> [ERROR] Alternatively, if you host your own repository you can deploy
> the file there:
> [ERROR] mvn deploy:deploy-file ...
> [ERROR]
> [ERROR] Path to dependency:
> [ERROR] 1) <projectintree>:bundle:1.0.0-SNAPSHOT
> [ERROR] 2) org.apache.httpcomponents:httpclient-osgi:bundle:4.5.2
> [ERROR]
> [ERROR] ----------
> [ERROR] 1 required artifact is missing.
> [ERROR]
> [ERROR] for artifact:
> [ERROR] <projectintree>:bundle:1.0.0-SNAPSHOT
> [ERROR]
> [ERROR] from the specified remote repositories:
> ------------------------
> 
> Where "projectintree" is the group and artifact of one of the
> subprojects, which does in fact have a dependency on "httpclient-osgi",
> but I don't understand why it says it is missing.  The build itself is
> fine, and that artifact is in my local repo.
> 
> I'm confused about this error, but I'm also uncertain about exactly how
> I configure this Javadoc aggregation, in general.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message