mojohaus / mojohaus/exec-maven-plugin

1.5.0 recoginized unix style paths given, 1.6.0 version doesn't

Open
#92 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
191
Forks
111
Avg merge
1d 21h
Merged PRs (30d)
4

Description

The following, that was working in plugin version 1.5.0 doesn't work in 1.6.0

        <build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
                                 <version>1.6.0</version>
				<executions>
					<execution>
						<id>build js</id>
						<configuration>
							<workingDirectory>src/node</workingDirectory>
							<executable>../node_modules/.bin/ng.cmd</executable>
							<arguments>
								<argument>build</argument>
								<argument>--target=production</argument>
								<argument>--environment=prod</argument>                                
                                                               <argument>--bh=/inline-window/</argument>
							</arguments>
						</configuration>
						<phase>generate-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

Fails with: 
[INFO] --- exec-maven-plugin:1.6.0:exec (build js) @ some-app-ui ---
'..' is not recognized as an internal or external command,
operable program or batch file.
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:804)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:751)
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:313)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
        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:116)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:185)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:181)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Workaround : Using windows style slashes works locally, but fails in the Continuous build server. 
Also even after using that locally, build fails due to another issue, which might be path related as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the supplied exec-maven-plugin configuration on Windows and on the continuous build server, starting with the ExecMojo.executeCommandLine stack-trace entry point. Compare path handling between versions 1.5.0 and 1.6.0, including the reported second failure; done means Unix-style paths work in both environments without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.