Skip to content

Commit

Permalink
[DOXIASITETOOLS-231] Upgrade Plexus Utils to 3.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Jun 24, 2021
1 parent 47094ea commit 9566aba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Expand Up @@ -111,7 +111,6 @@
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.Os;
import org.codehaus.plexus.util.PathTool;
import org.codehaus.plexus.util.PropertyUtils;
import org.codehaus.plexus.util.ReaderFactory;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.WriterFactory;
Expand Down Expand Up @@ -574,19 +573,23 @@ protected Context createDocumentVelocityContext( RenderingContext renderingConte
// doxiaSiteRendererVersion
InputStream inputStream = this.getClass().getResourceAsStream( "/META-INF/"
+ "maven/org.apache.maven.doxia/doxia-site-renderer/pom.properties" );
Properties properties = PropertyUtils.loadProperties( inputStream );
if ( inputStream == null )
{
getLogger().debug( "pom.properties for doxia-site-renderer could not be found." );
}
else if ( properties == null )
{
getLogger().debug( "Failed to load pom.properties, so doxiaVersion is not available"
+ " in the Velocity context." );
}
else
{
context.put( "doxiaSiteRendererVersion", properties.getProperty( "version" ) );
Properties properties = new Properties();
try ( InputStream in = inputStream )
{
properties.load( in );
context.put( "doxiaSiteRendererVersion", properties.getProperty( "version" ) );
}
catch ( IOException e )
{
getLogger().debug( "Failed to load pom.properties, so doxiaVersion is not available"
+ " in the Velocity context." );
}
}

// Add user properties
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -173,7 +173,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.22</version>
<version>3.3.0</version>
</dependency>
<!-- misc -->
<dependency>
Expand Down

0 comments on commit 9566aba

Please sign in to comment.