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

error "The process cannot access the file because it is being used by another process" #30

Closed
jorgheymans opened this Issue Jul 14, 2017 · 5 comments

Comments

3 participants
@jorgheymans
Copy link

jorgheymans commented Jul 14, 2017

Hi,

We are seeing this error sporadically in our builds

14:24:11 [ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.5.0:compile-custom (default) on project sdk: Unable to copy the file to c:\RC\Jenkins\workspace\sdk\shared\target\protoc-plugins: c:\RC\Jenkins\workspace\sdk\shared\target\protoc-plugins\protoc-3.1.0-windows-x86_64.exe (The process cannot access the file because it is being used by another process) -> [Help 1]

it does not happen all the time, and often a subsequent build will work fine but it's a bit annoying as you can understand.

the plugin is configured as such:

  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>1.5.0.Final</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <groupId>org.xolstice.maven.plugins</groupId>
        <artifactId>protobuf-maven-plugin</artifactId>
        <version>0.5.0</version>
        <configuration>
          <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
          <pluginId>grpc-java</pluginId>
          <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}
          </pluginArtifact>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>compile-custom</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
@sergei-ivanov

This comment has been minimized.

Copy link
Member

sergei-ivanov commented Jul 18, 2017

I believe I have seen it a couple of times too and I suspect it is because of a virus scanner under Windows holding on to the file. However, I have an idea how to improve things when multiple plugin goals are being run in a sequence. I'll post an update when the new version is ready.

@sergei-ivanov sergei-ivanov self-assigned this Jul 18, 2017

@sergei-ivanov sergei-ivanov added this to the 0.5.1 milestone Jul 18, 2017

@jorgheymans

This comment has been minimized.

Copy link

jorgheymans commented Jul 19, 2017

@clevertension

This comment has been minimized.

Copy link

clevertension commented Oct 13, 2017

do it resolved now? i meet this issue too, when i open the IDE(eclipse, intellij idea), it will always complain this during maven cli build

@sergei-ivanov

This comment has been minimized.

Copy link
Member

sergei-ivanov commented Oct 15, 2017

I have committed a small change that I hope will fix the problem. Unfortunately, I cannot reproduce the problem on my current system, so I cannot tell if it's been fixed. Please give version 0.5.1 a try (I can see it's already been synced to Maven central).

@jorgheymans

This comment has been minimized.

Copy link

jorgheymans commented Nov 20, 2017

FYI haven't had the error for a good while now across our environments, so it seems that your fix did the trick thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment