Supporting DocBook olink in Maven Project - maven

I introduced my current project at work to DocBook for creating our user's guide. We have now split into two separate documents and I'm trying to get cross-linking between the documents working. I've got the .db files being generated now. But in doing so the html files no longer have any content (I've disabled pdf until I can get the html working). The generated xml files seem to be complete, they're just not getting transformed into html. Any help would be greatly appreciated.
src.xml:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<baseDirectory>swac-home</baseDirectory>
<!--files>
<file>
<source>target/docbkx/pdf/swac-reference-manual.pdf</source>
<fileMode>0444</fileMode>
</file>
<file>
<source>target/docbkx/pdf/swac-analysts-guide.pdf</source>
<fileMode>0444</fileMode>
</file>
</files-->
<fileSets>
<fileSet>
<directory>target/docbkx/html</directory>
<outputDirectory>html</outputDirectory>
<fileMode>0444</fileMode>
</fileSet>
<fileSet>
<excludes>
<!--exclude>*.pdf</exclude-->
</excludes>
<directory>src/docbkx/images</directory>
<outputDirectory>html/images</outputDirectory>
<fileMode>0444</fileMode>
</fileSet>
</fileSets>
</assembly>
pom.xml:
<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>
<artifactId>swac-parent</artifactId>
<groupId>gov.faa.ang.swac</groupId>
<version>1.7-SNAPSHOT</version>
</parent>
<artifactId>swac-documentation</artifactId>
<name>SWAC Documentation</name>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<resources>
<resource>
<directory>src</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>com.agilejava.docbkx</groupId>
<artifactId>docbkx-maven-plugin</artifactId>
<version>2.0.14</version>
<configuration>
<!-- shared configuration -->
<generatedSourceDirectory>${project.build.directory}/docbkx/generated</generatedSourceDirectory>
<xincludeSupported>true</xincludeSupported>
<paperType>Letter</paperType>
<fop1Extensions>1</fop1Extensions>
<customizationParameters>
<!-- additional XSLT parameters-->
<!--parameter>
<name>key</name>
<value>value</value>
</parameter-->
</customizationParameters>
</configuration>
<executions>
<execution>
<id>olinkdb-bogus-guide</id>
<phase>process-sources</phase>
<configuration>
<currentDocid>bogus-guide</currentDocid>
<includes>swac-analysts-guide.xml</includes>
<collectXrefTargets>only</collectXrefTargets>
<targetsFilename>${project.build.directory}/docbkx/generated/guide.html-target.db</targetsFilename>
<postProcess>
<!--delete file="${project.build.directory}/docbkx/generated/html/bogus-guide.html" /-->
</postProcess>
</configuration>
<goals>
<goal>generate-html</goal>
</goals>
</execution>
<execution>
<id>olinkdb-bogus-manual</id>
<phase>process-sources</phase>
<configuration>
<currentDocid>bogus-manual</currentDocid>
<includes>swac-reference-manual.xml</includes>
<collectXrefTargets>only</collectXrefTargets>
<targetsFilename>${project.build.directory}/docbkx/generated/manual.html-target.db</targetsFilename>
<postProcess>
<!--delete file="${project.build.directory}/docbkx/generated/html/bogus-manual.html" /-->
</postProcess>
</configuration>
<goals>
<goal>generate-html</goal>
</goals>
</execution>
<execution>
<id>reference manual</id>
<phase>process-sources</phase>
<goals>
<goal>generate-html</goal>
<!--goal>generate-pdf</goal-->
</goals>
<configuration>
<!-- per execution configuration -->
<targetDatabaseDocument>guide.target.db</targetDatabaseDocument>
<xincludeSupported>true</xincludeSupported>
<includes>swac-reference-manual.xml</includes>
<draftMode>no</draftMode>
</configuration>
</execution>
<execution>
<id>analysts guide</id>
<phase>process-sources</phase>
<goals>
<goal>generate-html</goal>
<!--goal>generate-pdf</goal-->
</goals>
<configuration>
<!-- per execution configuration -->
<targetDatabaseDocument>manual.target.db</targetDatabaseDocument>
<xincludeSupported>true</xincludeSupported>
<includes>swac-analysts-guide.xml</includes>
<draftMode>no</draftMode>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.docbook</groupId>
<artifactId>docbook-xml</artifactId>
<version>5.0-all</version>
<classifier>resources</classifier>
<type>zip</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/src.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</build>
</project>
debug output:
...
[DEBUG] All known ContainerDescriptorHandler components: [metaInf-services, plexus, file-aggregator, metaInf-spring]
[DEBUG] Cannot find ArtifactResolver with hint: project-cache-aware
org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException
role: org.apache.maven.artifact.resolver.ArtifactResolver
roleHint: project-cache-aware
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:264)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:240)
at org.apache.maven.shared.repository.DefaultRepositoryAssembler.contextualize(DefaultRepositoryAssembler.java:721)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.contextualize(PlexusLifecycleManager.java:322)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.manageLifecycle(PlexusLifecycleManager.java:297)
at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:143)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1054)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.eclipse.sisu.wire.EntryListAdapter$ValueIterator.next(EntryListAdapter.java:111)
at org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:180)
at org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:445)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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: java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:3006)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
... 43 more
[DEBUG] No dependency sets specified.
[DEBUG] FileSet[html/] dir perms: -1 file perms: -1
[DEBUG] The archive base directory is 'null'
[DEBUG] NOT reformatting any files in C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\docbkx\html
[DEBUG] Adding file-set from directory: 'C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\docbkx\html'
assembly output directory is: 'html/'
[DEBUG] Adding file-set in: C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\docbkx\html to archive location: html/
[DEBUG] FileSet[html/images/] dir perms: -1 file perms: 107777
[DEBUG] The archive base directory is 'null'
[DEBUG] NOT reformatting any files in C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\src\docbkx\images
[DEBUG] Adding file-set from directory: 'C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\src\docbkx\images'
assembly output directory is: 'html/images/'
[DEBUG] Adding file-set in: C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\src\docbkx\images to archive location: html/images/
[INFO] Building jar: C:\Users\ssmitz\Documents\NetBeansProjects\trunk\swac-users-guide\target\swac-documentation-1.7-SNAPSHOT.jar
...

Related

maven assembly plugin tgz - no such archiver

I need to do a really simple tar action using the maven-assembly-plugin.
My file extension must be .tgz not tar.gz
Here is my pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany.app</groupId>
<artifactId>my-app</artifactId>
<version>1</version>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>default-cli</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}</finalName>
<descriptors>
<descriptor>dist-all.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
and here is my assembly description file
<?xml version="1.0" encoding="UTF-8"?>
<assembly>
<id>default-cli</id>
<formats>
<format>tgz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>src/app</directory>
<outputDirectory>target</outputDirectory>
</fileSet>
</fileSets>
</assembly>
when I run mvn clean install it generates the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2.1:single (default-cli) on project my-app: Failed to create assembly: Unable to obtain archiver for extension 'tgz', for assembly: 'default-cli': No such archiver: 'tgz'. -> [Help 1]
[ERROR]
According to the maven page I am allowed 'tgz' format.
https://maven.apache.org/plugins/maven-assembly-plugin/assembly.html
What have I missed?
I'd be grateful for any help,

Maven bouncycastle dependeny throws error

New empty project, added 4 dependencies without a problem, except for this one...
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.53</version>
</dependency>
Looking at JAR's on the web META-INF contains 2 other entries that other packages don't, namely BCKEY.SF & BCKEY.DSA
Tried adding filter to exec-maven-plugin to no avail
<filters>
<filter>
<!-- exclude signatures, the bundling process breaks them for some reason -->
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
Error:
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec
(default-cli) on project bounce: Command execution failed. Process
exited with an error: 1 (Exit value: 1) -> [Help 1]
Full Error:
-- end configuration --
Executing command line: C:\Program Files\Java\jdk1.8.0_60\jre\bin\java -jar C:\Users\John\Documents\NetBeansProjects\TestApplication\target/TestApplication-1.0.jar
java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:284)
at sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:238)
at java.util.jar.JarVerifier.processEntry(JarVerifier.java:273)
at java.util.jar.JarVerifier.update(JarVerifier.java:228)
at java.util.jar.JarFile.initializeVerifier(JarFile.java:383)
at java.util.jar.JarFile.getInputStream(JarFile.java:450)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:940)
at sun.misc.Resource.cachedInputStream(Resource.java:77)
at sun.misc.Resource.getByteBuffer(Resource.java:160)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:454)
at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" [INFO] NETBEANS-ExecEvent:{"exc":{"msg":"Q29tbWFuZCBleGVjdXRpb24gZmFpbGVkLg=="},"mojo":{"impl":"org.codehaus.mojo.exec.ExecMojo","urls":["file:\/C:\/Users\/John\/.m2\/repository\/org\/codehaus\/mojo\/exec-maven-plugin\/1.2.1\/exec-maven-plugin-1.2.1.jar","file:\/C:\/Users\/John\/.m2\/repository\/org\/apache\/maven\/reporting\/maven-reporting-api\/2.0.6\/maven-reporting-api-2.0.6.jar","file:\/C:\/Users\/John\/.m2\/repository\/org\/apache\/maven\/doxia\/doxia-sink-api\/1.0-alpha-7\/doxia-sink-api-1.0-alpha-7.jar","file:\/C:\/Users\/John\/.m2\/repository\/commons-cli\/commons-cli\/1.0\/commons-cli-1.0.jar","file:\/C:\/Users\/John\/.m2\/repository\/org\/codehaus\/plexus\/plexus-interactivity-api\/1.0-alpha-4\/plexus-interactivity-api-1.0-alpha-4.jar","file:\/C:\/Users\/John\/.m2\/repository\/org\/codehaus\/plexus\/plexus-utils\/2.0.5\/plexus-utils-2.0.5.jar","file:\/C:\/Users\/John\/.m2\/repository\/org\/apache\/commons\/commons-exec\/1.1\/commons-exec-1.1.jar"],"goal":"exec","id":"org.codehaus.mojo:exec-maven-plugin:1.2.1","source":"CLI","execId":"default-cli"},"type":"MojoFailed"}
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 35.290s
Finished at: Thu Oct 29 13:41:37 CET 2015
Final Memory: 18M/146M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project TestApplication: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project TestApplication: Command execution failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
... 21 more
Default NetBeans POM with added dependency:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.mycompany</groupId>
<artifactId>TestApplication</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>TestApplication</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.mycompany.testapplication.MainApp</mainClass>
</properties>
<organization>
<!-- Used as the 'Vendor' for JNLP generation -->
<name>Your Organisation</name>
</organization>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>default-cli</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/bin/java</executable>
<commandlineArgs>${runfx.args}</commandlineArgs>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${java.home}/lib/jfxrt.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.53</version>
</dependency>
</dependencies>
</project>

Cannot build Maven Project

I have this maven configuration which I want to use on different operating systems:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.dx57dc</groupId>
<artifactId>DX57DC</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>DX57DC</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<mainClass>com.dx57dc.MainApp</mainClass>
</properties>
<profiles>
<profile>
<activation>
<os>
<name>Windows XP</name>
<family>Windows</family>
<arch>x86</arch>
<version>5.1.2600</version>
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<bootclasspath>${sun.boot.class.path}${path.separator}${java.home}/lib/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<activation>
<os>
<name>Linux</name>
<family>Linux</family>
<arch>x86</arch>
<!-- <version>5.1.2600</version> -->
</os>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludeScope>system</excludeScope>
<excludeGroupIds>junit,org.mockito,org.hamcrest</excludeGroupIds>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${java.home}/../bin/javafxpackager</executable>
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>${mainClass}</argument>
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
<argument>-outdir</argument>
<argument>${project.build.directory}</argument>
<argument>-outfile</argument>
<argument>${project.build.finalName}.jar</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<bootclasspath>/opt/java/jre/lib/ext/jfxrt.jar</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
I get this warning message:
--- exec-maven-plugin:1.2.1:exec (default-cli) # DX57DC ---
Error: Unable to access jarfile D:\Documents
Can you tell me what is the proper way to configure this POM file?
P.S After I added "" with them or without I get this error on Windows:
[exec:exec]
java.lang.NoClassDefFoundError: javafx/application/Application
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 13 more
Exception in thread "main" [INFO] ------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1.000s
Finished at: Fri Aug 02 14:09:35 PDT 2013
Final Memory: 6M/15M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project DX57DC: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
I think its because some of the arguments sent to exec-maven-plugin contains spaces.
In your case it looks like ${project.build.directory} or some other variable resolves to C:\Documents and Settings\something.
When you are passing this:
<argument>-srcdir</argument>
<argument>${project.build.directory}/classes</argument>
It will resolve to: -srcdir=C:\Documents and Settings\something/classes.
When it should have been something like: -srcdir="C:\Documents and Settings\something/classes" with "".
In your exec-plugin configuration, put "" around all your properties <argument> tags (the ones that contain $ in them)
like this
<arguments>
<argument>-createjar</argument>
<argument>-nocss2bin</argument>
<argument>-appclass</argument>
<argument>"${mainClass}"</argument>
....
</arguments>

Maven permission denied

I'm getting strange exception while trying to create exploded war directory with maven. And it's strange because I already changed all files permissions to 777 for everyone.
What should I check? Ican't find any useful info in stacktrace :(
Goals I execute:
install war:exploded tomcat:redeploy
Here's stacktrace:
Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:exploded (default-cli) on project app-web: Failed to copy file for artifact [com.kk:app-core2:jar:app-SNAPSHOT:compile]: D:\kk\app-2013\app-core2\target\classes (Odmowa dostępu) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.3:exploded (default-cli) on project app-web: Failed to copy file for artifact [com.kk:app-core2:jar:app-SNAPSHOT:compile]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to copy file for artifact [com.kk:app-core2:jar:app-SNAPSHOT:compile]
at org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:137)
at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleArtifacts(WarProjectPackagingTask.java:195)
at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPackaging(WarProjectPackagingTask.java:107)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:479)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:412)
at org.apache.maven.plugin.war.WarExplodedMojo.execute(WarExplodedMojo.java:43)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.io.FileNotFoundException: D:\kk\app-2013\app-core2\target\classes (Odmowa dostępu)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:138)
at org.codehaus.plexus.util.FileUtils.doCopyFile(FileUtils.java:1067)
at org.codehaus.plexus.util.FileUtils.copyFile(FileUtils.java:1049)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:304)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask$1.registered(AbstractWarPackagingTask.java:152)
at org.apache.maven.plugin.war.util.WebappStructure.registerFile(WebappStructure.java:211)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.copyFile(AbstractWarPackagingTask.java:147)
at org.apache.maven.plugin.war.packaging.ArtifactsPackagingTask.performPackaging(ArtifactsPackagingTask.java:112)
... 26 more
EDIT POM.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<parent>
<artifactId>app</artifactId>
<groupId>com.kk</groupId>
<version>2013-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>app-web</artifactId>
<packaging>war</packaging>
<name>Application</name>
<dependencies>
<!- whole lot of dependecies->
</dependencies>
<build>
<resources>
<resource>
<filtering>false</filtering>
<directory>src/main/resources</directory>
<includes>
<include>**</include>
</includes>
<excludes>
</excludes>
</resource>
<resource>
<filtering>false</filtering>
<directory>src/main/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<filtering>false</filtering>
<directory>src/main/html</directory>
<includes>
<include>**</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<configuration>
<excludeResources>true</excludeResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<complianceLevel>1.6</complianceLevel>
<includes>
<include>**/IMediaManager.java</include>
<include>**/CachableMediaManager.java</include>
<include>**/BaseApplication.java</include>
</includes>
<aspectLibraries>
<aspectLibrary>
<groupId>com.kk</groupId>
<artifactId>commons-cache</artifactId>
</aspectLibrary>
</aspectLibraries>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<finalName>app-web</finalName>
</build>
<profiles>
<profile>
<id>development</id>
<dependencies>
<dependency>
<groupId>com.kk</groupId>
<artifactId>app-web-config</artifactId>
<scope>runtime</scope>
</dependency>
</dependencies>
<properties>
<m2eclipse.wtp.contextRoot>/</m2eclipse.wtp.contextRoot>
</properties>
</profile>
</profiles>
</project>

Maven property not set when using profile

The filtering via maven package -Pexplode is not working. "${ds.xml}" is not being replaced with "openmind-ds.xml". The value "openmind-ds.xml" and key "ds.xml" are in the filter.properties. Also ${as.deploy}.
Error Message
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (package) on project openmind-ear: An Ant BuildException has occured: Warning: Could not find file /home/localhost/workspaceOM/openmind/openmind-ear/target/${ds.xml} to copy. -> [Help 1]
Mode Debug
[INFO] Executing tasks
[DEBUG] getProperty(ns=null, name=ant.reuse.loader, user=false)
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
[DEBUG] getProperty(ns=null, name=as.deploy, user=false)
Property "as.deploy" has not been set
Setting project property: deploy-path -> ${as.deploy}/openmind-ear.ear
[DEBUG] getProperty(ns=null, name=deploy-path, user=false)
[echo] Exploding to ${as.deploy}/openmind-ear.ear
[DEBUG] getProperty(ns=null, name=deploy-path, user=false)
[delete] Directory /home/localhost/workspaceOM/openmind/openmind-ear/${as.deploy}/openmind-ear.ear cannot be removed using the file attribute. Use dir instead.
[DEBUG] getProperty(ns=null, name=deploy-path, user=false)
[mkdir] Skipping /home/localhost/workspaceOM/openmind/openmind-ear/${as.deploy}/openmind-ear.ear because it already exists.
[DEBUG] getProperty(ns=null, name=deploy-path, user=false)
[sync] PASS#1: Copying files to /home/argonist/om-umgebung/workspaceOM/openmind/openmind-ear/${as.deploy}/openmind-ear.ear
pom.xml in ear-project
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>de.openmind</groupId>
<artifactId>openmind</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>openmind-ear</artifactId>
<packaging>ear</packaging>
<name>${project.artifactId} : ${project.version} EAR</name>
<profiles>
<profile>
<id>env-dev</id>
<properties>
<env>dev</env>
</properties>
</profile>
<profile>
<id>env-prod</id>
<properties>
<env>prod</env>
</properties>
</profile>
<profile>
<id>explode</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<configuration>
<tasks>
<property name="deploy-path" value="${as.deploy}/${app.context}-ear.ear" />
<echo>Exploding to ${deploy-path}</echo>
<delete file="${deploy-path}" quiet="true" />
<mkdir dir="${deploy-path}" />
<sync todir="${deploy-path}" verbose="true">
<fileset
dir="${project.build.directory}/${project.build.finalName}" />
</sync>
<copy todir="${as.deploy}" file="${project.build.directory}/${ds.xml}"
verbose="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>unexplode</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>clean</id>
<phase>clean</phase>
<configuration>
<tasks>
<property name="deploy-path" value="${as.deploy}/${app.context}-ear.ear" />
<echo>Unexploding: ${deploy-path}</echo>
<delete file="${deploy-path}" quiet="true" />
<delete dir="${deploy-path}" quiet="true" />
<delete file="${as.deploy}/${ds.xml}" quiet="true" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
.....
</dependencies>
<build>
<finalName>${app.context}-ear</finalName>
<filters>
<filter>../src/main/filters/filter-${env}.properties</filter>
</filters>
<plugins>
<plugin>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<defaultJavaBundleDir>lib/</defaultJavaBundleDir>
<version>6</version>
<archive>
<manifestEntries>
<Build-Date>${timestamp}</Build-Date>
<Build-Revision>${buildNumber}</Build-Revision>
<Mode>${env}</Mode>
</manifestEntries>
</archive>
<modules>
<jarModule>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
<includeInApplicationXml>false</includeInApplicationXml>
<bundleDir>lib</bundleDir>
</jarModule>
<jarModule>
<groupId>${project.groupId}</groupId>
<artifactId>${app.context}-datamodel</artifactId>
<includeInApplicationXml>false</includeInApplicationXml>
<bundleDir>lib</bundleDir>
</jarModule>
<webModule>
<groupId>${project.groupId}</groupId>
<artifactId>${app.context}-war</artifactId>
<contextRoot>/${app.web.context}</contextRoot>
<unpack>${app.unpack.modules}</unpack>
<bundleFileName>${app.context}-war.war</bundleFileName>
</webModule>
<ejbModule>
<groupId>${project.groupId}</groupId>
<artifactId>${app.context}-bootstrap</artifactId>
<excluded>${exclude.bootstrap}</excluded>
<bundleFileName>${app.context}-bootstrap.jar</bundleFileName>
<unpack>${app.unpack.modules}</unpack>
</ejbModule>
<ejbModule>
<groupId>${project.groupId}</groupId>
<artifactId>${app.context}-ejb</artifactId>
<bundleFileName>${app.context}-ejb.jar</bundleFileName>
<unpack>${app.unpack.modules}</unpack>
</ejbModule>
<ejbModule>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<configuration>
<files>
<file>${basedir}/../src/main/filters/filter-${env}.properties</file>
</files>
</configuration>
</execution>
<execution>
<!-- Properties needed by unexplode profile -->
<id>pre-clean</id>
<phase>pre-clean</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/../src/main/filters/filter-${env}.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<!-- <outputDirectory>${env.JBOSS_HOME}/server/default/deploy</outputDirectory> -->
<outputDirectory>${project.build.directory}</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>${ds.xml}</include>
</includes>
</resource>
</resources>
</configuration>
<executions>
<execution>
<id>copy-app-ds-xml</id>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</executions>
<!-- <execution> <id>copy-mysql-driver</id> <phase>install</phase> <goals>
<goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${env.JBOSS_HOME}/server/default/lib</outputDirectory>
<resources> <resource> <directory>${settings.localRepository}/mysql/mysql-connector-java/5.1.6</directory>
<includes> <include>mysql-connector-java-5.1.6.jar</include> </includes>
</resource> </resources> </configuration> </execution> -->
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
Your filter properties rely on the ${env} parameter:
<filter>../src/main/filters/filter-${env}.properties</filter>
This parameter has no value in your "explode" profile. So Maven must be looking for:
../src/main/filters/filter-.properties
I suspect you were hoping it would be filter.properties and not filter-.properties.

Resources