You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Evan Ross <ou...@outlook.com> on 2020/04/24 17:43:02 UTC

Can't copy open Excel spreadsheet

I have an Excel spreadsheet in my resources and find that my maven build vailes with “The process cannot access the file because it is being used by another process” when the sheet is open in Excel.

I had a similar issue in my app until I changed the opening of the sheet to be read-only.

It would seem that the maven-resources-plug has the same issue. It should be changed to use a read-only open of the source files that are to be copied.

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10


Re: Can't copy open Excel spreadsheet

Posted by Tushar Kapila <tg...@gmail.com>.
This is an OS issue. Maven runs on Java, which asks the OS for a File
object to read. But some applications like excel or windows explorer or
other app might have an open link.

I doubt this is anything the maven team can help you with. Close all apps,
including windows explorer, some times need to kill the process
explorer.exe. I shifted to Ubuntu but have seen this on some dev systems.
Once needed a restart for an odd similar error.

On Sat, 25 Apr, 2020, 00:20 Evan Ross, <ou...@outlook.com>
wrote:

> I have an Excel spreadsheet in my resources and find that my maven build
> vailes with “The process cannot access the file because it is being used by
> another process” when the sheet is open in Excel.
>
> I had a similar issue in my app until I changed the opening of the sheet
> to be read-only.
>
> It would seem that the maven-resources-plug has the same issue. It should
> be changed to use a read-only open of the source files that are to be
> copied.
>
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for
> Windows 10
>
>

Re: Can't copy open Excel spreadsheet

Posted by Hervé BOUTEMY <he...@free.fr>.
Le vendredi 24 avril 2020, 19:43:02 CEST Evan Ross a écrit :
> I have an Excel spreadsheet in my resources and find that my maven build
> vailes with “The process cannot access the file because it is being used by
> another process” when the sheet is open in Excel.
I don't have easily access to a situation to test: can you share the full 
stacktrace, please?

> 
> I had a similar issue in my app until I changed the opening of the sheet to
> be read-only.
can you show precisely which API you were using in your app to open the file 
and how you modified the call, please?

> 
> It would seem that the maven-resources-plug has the same issue. It should be
> changed to use a read-only open of the source files that are to be copied.
yes, if we can do it, it would be nice

> 
> Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
> 10





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org