Skip to content

[maven] using an url as file does not work on windows. #250

Closed
@wesnigk-espirit

Description

@wesnigk-espirit
  • using an url as file does not work on windows.
  • [ maven 3.2.4 ] gradle or maven version
  • [1.0.0.BETA4 ] spotless version
  • [ windows 10 - 1709] operating system and version
				<configuration>
					<java>
						<eclipse>
							<file>https://git.mycompany.de/projects/INFRA/repos/pm-codestyle/raw/eclipse-java-pm-style.xml</file>
							<version>4.7.1</version>
						</eclipse>
					</java>
</configuration>
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:1.0.0.BETA4:apply (code-formatting) on project project-api: Execution code-formatting of goal com.diffplug.spotless:spotless-maven-plugin:1.0.0.BETA4:apply failed: Unable to create tem
poraty file 'https://git.mycompany.de/projects/INFRA/repos/pm-codestyle/raw/eclipse-java-pm-style-1527576190601.xml' in the output directory: Failed to create directory D:\git\project\api\target\https:\git.mycompany.de\projects\INFRA\repos\pm-codestyle\raw -> [
Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:1.0.0.BETA4:apply (code-formatting) on project project-api: Execution code-formatting of goal com.diffplug.spotless:spotless-maven-plugi
n:1.0.0.BETA4:apply failed: Unable to create temporaty file 'https://git.mycompany.de/projects/INFRA/repos/pm-codestyle/raw/eclipse-java-pm-style-1527576190601.xml' in the output directory
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
        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.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
        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:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        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.PluginExecutionException: Execution code-formatting of goal com.diffplug.spotless:spotless-maven-plugin:1.0.0.BETA4:apply failed: Unable to create temporaty file 'https://git.mycompany.de/projects/INFRA/repos/pm-codestyle/raw/ec
lipse-java-pm-style-1527576190601.xml' in the output directory
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: java.lang.RuntimeException: Unable to create temporaty file 'https://git.mycompany.de/projects/INFRA/repos/pm-codestyle/raw/eclipse-java-pm-style-1527576190601.xml' in the output directory
        at com.diffplug.spotless.maven.FileLocator.locateFile(FileLocator.java:46)
        at com.diffplug.spotless.maven.java.Eclipse.newFormatterStep(Eclipse.java:41)
        at com.diffplug.spotless.maven.FormatterFactory.lambda$newFormatter$1(FormatterFactory.java:74)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.diffplug.spotless.maven.FormatterFactory.newFormatter(FormatterFactory.java:75)
        at com.diffplug.spotless.maven.AbstractSpotlessMojo.execute(AbstractSpotlessMojo.java:101)
        at com.diffplug.spotless.maven.AbstractSpotlessMojo.execute(AbstractSpotlessMojo.java:95)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
        ... 20 more
Caused by: org.codehaus.plexus.resource.loader.FileResourceCreationException: Failed to create directory D:\git\project\api\target\https:\git.mycompany.de\projects\INFRA\repos\pm-codestyle\raw
        at org.codehaus.plexus.resource.DefaultResourceManager.createResourceAsFile(DefaultResourceManager.java:209)
        at org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsFile(DefaultResourceManager.java:101)
        at com.diffplug.spotless.maven.FileLocator.locateFile(FileLocator.java:42)
        ... 34 more

So, i guess the problem is the colon ":" as well as the slashes "/" as they do not work on windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions