Skip to content

Instantly share code, notes, and snippets.

@phaus
Created September 11, 2012 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phaus/3698327 to your computer and use it in GitHub Desktop.
Save phaus/3698327 to your computer and use it in GitHub Desktop.
osxappbundle-maven-plugin svn r17490 to GitHub 460a0545f932f1050bdc6489be8d7b3ae9806bf5 DIFF
Index: src/main/resources/org/codehaus/mojo/osxappbundle/Info.plist.template
===================================================================
--- src/main/resources/org/codehaus/mojo/osxappbundle/Info.plist.template (Revision 17490)
+++ src/main/resources/org/codehaus/mojo/osxappbundle/Info.plist.template (Arbeitskopie)
@@ -26,6 +26,8 @@
<string>${mainClass}</string>
<key>JVMVersion</key>
<string>${jvmVersion}</string>
+ <key>WorkingDirectory</key>
+ <string>${workingDirectory}</string>
<key>ClassPath</key>
${classpath}
#if($vmOptions)
Index: src/main/java/org/codehaus/mojo/osxappbundle/encoding/DefaultEncodingDetector.java
===================================================================
--- src/main/java/org/codehaus/mojo/osxappbundle/encoding/DefaultEncodingDetector.java (Revision 17490)
+++ src/main/java/org/codehaus/mojo/osxappbundle/encoding/DefaultEncodingDetector.java (Arbeitskopie)
@@ -34,7 +34,7 @@
private Pattern pattern = Pattern.compile( "<?(xml|XML).*encoding=\"(.*)\""); //.*encoding=\"(.*)\"" );
- private static final String DEFAULT_ENCODING = "utf-8";
+ private static final String DEFAULT_ENCODING = "UTF-8";
public String detectXmlEncoding( InputStream inputStream )
{
@@ -42,11 +42,11 @@
try
{
- reader = new InputStreamReader( inputStream, "utf-8" );
+ reader = new InputStreamReader( inputStream, DEFAULT_ENCODING);
}
catch ( UnsupportedEncodingException e )
{
- throw new IllegalStateException( "utf not supported encoding", e );
+ throw new IllegalStateException( "encoding not supported: " + DEFAULT_ENCODING);
}
char[] buffer = new char[1000];
Index: src/main/java/org/codehaus/mojo/osxappbundle/CreateApplicationBundleMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/osxappbundle/CreateApplicationBundleMojo.java (Revision 17490)
+++ src/main/java/org/codehaus/mojo/osxappbundle/CreateApplicationBundleMojo.java (Arbeitskopie)
@@ -15,8 +15,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
@@ -38,6 +36,7 @@
import org.codehaus.mojo.osxappbundle.encoding.DefaultEncodingDetector;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.StringWriter;
import java.io.ByteArrayInputStream;
@@ -47,8 +46,6 @@
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import java.util.Map;
-import java.util.Properties;
import java.util.Set;
import java.util.Arrays;
@@ -59,15 +56,12 @@
* @phase package
* @requiresDependencyResolution runtime
*/
-public class CreateApplicationBundleMojo
- extends AbstractMojo
-{
+public class CreateApplicationBundleMojo extends AbstractMojo {
/**
* Default includes - everything is included.
*/
private static final String[] DEFAULT_INCLUDES = {"**/**"};
-
/**
* The Maven Project Object
*
@@ -75,29 +69,24 @@
* @readonly
*/
private MavenProject project;
-
/**
* The directory where the application bundle will be created
*
* @parameter default-value="${project.build.directory}/${project.build.finalName}";
*/
private File buildDirectory;
-
/**
* The location of the generated disk image file
*
* @parameter default-value="${project.build.directory}/${project.build.finalName}.dmg"
*/
private File diskImageFile;
-
-
/**
* The location of the Java Application Stub
*
* @parameter default-value="/System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
*/
private File javaApplicationStub;
-
/**
* The main class to execute when double-clicking the Application Bundle
*
@@ -105,7 +94,6 @@
* @required
*/
private String mainClass;
-
/**
* The name of the Bundle. This is the name that is given to the application bundle;
* and it is also what will show up in the application menu, dock etc.
@@ -114,36 +102,37 @@
* @required
*/
private String bundleName;
-
-
/**
+ * The path to the working directory. This can be inside or outside the app bundle. To
+ * define a working directory <b>inside</b> the app bundle, use e.g. <code>$JAVAROOT</code>.
+ *
+ * @parameter default-value="$APP_PACKAGE"
+ */
+ private String workingDirectory;
+ /**
* The icon file for the bundle
*
* @parameter
*/
private File iconFile;
-
/**
* The version of the project. Will be used as the value of the CFBundleVersion key.
*
* @parameter default-value="${project.version}"
*/
private String version;
-
/**
* A value for the JVMVersion key.
*
* @parameter default-value="1.4+"
*/
private String jvmVersion;
-
/**
* The location of the produced Zip file containing the bundle.
*
* @parameter default-value="${project.build.directory}/${project.build.finalName}-app.zip"
*/
private File zipFile;
-
/**
* Paths to be put on the classpath in addition to the projects dependencies.
* Might be useful to specifiy locations of dependencies in the provided scope that are not distributed with
@@ -153,24 +142,35 @@
* @parameter
*/
private List additionalClasspath;
-
/**
- * Additional resources (as a list of FileSet objects) that will be copies into
+ * Additionals (as a list of FileSet objects) that will be copies into
* the build directory and included in the .dmg and zip files alongside with the
* application bundle.
*
* @parameter
*/
private List additionalResources;
-
/**
+ * Additional resources (as a list of FileSet objects) that will be copies into
+ * application bundles Contents/Resources Folder.
+ *
+ * @parameter
+ */
+ private List additionalArchiveFiles;
+ /**
+ * Additional files to bundle inside the Resources/Java directory and include on
+ * the classpath. These could include additional JARs or JNI libraries.
+ *
+ * @parameter
+ */
+ private List additionalBundledClasspathResources;
+ /**
* Velocity Component.
*
* @component
* @readonly
*/
private VelocityComponent velocity;
-
/**
* The location of the template for Info.plist.
* Classpath is checked before the file system.
@@ -178,15 +178,12 @@
* @parameter default-value="org/codehaus/mojo/osxappbundle/Info.plist.template"
*/
private String dictionaryFile;
-
/**
* Options to the JVM, will be used as the value of VMOptions in Info.plist.
*
* @parameter
*/
private String vmOptions;
-
-
/**
* The Zip archiver.
*
@@ -194,7 +191,6 @@
* @readonly
*/
private MavenProjectHelper projectHelper;
-
/**
* The Zip archiver.
*
@@ -203,7 +199,6 @@
* @readonly
*/
private ZipArchiver zipArchiver;
-
/**
* If this is set to <code>true</code>, the generated DMG file will be internet-enabled.
* The default is ${false}
@@ -211,174 +206,146 @@
* @parameter default-value="false"
*/
private boolean internetEnable;
-
/**
- * Comma separated list of ArtifactIds to exclude from the dependency copy.
- * @parameter default-value=""
+ * The path to the SetFile tool.
*/
- private Set excludeArtifactIds;
-
- /**
- * The path to the SetFile tool when installed manually.
- */
private static final String SET_FILE_PATH = "/Developer/Tools/SetFile";
/**
- * The path to the SetFile tool when installed using the App Store.
- */
- private static final String ALT_SET_FILE_PATH = "/Applications/Xcode.app/Contents/Developer/Tools/SetFile";
-
-
- /**
* Bundle project as a Mac OS X application bundle.
*
* @throws MojoExecutionException If an unexpected error occurs during packaging of the bundle.
*/
- public void execute()
- throws MojoExecutionException
- {
+ public void execute() throws MojoExecutionException {
// Set up and create directories
buildDirectory.mkdirs();
- File bundleDir = new File( buildDirectory, cleanBundleName(bundleName) + ".app" );
+ File bundleDir = new File(buildDirectory, bundleName + ".app");
bundleDir.mkdirs();
- File contentsDir = new File( bundleDir, "Contents" );
+ File contentsDir = new File(bundleDir, "Contents");
contentsDir.mkdirs();
- File resourcesDir = new File( contentsDir, "Resources" );
+ File resourcesDir = new File(contentsDir, "Resources");
resourcesDir.mkdirs();
- File javaDirectory = new File( resourcesDir, "Java" );
+ File javaDirectory = new File(resourcesDir, "Java");
javaDirectory.mkdirs();
- File macOSDirectory = new File( contentsDir, "MacOS" );
+ File macOSDirectory = new File(contentsDir, "MacOS");
macOSDirectory.mkdirs();
// Copy in the native java application stub
- File stub = new File( macOSDirectory, javaApplicationStub.getName() );
- if(! javaApplicationStub.exists()) {
+ File stub = new File(macOSDirectory, javaApplicationStub.getName());
+ if (!javaApplicationStub.exists()) {
String message = "Can't find JavaApplicationStub binary. File does not exist: " + javaApplicationStub;
- if(! isOsX() ) {
+ if (!isOsX()) {
message += "\nNOTICE: You are running the osxappbundle plugin on a non OS X platform. To make this work you need to copy the JavaApplicationStub binary into your source tree. Then configure it with the 'javaApplicationStub' configuration property.\nOn an OS X machine, the JavaApplicationStub is typically located under /System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources/MacOS/JavaApplicationStub";
}
- throw new MojoExecutionException( message);
-
+ throw new MojoExecutionException(message);
+
} else {
- try
- {
- FileUtils.copyFile( javaApplicationStub, stub );
- }
- catch ( IOException e )
- {
+ try {
+ FileUtils.copyFile(javaApplicationStub, stub);
+ } catch (IOException e) {
throw new MojoExecutionException(
- "Could not copy file " + javaApplicationStub + " to directory " + macOSDirectory, e );
+ "Could not copy file " + javaApplicationStub + " to directory " + macOSDirectory, e);
}
}
// Copy icon file to the bundle if specified
- if ( iconFile != null )
- {
- try
- {
- FileUtils.copyFileToDirectory( iconFile, resourcesDir );
+ if (iconFile != null) {
+ try {
+ FileUtils.copyFileToDirectory(iconFile, resourcesDir);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Error copying file " + iconFile + " to " + resourcesDir, e);
}
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error copying file " + iconFile + " to " + resourcesDir, e );
- }
}
+ if (vmOptions != null) {
+ getLog().info("vmOptions: " + vmOptions);
+ }
+
+ if (workingDirectory != null) {
+ getLog().info("workingDirecotry: " + workingDirectory);
+ }
// Resolve and copy in all dependecies from the pom
- List files = copyDependencies( javaDirectory );
+ List files = copyDependencies(javaDirectory);
+ getLog().info("Checking for additionalBundledClasspathResources: " + additionalResources);
+ if (additionalResources != null && !additionalResources.isEmpty()) {
+ copyResources(resourcesDir, additionalResources);
+ }
+
+ getLog().info("Checking for additionalBundledClasspathResources: " + additionalBundledClasspathResources);
+ if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {
+ files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, "lib", additionalBundledClasspathResources));
+ }
+
// Create and write the Info.plist file
- File infoPlist = new File( bundleDir, "Contents/Info.plist" );
- writeInfoPlist( infoPlist, files );
+ File infoPlist = new File(bundleDir, "Contents/Info.plist");
+ writeInfoPlist(infoPlist, files);
// Copy specified additional resources into the top level directory
- if (additionalResources != null && !additionalResources.isEmpty())
- {
- copyResources( additionalResources );
+ if (additionalArchiveFiles != null && !additionalArchiveFiles.isEmpty()) {
+ copyResources(buildDirectory, additionalArchiveFiles);
}
- if ( isOsX() )
- {
+ if (isOsX()) {
// Make the stub executable
Commandline chmod = new Commandline();
- try
- {
- chmod.setExecutable( "chmod" );
- chmod.createArgument().setValue( "755" );
- chmod.createArgument().setValue( stub.getAbsolutePath() );
+ try {
+ chmod.setExecutable("chmod");
+ chmod.createArgument().setValue("755");
+ chmod.createArgument().setValue(stub.getAbsolutePath());
chmod.execute();
+ } catch (CommandLineException e) {
+ throw new MojoExecutionException("Error executing " + chmod + " ", e);
}
- catch ( CommandLineException e )
- {
- throw new MojoExecutionException( "Error executing " + chmod + " ", e );
- }
- String setFilePath = SET_FILE_PATH;
- if ( !new File( setFilePath ).exists() )
- {
- setFilePath = ALT_SET_FILE_PATH;
- }
-
// This makes sure that the .app dir is actually registered as an application bundle
- if ( new File( setFilePath ).exists() )
- {
+ if (new File(SET_FILE_PATH).exists()) {
Commandline setFile = new Commandline();
- try
- {
- setFile.setExecutable( setFilePath );
- setFile.createArgument().setValue( "-a" );
- setFile.createArgument().setValue( "B" );
- setFile.createArgument().setValue( bundleDir.getAbsolutePath() );
+ try {
+ setFile.setExecutable(SET_FILE_PATH);
+ setFile.createArgument().setValue("-a");
+ setFile.createArgument().setValue("B");
+ setFile.createArgument().setValue(bundleDir.getAbsolutePath());
setFile.execute();
+ } catch (CommandLineException e) {
+ throw new MojoExecutionException("Error executing " + setFile, e);
}
- catch ( CommandLineException e )
- {
- throw new MojoExecutionException( "Error executing " + setFile, e );
- }
+ } else {
+ getLog().warn("Could not set 'Has Bundle' attribute. " + SET_FILE_PATH + " not found, is Developer Tools installed?");
}
- else
- {
- getLog().warn( "Could not set 'Has Bundle' attribute. " + setFilePath + " not found, is Xcode installed?" );
- }
// Create a .dmg file of the app
Commandline dmg = new Commandline();
- try
- {
- dmg.setExecutable( "hdiutil" );
- dmg.createArgument().setValue( "create" );
- dmg.createArgument().setValue( "-srcfolder" );
- dmg.createArgument().setValue( buildDirectory.getAbsolutePath() );
- dmg.createArgument().setValue( diskImageFile.getAbsolutePath() );
- try
- {
+ try {
+ dmg.setExecutable("hdiutil");
+ dmg.createArgument().setValue("create");
+ dmg.createArgument().setValue("-srcfolder");
+ dmg.createArgument().setValue(buildDirectory.getAbsolutePath());
+ dmg.createArgument().setValue(diskImageFile.getAbsolutePath());
+ try {
dmg.execute().waitFor();
+ } catch (InterruptedException e) {
+ throw new MojoExecutionException("Thread was interrupted while creating DMG " + diskImageFile, e);
}
- catch ( InterruptedException e )
- {
- throw new MojoExecutionException( "Thread was interrupted while creating DMG " + diskImageFile, e );
- }
+ } catch (CommandLineException e) {
+ throw new MojoExecutionException("Error creating disk image " + diskImageFile, e);
}
- catch ( CommandLineException e )
- {
- throw new MojoExecutionException( "Error creating disk image " + diskImageFile, e );
- }
- if(internetEnable) {
+ if (internetEnable) {
try {
Commandline internetEnable = new Commandline();
internetEnable.setExecutable("hdiutil");
- internetEnable.createArgument().setValue("internet-enable" );
+ internetEnable.createArgument().setValue("internet-enable");
internetEnable.createArgument().setValue("-yes");
internetEnable.createArgument().setValue(diskImageFile.getAbsolutePath());
@@ -390,39 +357,33 @@
projectHelper.attachArtifact(project, "dmg", null, diskImageFile);
}
- zipArchiver.setDestFile( zipFile );
- try
- {
- String[] stubPattern = {buildDirectory.getName() + "/" + bundleDir.getName() +"/Contents/MacOS/"
- + javaApplicationStub.getName()};
+ zipArchiver.setDestFile(zipFile);
+ try {
+ String[] stubPattern = {buildDirectory.getName() + "/" + bundleDir.getName() + "/Contents/MacOS/"
+ + javaApplicationStub.getName()};
- zipArchiver.addDirectory( buildDirectory.getParentFile(), new String[]{buildDirectory.getName() + "/**"},
+ zipArchiver.addDirectory(buildDirectory.getParentFile(), new String[]{buildDirectory.getName() + "/**"},
stubPattern);
DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( buildDirectory.getParentFile() );
- scanner.setIncludes( stubPattern);
+ scanner.setBasedir(buildDirectory.getParentFile());
+ scanner.setIncludes(stubPattern);
scanner.scan();
String[] stubs = scanner.getIncludedFiles();
- for ( int i = 0; i < stubs.length; i++ )
- {
+ for (int i = 0; i < stubs.length; i++) {
String s = stubs[i];
- zipArchiver.addFile( new File( buildDirectory.getParentFile(), s ), s, 0755 );
+ zipArchiver.addFile(new File(buildDirectory.getParentFile(), s), s, 0755);
}
zipArchiver.createArchive();
projectHelper.attachArtifact(project, "zip", null, zipFile);
+ } catch (ArchiverException e) {
+ throw new MojoExecutionException("Could not create zip archive of application bundle in " + zipFile, e);
+ } catch (IOException e) {
+ throw new MojoExecutionException("IOException creating zip archive of application bundle in " + zipFile,
+ e);
}
- catch ( ArchiverException e )
- {
- throw new MojoExecutionException( "Could not create zip archive of application bundle in " + zipFile, e );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "IOException creating zip archive of application bundle in " + zipFile,
- e );
- }
}
@@ -437,9 +398,8 @@
return bundleName.replace(':', '-');
}
- private boolean isOsX()
- {
- return System.getProperty( "mrj.version" ) != null;
+ private boolean isOsX() {
+ return System.getProperty("mrj.version") != null;
}
/**
@@ -449,9 +409,7 @@
* @return A list of file names added
* @throws MojoExecutionException
*/
- private List copyDependencies( File javaDirectory )
- throws MojoExecutionException
- {
+ private List copyDependencies(File javaDirectory) throws MojoExecutionException {
ArtifactRepositoryLayout layout = new DefaultRepositoryLayout();
@@ -462,173 +420,181 @@
// First, copy the project's own artifact
File artifactFile = project.getArtifact().getFile();
+ list.add(repoDirectory.getName() + "/" + layout.pathOf(project.getArtifact()));
- // Pom modules have no artifact file
- if(artifactFile != null) {
- list.add( repoDirectory.getName() +"/" +layout.pathOf(project.getArtifact()));
-
- try
- {
- FileUtils.copyFile( artifactFile, new File(repoDirectory, layout.pathOf(project.getArtifact())) );
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not copy artifact file " + artifactFile + " to " + javaDirectory );
- }
+ try {
+ FileUtils.copyFile(artifactFile, new File(repoDirectory, layout.pathOf(project.getArtifact())));
+ } catch (IOException e) {
+ throw new MojoExecutionException("Could not copy artifact file " + artifactFile + " to " + javaDirectory);
}
Set artifacts = project.getArtifacts();
Iterator i = artifacts.iterator();
- while ( i.hasNext() )
- {
+ while (i.hasNext()) {
Artifact artifact = (Artifact) i.next();
-
- String artifactId = artifact.getArtifactId();
- if (excludeArtifactIds != null && excludeArtifactIds.contains(artifactId))
- {
- getLog().info( "Skipping excluded artifact: " + artifact.toString() );
- continue;
- }
File file = artifact.getFile();
File dest = new File(repoDirectory, layout.pathOf(artifact));
- getLog().debug( "Adding " + file );
+ getLog().debug("Adding " + file);
- try
- {
- FileUtils.copyFile( file, dest);
+ try {
+ FileUtils.copyFile(file, dest);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Error copying file " + file + " into " + javaDirectory, e);
}
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error copying file " + file + " into " + javaDirectory, e );
- }
- list.add( repoDirectory.getName() +"/" + layout.pathOf(artifact) );
+ list.add(repoDirectory.getName() + "/" + layout.pathOf(artifact));
}
return list;
+ }
+ /**
+ * Copy additional dependencies into the $JAVAROOT directory.
+ * @param javaDirectory
+ * @param targetDirectoryName The directory within $JAVAROOT that these resources will be copied to
+ * @param additionalBundledClasspathResources
+ * @return A list of file names added
+ * @throws MojoExecutionException
+ */
+ private List/*<String>*/ copyAdditionalBundledClasspathResources(File javaDirectory, String targetDirectoryName, List/*<FileSet>*/ additionalBundledClasspathResources) throws MojoExecutionException {
+ // Create the destination directory
+ File destinationDirectory = new File(javaDirectory, targetDirectoryName);
+ destinationDirectory.mkdirs();
+
+ List addedFilenames = copyResources(destinationDirectory, additionalBundledClasspathResources);
+
+ return addPath(addedFilenames, targetDirectoryName);
}
/**
+ * Modifies a String list of filenames to include an additional path.
+ * @param filenames
+ * @param additionalPath
+ * @return
+ */
+ private List addPath(List filenames, String additionalPath) {
+ ArrayList newFilenames = new ArrayList(filenames.size());
+ for (int i = 0; i < filenames.size(); i++) {
+ newFilenames.add(additionalPath + '/' + filenames.get(i));
+ }
+ return newFilenames;
+ }
+
+ /**
* Writes an Info.plist file describing this bundle.
*
* @param infoPlist The file to write Info.plist contents to
* @param files A list of file names of the jar files to add in $JAVAROOT
* @throws MojoExecutionException
*/
- private void writeInfoPlist( File infoPlist, List files )
- throws MojoExecutionException
- {
+ private void writeInfoPlist(File infoPlist, List files)
+ throws MojoExecutionException {
VelocityContext velocityContext = new VelocityContext();
- velocityContext.put( "mainClass", mainClass );
- velocityContext.put( "cfBundleExecutable", javaApplicationStub.getName());
- velocityContext.put( "vmOptions", vmOptions);
- velocityContext.put( "bundleName", cleanBundleName(bundleName) );
+ velocityContext.put("mainClass", mainClass);
+ velocityContext.put("cfBundleExecutable", javaApplicationStub.getName());
+ velocityContext.put("vmOptions", vmOptions);
+ velocityContext.put("bundleName", cleanBundleName(bundleName));
+ velocityContext.put("workingDirectory", workingDirectory);
- velocityContext.put( "iconFile", iconFile == null ? "GenericJavaApp.icns" : iconFile.getName() );
+ velocityContext.put("iconFile", iconFile == null ? "GenericJavaApp.icns" : iconFile.getName());
- velocityContext.put( "version", version );
+ velocityContext.put("version", version);
- velocityContext.put( "jvmVersion", jvmVersion );
+ velocityContext.put("jvmVersion", jvmVersion);
- addMavenPropertiesToVelocity( velocityContext );
-
StringBuffer jarFilesBuffer = new StringBuffer();
- jarFilesBuffer.append( "<array>" );
- for ( int i = 0; i < files.size(); i++ )
- {
- String name = (String) files.get( i );
- jarFilesBuffer.append( "<string>" );
- jarFilesBuffer.append( "$JAVAROOT/" ).append( name );
- jarFilesBuffer.append( "</string>" );
+ jarFilesBuffer.append("<array>");
+ for (int i = 0; i < files.size(); i++) {
+ String name = (String) files.get(i);
+ jarFilesBuffer.append("<string>");
+ jarFilesBuffer.append("$JAVAROOT/").append(name);
+ jarFilesBuffer.append("</string>");
}
- if ( additionalClasspath != null )
- {
- for ( int i = 0; i < additionalClasspath.size(); i++ )
- {
- String pathElement = (String) additionalClasspath.get( i );
- jarFilesBuffer.append( "<string>" );
- jarFilesBuffer.append( pathElement );
- jarFilesBuffer.append( "</string>" );
+ if (additionalClasspath != null) {
+ for (int i = 0; i < additionalClasspath.size(); i++) {
+ String pathElement = (String) additionalClasspath.get(i);
+ jarFilesBuffer.append("<string>");
+ jarFilesBuffer.append(pathElement);
+ jarFilesBuffer.append("</string>");
}
}
- jarFilesBuffer.append( "</array>" );
+ jarFilesBuffer.append("</array>");
- velocityContext.put( "classpath", jarFilesBuffer.toString() );
+ velocityContext.put("classpath", jarFilesBuffer.toString());
- try
- {
+ try {
String encoding = detectEncoding(dictionaryFile, velocityContext);
- getLog().debug( "Detected encoding " + encoding + " for dictionary file " +dictionaryFile );
+ getLog().debug("Detected encoding " + encoding + " for dictionary file " + dictionaryFile);
- Writer writer = new OutputStreamWriter( new FileOutputStream(infoPlist), encoding );
+ Writer writer = new OutputStreamWriter(new FileOutputStream(infoPlist), encoding);
- velocity.getEngine().mergeTemplate( dictionaryFile, encoding, velocityContext, writer );
+ velocity.getEngine().mergeTemplate(dictionaryFile, encoding, velocityContext, writer);
writer.close();
- }
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Could not write Info.plist to file " + infoPlist, e );
- }
- catch ( ParseErrorException e )
- {
- throw new MojoExecutionException( "Error parsing " + dictionaryFile, e );
- }
- catch ( ResourceNotFoundException e )
- {
- throw new MojoExecutionException( "Could not find resource for template " + dictionaryFile, e );
- }
- catch ( MethodInvocationException e )
- {
+ } catch (IOException e) {
+ throw new MojoExecutionException("Could not write Info.plist to file " + infoPlist, e);
+ } catch (ParseErrorException e) {
+ throw new MojoExecutionException("Error parsing " + dictionaryFile, e);
+ } catch (ResourceNotFoundException e) {
+ throw new MojoExecutionException("Could not find resource for template " + dictionaryFile, e);
+ } catch (MethodInvocationException e) {
throw new MojoExecutionException(
- "MethodInvocationException occured merging Info.plist template " + dictionaryFile, e );
+ "MethodInvocationException occured merging Info.plist template " + dictionaryFile, e);
+ } catch (Exception e) {
+ throw new MojoExecutionException("Exception occured merging Info.plist template " + dictionaryFile, e);
}
- catch ( Exception e )
- {
- throw new MojoExecutionException( "Exception occured merging Info.plist template " + dictionaryFile, e );
- }
}
- private void addMavenPropertiesToVelocity( VelocityContext velocityContext )
- {
- Properties mavenProps = project.getProperties();
- Iterator propertyIterator = mavenProps.entrySet().iterator();
+ private String detectEncoding(String dictionaryFile, VelocityContext velocityContext)
+ throws Exception {
+ StringWriter sw = new StringWriter();
+ velocity.getEngine().mergeTemplate(dictionaryFile, "utf-8", velocityContext, sw);
+ return new DefaultEncodingDetector().detectXmlEncoding(new ByteArrayInputStream(sw.toString().getBytes("utf-8")));
+ }
- while ( propertyIterator.hasNext() )
- {
- Map.Entry propertyEntry = (Map.Entry) propertyIterator.next();
- String key = (String) propertyEntry.getKey();
- String value = (String) propertyEntry.getValue();
- if ( key.indexOf( "password" ) >= 0 || key.indexOf( "passphrase" ) >= 0 )
- {
- // we do not like to export sensible data!
- continue;
- }
+ /**
+ * Scan a fileset and get a list of files which it contains.
+ * @param fileset
+ * @return list of files contained within a fileset.
+ * @throws FileNotFoundException
+ */
+ private List/*<String>*/ scanFileSet(File sourceDirectory, FileSet fileSet) {
+ final String[] emptyStrArray = {};
- velocityContext.put( "maven." + key, value );
+ DirectoryScanner scanner = new DirectoryScanner();
+
+ scanner.setBasedir(sourceDirectory);
+ if (fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty()) {
+ scanner.setIncludes((String[]) fileSet.getIncludes().toArray(emptyStrArray));
+ } else {
+ scanner.setIncludes(DEFAULT_INCLUDES);
}
- }
+ if (fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty()) {
+ scanner.setExcludes((String[]) fileSet.getExcludes().toArray(emptyStrArray));
+ }
- private String detectEncoding( String dictionaryFile, VelocityContext velocityContext )
- throws Exception
- {
- StringWriter sw = new StringWriter();
- velocity.getEngine().mergeTemplate( dictionaryFile, "utf-8", velocityContext, sw );
- return new DefaultEncodingDetector().detectXmlEncoding( new ByteArrayInputStream(sw.toString().getBytes( "utf-8" )) );
+ if (fileSet.isUseDefaultExcludes()) {
+ scanner.addDefaultExcludes();
+ }
+
+ scanner.scan();
+
+ List/*<String>*/ includedFiles = Arrays.asList(scanner.getIncludedFiles());
+
+ return includedFiles;
}
/**
@@ -637,77 +603,44 @@
* @param fileSets A list of FileSet objects that represent additional resources to copy.
* @throws MojoExecutionException In case af a resource copying error.
*/
- private void copyResources( List fileSets )
- throws MojoExecutionException
- {
- final String[] emptyStrArray = {};
-
- for ( Iterator it = fileSets.iterator(); it.hasNext(); )
- {
+ private List/*<String>*/ copyResources(File targetDirectory, List/*<FileSet>*/ fileSets) throws MojoExecutionException {
+ ArrayList/*<String>*/ addedFiles = new ArrayList/*<String>*/();
+ for (Iterator it = fileSets.iterator(); it.hasNext();) {
FileSet fileSet = (FileSet) it.next();
- File resourceDirectory = new File( fileSet.getDirectory() );
- if ( !resourceDirectory.isAbsolute() )
- {
- resourceDirectory = new File( project.getBasedir(), resourceDirectory.getPath() );
+ // Get the absolute base directory for the FileSet
+ File sourceDirectory = new File(fileSet.getDirectory());
+ if (!sourceDirectory.isAbsolute()) {
+ sourceDirectory = new File(project.getBasedir(), sourceDirectory.getPath());
}
-
- if ( !resourceDirectory.exists() )
- {
- getLog().info( "Additional resource directory does not exist: " + resourceDirectory );
+ if (!sourceDirectory.exists()) {
+ // If the requested directory does not exist, log it and carry on
+ // TODO re-instate the logging that was here previously
+ getLog().warn(sourceDirectory.getAbsolutePath() + " does not exists!");
continue;
}
- DirectoryScanner scanner = new DirectoryScanner();
+ List includedFiles = scanFileSet(sourceDirectory, fileSet);
+ addedFiles.addAll(includedFiles);
- scanner.setBasedir( resourceDirectory );
- if ( fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty() )
- {
- scanner.setIncludes( (String[]) fileSet.getIncludes().toArray( emptyStrArray ) );
- }
- else
- {
- scanner.setIncludes( DEFAULT_INCLUDES );
- }
+ getLog().info("Copying " + includedFiles.size() + " additional files"
+ + (includedFiles.size() > 1 ? "s" : ""));
- if ( fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty() )
- {
- scanner.setExcludes( (String[]) fileSet.getExcludes().toArray( emptyStrArray ) );
- }
-
- if (fileSet.isUseDefaultExcludes())
- {
- scanner.addDefaultExcludes();
- }
-
- scanner.scan();
-
- List includedFiles = Arrays.asList( scanner.getIncludedFiles() );
-
- getLog().info( "Copying " + includedFiles.size() + " additional resource"
- + ( includedFiles.size() > 1 ? "s" : "" ) );
-
- for ( Iterator j = includedFiles.iterator(); j.hasNext(); )
- {
+ for (Iterator j = includedFiles.iterator(); j.hasNext();) {
String destination = (String) j.next();
- File source = new File( resourceDirectory, destination );
- File destinationFile = new File( buildDirectory, destination );
+ File source = new File(sourceDirectory, destination);
+ File destinationFile = new File(targetDirectory, destination);
- if ( !destinationFile.getParentFile().exists() )
- {
- destinationFile.getParentFile().mkdirs();
- }
+ // Make sure that the directory we are copying into exists
+ destinationFile.getParentFile().mkdirs();
- try
- {
+ try {
FileUtils.copyFile(source, destinationFile);
+ } catch (IOException e) {
+ throw new MojoExecutionException("Error copying additional files " + source, e);
}
- catch ( IOException e )
- {
- throw new MojoExecutionException( "Error copying additional resource " + source, e );
- }
}
}
+ return addedFiles;
}
-
}
Index: src/site/apt/examples/additional-resources.apt
===================================================================
--- src/site/apt/examples/additional-resources.apt (Revision 17490)
+++ src/site/apt/examples/additional-resources.apt (Arbeitskopie)
@@ -2,7 +2,7 @@
Sometimes it's convenient to add files to your DMG and ZIP distribution alongside the Application Bundle.
- Example shows how to add a README.txt files to your distribution by using the "additionalResources" configuration option.
+ Example shows how to add a README.txt files to your distribution by using the "additionalArchiveFiles" configuration option.
@@ -14,17 +14,75 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
- <additionalResources>
+ <additionalArchiveFiles>
<fileSet>
- <directory>${basedir}/src/main/app-resources</directory>
+ <directory>${basedir}/src/main/resources</directory>
<includes>
<include>README.txt</include>
</includes>
</fileSet>
+ </additionalArchiveFiles>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>bundle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ ...
+ </plugins>
+ <build>
+ ...
+ </project>
++------------------------------------------+
+
+
+Adding non-Java Resources to your App Bundle
+
+ Sometimes you need to add more Resources to your App Bundle, then just Jars (e.g. NIB Files or native dylibs).
+ You can do that with using the following tags, "additionalResources" and "additionalBundledClasspathResources"
+
++------------------------------------------+
+ <project>
+ ...
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>osxappbundle-maven-plugin</artifactId>
+ <version>1.0-alpha-1</version>
+ <configuration>
+ <mainClass>com.example.Main</mainClass>
+ <!-- Adding additional Resources (like NIBs) -->
+ <additionalResources>
+ <fileSet>
+ <directory>${basedir}/xcode</directory>
+ <includes>
+ <include>*.lproj/**</include>
+ </includes>
+ </fileSet>
</additionalResources>
+ <!-- Adding Native Java Libs -->
+ <additionalBundledClasspathResources>
+ <fileSet>
+ <directory>${basedir}/src/main/lib</directory>
+ <includes>
+ <include>libjnidispatch.dylib</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>${basedir}/target</directory>
+ <includes>
+ <include>librococoa.dylib</include>
+ </includes>
+ </fileSet>
+ </additionalBundledClasspathResources>
</configuration>
<executions>
<execution>
@@ -41,3 +99,4 @@
...
</project>
+------------------------------------------+
+
Index: src/site/apt/examples/custom-icon.apt
===================================================================
--- src/site/apt/examples/custom-icon.apt (Revision 17490)
+++ src/site/apt/examples/custom-icon.apt (Arbeitskopie)
@@ -19,7 +19,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
<iconFile>${basedir}/src/main/app-resources/myapplication.icns</iconFile>
Index: src/site/apt/examples/jvmversion.apt
===================================================================
--- src/site/apt/examples/jvmversion.apt (Revision 17490)
+++ src/site/apt/examples/jvmversion.apt (Arbeitskopie)
@@ -19,7 +19,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
<jvmVersion>1.5+</jvmVersion>
Index: src/site/apt/examples/systempaths.apt
===================================================================
--- src/site/apt/examples/systempaths.apt (Revision 17490)
+++ src/site/apt/examples/systempaths.apt (Arbeitskopie)
@@ -12,7 +12,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
<additionalClasspath>
Index: src/site/apt/examples/simple.apt
===================================================================
--- src/site/apt/examples/simple.apt (Revision 17490)
+++ src/site/apt/examples/simple.apt (Arbeitskopie)
@@ -14,7 +14,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
</configuration>
Index: src/site/apt/examples/custom-dictionary.apt
===================================================================
--- src/site/apt/examples/custom-dictionary.apt (Revision 17490)
+++ src/site/apt/examples/custom-dictionary.apt (Arbeitskopie)
@@ -17,7 +17,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
<dictionaryFile>${basedir}/src/main/app-resources/Info.plist</dictionaryFile>
@@ -38,17 +38,16 @@
</project>
+------------------------------------------+
- Your custom dictionary may contain any of the following variables::
+ Your custom dictionary may contain the following variables:
----------------------------------
-${bundleName} (As defined in your POM. Default is the Maven name in your POM)
-${mainClass} (Your mainClass defined in the plugin configuration of your POM)
-${iconFile} (As defined in your POM. Defaults to a generic Application Icon)
-${classpath} (An <array> containing all you classpath entries, used as the value of the ClassPath key)
-${jvmVersion} (As defined in your POM. Defaults to 1.4+)
-${version} (The project version as defined in your POM.)
-${vmOptions} (As defined in your POM.)
-${cfBundleExecutable} (The final part of your configuration for <javaApplicationStub>. Defaults to JavaApplicationStub)
+${bundleName} (As defined in your POM. Default is the Maven name in your POM)
+${mainClass} (Your mainClass defined in the plugin configuration of your POM)
+${iconFile} (As defined in your POM. Defaults to a generic Application Icon)
+${classpath} (An <array> containing all you classpath entries, used as the value of the ClassPath key)
+${workingDirectory} (The Default Working Dir of your java App.)
+${vmOptions} (additional VMOptions)
+
----------------------------------
Info.plist example
@@ -63,7 +62,7 @@
<key>CFBundleName</key>
<string>${bundleName}</string>
<key>CFBundleVersion</key>
- <string>${version}</string>
+ <string>10.2</string>
<key>CFBundleAllowMixedLocalizations</key>
<string>true</string>
<key>CFBundleExecutable</key>
@@ -83,11 +82,11 @@
<key>MainClass</key>
<string>${mainClass}</string>
<key>JVMVersion</key>
- <string>${jvmVersion}</string>
+ <string>1.4+</string>
<key>ClassPath</key>
${classpath}
<key>VMOptions</key>
- <string>${vmOptions}</string>
+ <string>-Xmx512m -Xms128m</string>
<key>Properties</key>
<dict>
<key>apple.laf.useScreenMenuBar</key>
Index: src/site/apt/examples/crossplatform.apt
===================================================================
--- src/site/apt/examples/crossplatform.apt (Revision 17490)
+++ src/site/apt/examples/crossplatform.apt (Arbeitskopie)
@@ -14,7 +14,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>osxappbundle-maven-plugin</artifactId>
- <version>1.0-alpha-4</version>
+ <version>1.0-alpha-1</version>
<configuration>
<mainClass>com.example.Main</mainClass>
<javaApplicationStub>${basedir}/src/main/app-resources/JavaApplicationStub</javaApplicationStub>
Index: pom.xml
===================================================================
--- pom.xml (Revision 17490)
+++ pom.xml (Arbeitskopie)
@@ -1,135 +1,151 @@
-<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>
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
+ <parent>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>mojo</artifactId>
+ <version>17</version>
+ </parent>
+
+ <artifactId>osxappbundle-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
- <artifactId>mojo</artifactId>
- <version>17</version>
- </parent>
+ <packaging>maven-plugin</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <inceptionYear>2007</inceptionYear>
+ <name>Maven OS X Application Bundle Plugin</name>
+ <description>A Maven Plugin for generating Mac OS X Application Bundles of Java applications and packaging them as a DMG disk image.
+ This fork created specially for Frontline
+ </description>
+ <url>http://mojo.codehaus.org/osxappbundle-maven-plugin/</url>
+ <prerequisites>
+ <maven>2.0.4</maven>
+ </prerequisites>
- <artifactId>osxappbundle-maven-plugin</artifactId>
- <packaging>maven-plugin</packaging>
- <version>1.0-alpha-4-SNAPSHOT</version>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- <distribution>repo</distribution>
- </license>
- </licenses>
- <inceptionYear>2007</inceptionYear>
- <name>Maven OS X Application Bundle Plugin</name>
- <description>A Maven Plugin for generating Mac OS X Application Bundles of Java applications and packaging them as a
- DMG disk image.</description>
- <url>http://mojo.codehaus.org/osxappbundle-maven-plugin/</url>
- <prerequisites>
- <maven>2.0.4</maven>
- </prerequisites>
+ <scm>
+ </scm>
- <scm>
- <connection>scm:svn:http://svn.codehaus.org/mojo/trunk/mojo/osxappbundle-maven-plugin</connection>
- <developerConnection>scm:svn:https://svn.codehaus.org/mojo/trunk/mojo/osxappbundle-maven-plugin</developerConnection>
- <url>http://fisheye.codehaus.org/browse/mojo/trunk/mojo/osxappbundle-maven-plugin</url>
- </scm>
-
- <developers>
- <developer>
- <id>eirik</id>
- <name>Eirik Bjorsnos</name>
- <email>eirbjo at gmail com</email>
- </developer>
- </developers>
+ <developers>
+ <developer>
+ <id>eirik</id>
+ <name>Eirik Bjorsnos</name>
+ <email>eirbjo at gmail com</email>
+ </developer>
+ </developers>
- <contributors>
- <contributor>
- <name>Max Berger</name>
- <email>max at berger dot name</email>
- </contributor>
- </contributors>
+ <contributors>
+ <contributor>
+ <name>Max Berger</name>
+ <email>max at berger dot name</email>
+ </contributor>
+ <contributor>
+ <name>Philipp Haussleiter</name>
+ <email>philipp at haussleiter dot de</email>
+ </contributor>
+ </contributors>
- <dependencies>
+
+ <build>
+ <!-- for building with maven 3 -->
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh</artifactId>
+ <version>1.0-beta-7</version>
+ </extension>
+ </extensions>
+ </build>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-velocity</artifactId>
- <version>1.1.3</version>
- </dependency>
-
- <dependency>
- <groupId>velocity</groupId>
- <artifactId>velocity-dep</artifactId>
- <version>1.4</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-artifact</artifactId>
- <version>2.0</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-project</artifactId>
- <version>2.0</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- <version>2.0</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-archiver</artifactId>
- <version>1.0-alpha-7</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>1.0.4</version>
- <scope>compile</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.2</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-changes-plugin</artifactId>
- <configuration>
- <issueLinkTemplate>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-velocity</artifactId>
+ <version>1.1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>velocity</groupId>
+ <artifactId>velocity-dep</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact</artifactId>
+ <version>2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>2.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ <version>1.0-alpha-7</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>1.0.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-changes-plugin</artifactId>
+ <configuration>
+ <issueLinkTemplate>
%URL%/%ISSUE%
- </issueLinkTemplate>
- </configuration>
- <reportSets>
- <reportSet>
- <reports>
- <report>changes-report</report>
- </reports>
- </reportSet>
- </reportSets>
- </plugin>
- </plugins>
- </reporting>
+ </issueLinkTemplate>
+ </configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>changes-report</report>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment