Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document windows build setup #18

Closed
m50d opened this issue Mar 30, 2018 · 3 comments
Closed

document windows build setup #18

m50d opened this issue Mar 30, 2018 · 3 comments
Labels

Comments

@m50d
Copy link

m50d commented Mar 30, 2018

On windows, build must be run as admin at least once to create symlink

Running mvn install on a clean checkout as a user I get:

C:\Users\md401\eclipse-workspace\scalor-maven-plugin>mvn install
[INFO] Arkon: provisioning...
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin_2.12:maven-plugin:1.4.1.20180330144420
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ com.carrotgarden.maven:scalor-maven-plugin:0-SNAPSHOT, C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml, line 478, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin:pom:0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ line 478, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Scalor Maven Plugin
[INFO] Scalor Maven Plugin 2.12
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Scalor Maven Plugin 0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.scala-ide:org.scala-ide.sdt.core:jar:4.7.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.1.20180329193631:setup-cross (default) @ scalor-maven-plugin ---
[INFO] [setup-cross] Ensuring module folders.
[INFO] [setup-cross]    folder: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12
[INFO] [setup-cross] Ensuring resource symlinks.
[INFO] [setup-cross]    symlink: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src -> C:\Users\md401\eclipse-workspace\scalor-maven-plugin\src
[ERROR] C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml [1:1]: Execution failure
java.nio.file.FileSystemException: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src: A required privilege is not held by the client.

    at sun.nio.fs.WindowsException.translateToIOException (WindowsException.java:92)
    at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:103)
    at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:108)
    at sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink (WindowsFileSystemProvider.java:581)
    at java.nio.file.Files.createSymbolicLink (Files.java:1051)
    at com.carrotgarden.maven.scalor.util.Folder$.ensureSymlink (Folder.scala:359)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.$anonfun$performInvocation$3 (SetupProjectMojo.scala:74)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.$anonfun$performInvocation$3$adapted (SetupProjectMojo.scala:69)
    at scala.collection.immutable.List.map (List.scala:283)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.$anonfun$performInvocation$2 (SetupProjectMojo.scala:69)
    at scala.collection.immutable.List.flatMap (List.scala:335)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.performInvocation (SetupProjectMojo.scala:68)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.performInvocation$ (SetupProjectMojo.scala:52)
    at com.carrotgarden.maven.scalor.SetupCrossArkonMojo.performInvocation (SetupProjectMojo.scala:97)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.perform (SetupProjectMojo.scala:83)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.perform$ (SetupProjectMojo.scala:78)
    at com.carrotgarden.maven.scalor.SetupCrossArkonMojo.perform (SetupProjectMojo.scala:97)
    at com.carrotgarden.maven.scalor.base.Mojo.execute (Mojo.scala:65)
    at com.carrotgarden.maven.scalor.base.Mojo.execute$ (Mojo.scala:50)
    at com.carrotgarden.maven.scalor.SetupCrossArkonMojo.execute (SetupProjectMojo.scala:97)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    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)
[ERROR] [setup-cross] Execution failure: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src: A required privilege is not held by the client.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Scalor Maven Plugin ................................ FAILURE [  3.526 s]
[INFO] Scalor Maven Plugin 2.12 ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.220 s
[INFO] Finished at: 2018-03-30T15:44:25+01:00
[INFO] Final Memory: 36M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.carrotgarden.maven:scalor-maven-plugin_2.12:1.4.1.20180329193631:setup-cross (default) on project scalor-maven-plugin: Execution failure: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src: A required privilege is not held by the client. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Can be worked around by running the build once as admin, which sets the symlink correctly, after that subsequent builds get past this step (though I'm still hitting #16 at the moment).

@Andrei-Pozolotin
Copy link
Contributor

perhaps windows development requires "developer setup":
https://github.com/random-maven/scalor-maven-plugin/blob/master/note/windows-setup.md

i.e. run and take a look inside the windows-10 vm, to see how many adjustments are made by microsoft:
https://developer.microsoft.com/en-us/windows/downloads/virtual-machines

@Andrei-Pozolotin Andrei-Pozolotin changed the title On windows, build must be run as admin at least once to create symlink document windows build setup Mar 30, 2018
@m50d
Copy link
Author

m50d commented Apr 2, 2018

Ah yep, that's sorted it. Thanks, and sorry for the trouble.

@Andrei-Pozolotin
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants