Skip to content

Commit

Permalink
[MPIR-478] Allow to save avatars images for team report during projec…
Browse files Browse the repository at this point in the history
…t build
  • Loading branch information
slawekjaranowski committed Feb 23, 2025
1 parent 3a991e2 commit e51cef8
Show file tree
Hide file tree
Showing 10 changed files with 543 additions and 73 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ under the License.
</parent>

<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.8.1-SNAPSHOT</version>
<version>3.9.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>

<name>Apache Maven Project Info Reports Plugin</name>
Expand Down Expand Up @@ -123,7 +123,7 @@ under the License.
<sitePluginVersion>3.21.0</sitePluginVersion>
<fluidoSkinVersion>2.0.1</fluidoSkinVersion>
<checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
<project.build.outputTimestamp>2024-10-18T09:42:43Z</project.build.outputTimestamp>
<project.build.outputTimestamp>2025-02-19T22:31:07Z</project.build.outputTimestamp>
</properties>

<dependencies>
Expand Down
82 changes: 82 additions & 0 deletions src/it/team-local-avatars/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.apache.maven.plugins.project-info-reports</groupId>
<artifactId>team-local-avatars</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<developers>
<developer>
<id>one-id</id>
<name>one-name</name>
<email>[email protected]</email>
</developer>
<developer>
<id>two-id</id>
<name>two-name</name>
</developer>
<developer>
<id>three-id</id>
<name>three-name</name>
<email>[email protected]</email>
</developer>
</developers>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</build>

<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<externalAvatarImages>false</externalAvatarImages>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>team</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
26 changes: 26 additions & 0 deletions src/it/team-local-avatars/verify.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

def team = new File( basedir, 'target/site/team.html' ).text

assert team.count('<figure><img src="avatars/90cc13b765c79d2d55ca64388ea2bc5f.jpg" /></figure>') == 1
assert team.count('<figure><img src="avatars/00000000000000000000000000000000.jpg" /></figure>') == 2

assert new File(basedir, 'target/site/avatars/90cc13b765c79d2d55ca64388ea2bc5f.jpg').exists()
assert new File(basedir, 'target/site/avatars/00000000000000000000000000000000.jpg').exists()
Loading

0 comments on commit e51cef8

Please sign in to comment.