[ 
https://issues.apache.org/jira/browse/FELIX-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12751001#action_12751001
 ] 

Stuart McCulloch commented on FELIX-1461:
-----------------------------------------

Exactly - before this fix it was possible to trash the repository file which 
meant you had to completely zap it, losing everything.
Now we at least make sure the repository file is consistent, so although you 
may lose an entry you could check and try again.

Also Maven has a fundamental design issue where running two processes against 
the same local repository could lead to
corrupt Maven metadata (this is well known, which is why many CI machines use 
separate repositories for different builds).
So I'm not sure how much time we should spend trying to workaround something 
that Maven itself doesn't support.

Adding a ctime/mtime check would be an option, but we'd need to limit the 
number of retries - otherwise you could end up in
some sort of live-lock situation. Even then it's possible to end up with 
missing data, as timestamps have limited granularity.

If someone wants to write a patch I'd be happy to integrate it, but for 2.0.1 
this is the least disruptive solution to avoid corruption.

> Corrupted repository.xml when maven is run in parallel
> ------------------------------------------------------
>
>                 Key: FELIX-1461
>                 URL: https://issues.apache.org/jira/browse/FELIX-1461
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-1.4.3
>            Reporter: Carsten Ziegeler
>            Assignee: Stuart McCulloch
>             Fix For: maven-bundle-plugin-2.0.1
>
>
> Sometimes I'm running several maven commands in parallel (different shells) 
> and sometimes in these cases this ends in a corrupted repository.xml.
> It seems that in this case the repository.xml just contains this single line:
> <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
> which produces errors when it is tried to be read again.
> I guess that there are not that many people running maven in parallel but I 
> think the repository.xml shouldn't be corrupted/erased in these cases either 
> :)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to