How to avoid checking parent project in maven-site-plugin?
I have small maven project. I'm trying to add generating site by maven-site-plugin, but it doesn't work. When I'm building this project i get following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project server-wms-product: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact [PARENT-PROJECT]:xml:site_en:184.108.40.206 from/to eclipse (http://maven.eclipse.org/nexus/content/repositories/testing/): Connection to http://maven.eclipse.org refused
My project is extension for other project, so in my pom.xml is set parent project which isn't mine and I can't add site configuration there.
So is there any chance to skip checking parent project's site in site generation?
My pom.xml looks like this:
<project> <parent> <artifactId>base-server-product</artifactId> <groupId>XXXXXXXXXXXx</groupId> <version>1.0</version> </parent> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.3</version> <configuration> <reportPlugins> </reportPlugins> </configuration> </plugin> </plugins> </build> </project>
And of course i have site.xml file in src/site.
I have the exact same problem, and after much googling, came across this article which solved my problem:
Basically you want to add a basic site_en.xml to /src/site/ folder in your parent pom.xml.
How to avoid checking parent project in maven-site-plugin, How to avoid checking parent project in maven-site-plugin. I have small maven project. I'm trying to add generating site by maven-site-plugin, In fact, the main problem here is the credentials issue when maven-site-plugin try to find parent descriptor in the repositories. So to avoid the problem, you can add permissions in all of the declared repositories and all will be fine. This is not my favourite option because sometimes you can’t or don’t want to change repository permissions.
Configure attaching the site descriptor to the artifacts in the parent pom.
<project> <artifactId>base-server-product</artifactId> <groupId>XXXXXXXXXXXx</groupId> <version>1.0</version> ... <build> <plugins> <plugin> <artifactId>maven-site-plugin</artifactId> <executions> <execution> <id>attach-descriptor</id> <goals> <goal>attach-descriptor</goal> </goals> </execution> </executions> </plugin> </plugins> </build> ... </project>
Core functionality has been separated from site generation in maven 3. You can find the reasons here. If you want to refer to the parent module's site from the submodule, you have to attach the site.xml to the deployed artifacts.
How to avoid checking parent project in maven-site-plugin?, I have small maven project. I'm trying to add generating site by maven-site-plugin, but it doesn't work. When I'm building this project i get following error: For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and will find supplementary information in the guide to helping with Maven.
For a reason I can't fathom, with me, it was enough to run maven in offline mode once.
Unable to locate site descriptor : maven-site-plugin problem, If you run maven-site-plugin in project with inheritance, you may be confronted to /how-to-avoid-checking-parent-project-in-maven-site-plugin. Maven Project Parent POM. This POM is the common parent of all of the Maven components in the Apache Maven project. Most of its contents are pinning down version numbers of plugins. It does provide minimal dependencyManagement for plexus-component and plugin-tools annotations.
How to avoid checking parent project in maven-site-plugin, My project is extension for other project, so in my pom.xml is set parent project which isn't mine and I can't add site configuration there. If you want to tune the way your site looks, you can use a custom skin to provide your own CSS styles. If that is still not enough, you can even tweak the output templates that Maven uses to generate the site documentation. You can visit the Skins site to have a look at some of the skins that you can use to change the look of your site.
Apache Maven Site Plugin – Multi-module Sites, When running mvn site on a top level project, Maven will build all in the parent pom, and turn inheritance off to avoid the aggregate report to The top level pom has an unrelated build-config project and a app-parent for the modules of the multimodule project. The app-parent uses extension to link itself to the build-config project and obtain resources from it. This is used to carry common config files to the modules. It may be a conduit for properties as well.
Maven – POM Reference - Apache Maven, It is a one-stop-shop for all things concerning the project. For example, by configuring the maven-antrun-plugin , one can embed Apache Ant tasks inside of the POM. be explicitly defined if they are inherited from a parent - more on inheritance Maven does not check the repositories for the project, but instead checks to And I use mvn clean install site to build the project, run the tests and generate a site (which uses maven site plugin, which in turn uses maven surefire report plugin, to generate test report). The trouble is the parent pom.xml is executed with all phases (clean, install and site) before submodules' pom.xml are executed, hence no test report
- I would assume your problem is located based on this:
Connection to http://maven.eclipse.org refused.
- No, this error with maven.eclipse.org is shown only that maven searched my repository and didn't found parent project's site.xml (because it doesn't exist and never will be). After that maven is trying to lookup in other repositories. But it doesn't have any sense. Real issue is that in my project maven should't try to search partent's site.xml because it doesn't exits.
- I came across this error today. The solution was to remove a dummy <scm><url>...</url></scm> entry which was copy pasted in the parent pom. It seems like maven site uses this url in a way when generating the site for the children. (This may help future reader, but I know it does not really answer the question as in that case @daprog has no access to the parent pom)
- Thanks for your help, it worked for me after small changes - i had to add this file as PARENTPOM-VERSION-site_en.xml in my local repo.
- This answer does not work for me. Although I was able to eventually resolve the parent POM's (empty) site_en.xml, I'm now stuck because the plugin is trying to resolve the site descriptor for the grandparent POM, which I don't control. I just want to generate a site without having to consult parent POMs.
- Same thing happened to me... It seems to be looking for the parent descriptor in the remote repos before trying the local m2!