jonson/android-stringreplacer — pull request #1 by justinmuller (2013-12-19 21:54:26+00:00)
Title: Force creation of intermediate directories in the dest path.

When running `mvn -X clean install` I am seeing an exception:

```
[ERROR] Failed to execute goal com.dajodi.android:android-stringreplacer-maven-plugin:1.1:replace (default) on project project: error iterating files: /path/to/project/target/filtered-res/values/config.xml (No such file or directory) -> [Help 1]
```

This is occurring because the `values` directory does not yet exist. The odd thing is that this is occurring on one project, but not another, and I have not been able to explain this difference away.

This PR forces the `values` directory to be created.

Full stacktrace:
```
INFO] --- android-stringreplacer-maven-plugin:1.1:replace (default) @ project ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=0, ConflictMarker.markTime=0, ConflictMarker.nodeCount=22, ConflictIdSorter.graphTime=0, ConflictIdSorter.topsortTime=0, ConflictIdSorter.conflictIdCount=12, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=1, ConflictResolver.conflictItemCount=22, DefaultDependencyCollector.collectTime=16, DefaultDependencyCollector.transformTime=1}
[DEBUG] com.dajodi.android:android-stringreplacer-maven-plugin:jar:1.1:
[DEBUG] org.apache.maven:maven-plugin-api:jar:2.0:compile
[DEBUG] org.apache.maven:maven-project:jar:2.0:compile
[DEBUG] org.apache.maven:maven-profile:jar:2.0:compile
[DEBUG] org.apache.maven:maven-model:jar:2.0:compile
[DEBUG] org.apache.maven:maven-artifact-manager:jar:2.0:compile
[DEBUG] org.apache.maven:maven-repository-metadata:jar:2.0:compile
[DEBUG] org.codehaus.plexus:plexus-utils:jar:1.0.4:compile
[DEBUG] org.apache.maven:maven-artifact:jar:2.0:compile
[DEBUG] org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8:compile
[DEBUG] junit:junit:jar:3.8.1:compile
[DEBUG] classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG] Created new class realm plugin>com.dajodi.android:android-stringreplacer-maven-plugin:1.1
[DEBUG] Importing foreign packages into class realm plugin>com.dajodi.android:android-stringreplacer-maven-plugin:1.1
[DEBUG] Imported: < project>com.project.android:project:0.1.0-SNAPSHOT
[DEBUG] Populating class realm plugin>com.dajodi.android:android-stringreplacer-maven-plugin:1.1
[DEBUG] Included: com.dajodi.android:android-stringreplacer-maven-plugin:jar:1.1
[DEBUG] Included: org.codehaus.plexus:plexus-utils:jar:1.0.4
[DEBUG] Included: junit:junit:jar:3.8.1
[DEBUG] Excluded: org.apache.maven:maven-plugin-api:jar:2.0
[DEBUG] Excluded: org.apache.maven:maven-project:jar:2.0
[DEBUG] Excluded: org.apache.maven:maven-profile:jar:2.0
[DEBUG] Excluded: org.apache.maven:maven-model:jar:2.0
[DEBUG] Excluded: org.apache.maven:maven-artifact-manager:jar:2.0
[DEBUG] Excluded: org.apache.maven:maven-repository-metadata:jar:2.0
[DEBUG] Excluded: org.apache.maven:maven-artifact:jar:2.0
[DEBUG] Excluded: org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
[DEBUG] Excluded: classworlds:classworlds:jar:1.1-alpha-2
[DEBUG] Configuring mojo com.dajodi.android:android-stringreplacer-maven-plugin:1.1:replace from plugin realm ClassRealm[plugin>com.dajodi.android:android-stringreplacer-maven-plugin:1.1, parent: sun.misc.Launcher$AppClassLoader@3ae48e1b]
[DEBUG] Configuring mojo 'com.dajodi.android:android-stringreplacer-maven-plugin:1.1:replace' with basic configurator -->
[DEBUG] (f) files = [values/config.xml]
[DEBUG] (f) outputDirectory = /path/to/project/target/filtered-res
[DEBUG] (f) project = MavenProject: com.project.android:project:0.1.0-SNAPSHOT @ /path/to/project/pom.xml
[DEBUG] (f) resourceDirectory = /path/to/project/res
[DEBUG] -- end configuration --
[DEBUG] Resource Directory: /path/to/project/res
[DEBUG] Output Directory: /path/to/project/target/filtered-res
[INFO] Strings will potentially be replace in file: values/config.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.657s
[INFO] Finished at: Thu Dec 19 13:28:50 MST 2013
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.dajodi.android:android-stringreplacer-maven-plugin:1.1:replace (default) on project project: error iterating files: /path/to/project/target/filtered-res/values/config.xml (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.dajodi.android:android-stringreplacer-maven-plugin:1.1:replace (default) on project project: error iterating files
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: error iterating files
at com.dajodi.android.stringreplacer.StringReplacerMojo.execute(StringReplacerMojo.java:94)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.io.FileNotFoundException: /path/to/project/target/filtered-res/values/config.xml (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:194)
at java.io.FileOutputStream.(FileOutputStream.java:145)
at com.dajodi.android.stringreplacer.StringReplacerMojo.processFile(StringReplacerMojo.java:102)
at com.dajodi.android.stringreplacer.StringReplacerMojo.execute(StringReplacerMojo.java:85)
... 21 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
```