5 Replies Latest reply on Jan 30, 2013 7:43 AM by justin_at_adobe

    content-package-maven-plugin, META-INF/vault/filter.xml parse error

    jkmgbrt

      I´m trying to use content-package-maven-plugin to build a package with filtered contents. My META-INF/vault/filter.xml looks like below (as the example at http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.h tml#package > "Using filters" suggests):

       

      <?xml version="1.0" encoding="UTF-8"?>

      <workspaceFilter version="1.0">

          <filter>

              <root>/apps/mysite</root>

              <includes>

                  <include>/apps/mysite/components/page/*</include>

              </includes>

          </filter>

      </workspaceFilter>

       

      My plugin configuration:

      <plugin>

                <groupId>com.day.jcr.vault</groupId>

                <artifactId>content-package-maven-plugin</artifactId>

                <version>0.0.19</version>

                <extensions>true</extensions>

      </plugin>

       

      I also use <packaging>content-package</packaging>

       

      When running mvn package I get the following error:

       

       

      [ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.19:package (default-package) on project mysite-view: java.io.IOException: either <include> or <exclude> expected. -> [Help 1]

      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.19:package (default-package) on project mysite-view: java.io.IOException: either <include> or <exclude> expected.

              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(LifecycleModuleBu ilder.java:84)

              at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBu ilder.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: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: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: java.io.IOException: either <include> or <exclude> expected.

              at com.day.jcr.vault.maven.pack.VaultMojo.execute(VaultMojo.java:328)

              at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.j ava:101)

              at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)

              ... 19 more

      Caused by: java.io.IOException: either <include> or <exclude> expected.

              at com.day.jcr.vault.maven.pack.impl.DefaultWorkspaceFilter.readDef(DefaultWorkspaceFilter.j ava:237)

              at com.day.jcr.vault.maven.pack.impl.DefaultWorkspaceFilter.read(DefaultWorkspaceFilter.java :213)

              at com.day.jcr.vault.maven.pack.impl.DefaultWorkspaceFilter.load(DefaultWorkspaceFilter.java :190)

              at com.day.jcr.vault.maven.pack.impl.DefaultWorkspaceFilter.load(DefaultWorkspaceFilter.java :142)

              at com.day.jcr.vault.maven.pack.VaultMojo.execute(VaultMojo.java:266)

              ... 21 more

       

       

      Has anyone encountered this error before or have any hints on what the problem could be?

       

      Thanks

      Joakim