Maven site hosted on Jenkins

1,055 views
Skip to first unread message

David V

unread,
Feb 22, 2013, 8:29:47 PM2/22/13
to jenkins...@googlegroups.com
Is there a way to have Jenkins host a Maven site, much like the way that the Javadoc plugin works? With the Javadoc plugin, I can view the latest Javadoc of a job directly from its main page. I am interested in a similar feature for Maven sites.

Thanks,
David

Stephen Connolly

unread,
Feb 23, 2013, 3:07:39 AM2/23/13
to jenkins...@googlegroups.com


On Saturday, 23 February 2013, David V wrote:
Is there a way to have Jenkins host a Maven site, much like the way that the Javadoc plugin works? With the Javadoc plugin, I can view the latest Javadoc of a job directly from its main page. I am interested in a similar feature for Maven sites.

The HTML publisher plugin could capture the content for you.

You'd need to tweak the /project/url to match the Jenkins job otherwise some of the links will be broken (probably override with a system property that activates a profile which overrides the url so that the model is valid without the system property defined - or use a pom property to set a default...)

You may need to fake out one or two other steps also.


Thanks,
David

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jesse Farinacci

unread,
Feb 23, 2013, 10:13:49 AM2/23/13
to jenkins...@googlegroups.com
Greetings,

On Sat, Feb 23, 2013 at 3:07 AM, Stephen Connolly
<stephen.al...@gmail.com> wrote:
> On Saturday, 23 February 2013, David V wrote:
>> Is there a way to have Jenkins host a Maven site, much like the way that
>> the Javadoc plugin works? With the Javadoc plugin, I can view the latest
>> Javadoc of a job directly from its main page. I am interested in a similar
>> feature for Maven sites.
>
> The HTML publisher plugin could capture the content for you.
> You'd need to tweak the /project/url to match the Jenkins job otherwise some
> of the links will be broken (probably override with a system property that
> activates a profile which overrides the url so that the model is valid
> without the system property defined - or use a pom property to set a
> default...)
> You may need to fake out one or two other steps also.

Or you could just be less Maven job type adverse, and simply run the
site phase. Jenkins will make the site available at
$JENKINS/job/$JOB/site without any additional work.

-Jesse

--
There are 10 types of people in this world, those
that can read binary and those that can not.

David V

unread,
Feb 23, 2013, 2:32:40 PM2/23/13
to jenkins...@googlegroups.com
That is what I would like to do.
It almost seems to work.
The logs reports:
[JENKINS] Archiving site from /Users/Shared/Jenkins/Home/workspace/Java Test/target/site to /var/lib/jenkins/jobs/Java Test/site

Which makes me think that the Jenkins job is aware of the site.

But then I receive a number of errors, starting with:
message : Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site) on project test: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact groupId:parent-pom:xml:site_en:1 from/to my-repository

This causes the build to fail.
Afterward, the Jenkins job page has a link for a "Maven-generated site", but I receive a 404 when following that link. The URL of the link matches the pattern you described.

I am using a Maven job type. Here is my "goals and options" line:
clean deploy javadoc:javadoc site

Thanks.
David

Jesse Farinacci

unread,
Feb 23, 2013, 6:17:51 PM2/23/13
to jenkins...@googlegroups.com
Greetings,

On Sat, Feb 23, 2013 at 2:32 PM, David V <dven...@allogy.com> wrote:
> message : Failed to execute goal
> org.apache.maven.plugins:maven-site-plugin:3.0:site (default-site) on
> project test: SiteToolException: The site descriptor cannot be resolved from
> the repository: ArtifactResolutionException: Unable to locate site
> descriptor: Could not transfer artifact groupId:parent-pom:xml:site_en:1
> from/to my-repository

That's a Maven configuration problem. Make sure you can run these
goals successfully on your local machine first.

> This causes the build to fail.
> Afterward, the Jenkins job page has a link for a "Maven-generated site", but
> I receive a 404 when following that link. The URL of the link matches the
> pattern you described.

That might be a bug with Jenkins, that there is no actual site
archived. But.. it would be very minor.

Ilko

unread,
Feb 26, 2013, 3:23:08 AM2/26/13
to jenkins...@googlegroups.com
Hi,

I've run in similar problems and found there is an issue in Jira. Here the link to my original post with reference to the issue:

https://groups.google.com/d/topic/jenkinsci-users/0MCof-NrzCE/discussion

If you find some direct working solution beside of "Archive artifacts" I'll be glad if you share it here.

TIA
Reply all
Reply to author
Forward
0 new messages