imixs / manik-hot-deploy

Maven Incremental hot deploy - a plugin for the Eclipse IDE
https://manik.imixs.org/
GNU General Public License v3.0
20 stars 7 forks source link

Illegal char <*> at index 7: target/*.{war,ear,jar} #14

Open Dev-ALPM opened 1 year ago

Dev-ALPM commented 1 year ago

Run under windows 10 with Java 17

Loading mojo org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy from plugin realm ClassRealm[plugin>org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@73d16e93] Configuring mojo execution 'org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy:default' with basic configurator --> (s) source = target/*.{war,ear,jar} (s) target = ./docker/deployments/ (s) unpack = true (f) autodeployments = [org.imixs.maven.manik.AutoDeployment@395f52ed] (f) project = MavenProject: org.imixs.workflow:imixs-process-manager:2.0.2 @ C:\imixs\imixs-process-manager\pom.xml -- end configuration -- Starting auto deployment....

BUILD FAILURE

Total time: 11.712 s Finished at: 2023-09-27T00:12:50+02:00

Failed to execute goal org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy (default) on project imixs-process-manager: Execution default of goal org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy failed: Illegal char <> at index 7: target/.{war,ear,jar} -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy (default) on project imixs-process-manager: Execution default of goal org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy failed: Illegal char <> at index 7: target/.{war,ear,jar} at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.imixs.maven:manik-hotdeploy-maven-plugin:2.0.1:deploy failed: Illegal char <> at index 7: target/.{war,ear,jar} at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:133) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348) Caused by: java.nio.file.InvalidPathException: Illegal char <> at index 7: target/.{war,ear,jar} at sun.nio.fs.WindowsPathParser.normalize (WindowsPathParser.java:182) at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:153) at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:77) at sun.nio.fs.WindowsPath.parse (WindowsPath.java:92) at sun.nio.fs.WindowsFileSystem.getPath (WindowsFileSystem.java:232) at java.nio.file.Path.of (Path.java:147) at java.nio.file.Paths.get (Paths.java:69) at org.imixs.maven.manik.MojoAutodeployPlugin.getSourcePath (MojoAutodeployPlugin.java:119) at org.imixs.maven.manik.MojoAutodeployPlugin.execute (MojoAutodeployPlugin.java:78) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328) at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174) at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75) at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162) at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283) at org.apache.maven.cli.MavenCli.main (MavenCli.java:206) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke (Method.java:568) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283) at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407) at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

rsoika commented 1 year ago

Can you post an example how you have configured the plugin in your pom.xml file?

Dev-ALPM commented 1 year ago

Just use original pom of process-manager (before change by me for suppress wildcard)

    <plugin>
        <groupId>org.imixs.maven</groupId>
        <artifactId>manik-hotdeploy-maven-plugin</artifactId>
        <version>2.0.1</version>
        <executions>
            <execution>
                <phase>install</phase>
                <goals>
                    <goal>deploy</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <!--
                List Source and Target folders for Autodeploy and Hotdeploy 
            -->
            <autodeployments>
                <deployment>
                    <!-- wildcard deployment -->
                    <source>target/*.{war,ear,jar}</source>
                    <target>./docker/deployments/</target>
                    <unpack>true</unpack>
                </deployment>
            </autodeployments>
            <hotdeployments>
                <deployment>
                    <source>src/main/webapp</source>
                    <target>./docker/deployments/imixs-process-manager.war</target>
                </deployment>
            </hotdeployments>
        </configuration>
    </plugin>

Apparently Paths.get() not accept wilcard 'target/*.{war,ear,jar}'

rsoika commented 1 year ago

Are you running on Windows or Unix? Short time ago we had this pull request: https://github.com/imixs/manik-hot-deploy/pull/13 And I wonder if this could be related. Is the behaviour the same when you are using version 2.0.0 instead of 2.0.1 ?

rsoika commented 1 year ago

I looked a little bit deeper into the code. Yes it seems to be the change in version 2.0.1 causing the problem. I wonder why I was abele to use this regex pattern in my own projects...

Strange.... I need to debug this in more detail

benignoms commented 8 months ago

Is there any workaround that can be made so that maven install works on windows?

rsoika commented 8 months ago

Hi @benignoms , yes this issue should be already fixed if you use version 2.0.1 instead of 2.0.0

benignoms commented 6 months ago

@rsoika thx