Given the following project directory structure placing the source artifacts from the sample Hello World project on the Google Chrome Extensions developer web site into the src/main/chrome sub-directory:
HelloWorld +- pom.xml +- src | +- main | +- chrome | +- manifest.json | +- icon.png | +- popup.html | +- popup.json +- target +- HelloWorld-1.0.0-SNAPSHOT.crx
Create the following pom.xml in the root folder of the project:
<project> ... <groupId>com.btmatthews.crx</groupId> <artifactId>HelloWord</artifactId> <version>1.0.0-SNAPSHOT</version> ... <build> <plugins> ... <plugin> <groupId>com.btmatthews.maven.plugins</groupId> <artifactId>crx-maven-plugin</artifactId> <version>1.2.1</version> </plugin> ... </plugins> </build> ... </project>
Then executing mvn crx:crx will produce HelloWorld-1.0.0-SNAPSHOT.crx in the target folder.
mvn -DcrxPEMFile=~/crx.pem -DcrxPEMPassword=SparkleAndFade crx:crx