Skip to content

This is a little maven plugin for generating images automatically. It can consume the pom information to automatically inject things like your version string into the image.

Notifications You must be signed in to change notification settings

eciramella/imagegen-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

This is a simple maven plugin for automatically generating images for use in your java projects.

Have you ever needed to generate a splash screen image for an installer?

Do you want to pull maven related tidbits into an image (version number for example)?

Then this is the plugin for you!

This can generate both single color and two-tone, gradient images.

Need a drop shadow? We have that too!

There is a ton of documentation within the poms, but here's a quick plugin configuration listing that will generate a single color image.

The BEST way to figure this plugin out (there are many knobs and dials) is to just clone the repo and run:

mvn site

and read the resulting documentation target/site/index.html.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>imagegen-maven-plugin</artifactId>
    <version>${project.version}</version>
    <executions>
         <execution>
             <id>generateImage</id>
             <phase>generate-sources</phase>
             <goals>
                 <goal>generate</goal>
             </goals>
             <configuration>
                <gradient>false</gradient>
                <type>png</type>
                <height>1000</height>
                <width>1000</width>
                <colorSolid>
                    <r>0</r>
                    <g>189</g>
                    <b>255</b>
                </colorSolid>
                
                <!-- OPTIONAL
                <copyright>
                    <x>10</x>
                    <y>20</y>
                    <text>2011 Foo, LLC.</text>
                    <font>Monospaced.bolditalic</font>
                    <fontsize>20</fontsize> -->
		    <!-- OPTIONAL set to true if you'd like a drop shadow behind your image. -->
                    <!-- <shadow>false</shadow> --> 
                    <!-- OPTIONAL text will default to black if this is omitted. -->
                    <!-- <color>0,0,0</color> --> 
                <!--
                </copyright>
                -->
                
                <!-- OPTIONAL
                <textFields>
                    <textField>
                        <x>100</x>
                        <y>250</y>
                        <text>Hello Image!</text>
                        <font>Arial Narrow</font>
                        <fontsize>20</fontsize> -->
                        <!-- OPTIONAL set to true if you'd like a drop shadow behind your image. -->
                        <!-- <shadow>false</shadow> -->
                        <!-- OPTIONAL text will default to black if this is omitted. -->
                        <!-- <color>0,0,0</color> --> 
                     <!--   
                    </textField>
                </textFields>
                -->
                <!-- OPTIONAL
                <imageOverlays>
                    <imageOverlay>
                        <x>100</x>
                        <y>800</y>
                        <imagePath>/path/to/the/image/you/need.jpg</imagePath>
                        -->
                        <!-- OPTIONAL set to true if you'd like a drop shadow behind your image. -->
                        <!--- <shadow>false</shadow> --> 
                        <!-- OPTIONAL what you'd like to divide your image height and width by to reduce it. -->
                        <!-- <scaling>2</scaling> --> 
                        <!--
                    </imageOverlay>
                </imageOverlays>
                -->
             </configuration>
         </execution>
    </executions>
</plugin>

About

This is a little maven plugin for generating images automatically. It can consume the pom information to automatically inject things like your version string into the image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages