Я использую Eclipse для разработки большого проекта Maven (десятки зависимостей). Когда я пытаюсь выполнить единичный тест, я вижу паузу около минуты, в то время как в статусе отображается «проверка атрибутов запуска». Наблюдая за действиями Eclipse в Process Monitor, я вижу много файлов доступа к различным замкам и банкам в репозитории Maven. Похоже, Eclipse просматривает каждый JAR, от которого зависит мой проект. Как только этот доступ к файлу будет завершен, начнется фактический тест.Eclipse висит на «проверке атрибутов запуска» в больших проектах Maven
Я знаю совет, предлагаемый в «Why is Eclipse hanging at 57% with the status “Verifying launch attributes…” when launching a run configuration?», и я выполнил предложенные исправления. Я думаю, что Eclipse делает то, что он должен делать, переходя через каждый JAR. Мой вопрос: как можно отключить это поведение, как в Eclipse, так и в Maven?
Я использую Eclipse, Luna на Windows 7, m2e версия 1.5.0.20140606
Edit:
Ниже пример того, что я вижу в Process Monitor:
Короче говоря, мы проводим некоторые 10 секунд на разумной активности, такой как проверка состояния файлов Java и JAR, а затем мы тратим ~ 40 секунд на блокировку Maven repo и чтение файлов POM.
Зачем это затмение? И что мне нужно изменить, чтобы остановить его?
11:31:48.1468054 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\org\drools\drools-core\6.0.1.Final\drools-core-6.0.1.Final.jar SUCCESS Desired Access: Read Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:31:48.1469017 AM eclipse.exe 3736 QueryBasicInformationFile C:\LAS\Maven\Repository\org\drools\drools-core\6.0.1.Final\drools-core-6.0.1.Final.jar SUCCESS CreationTime: 7/21/2014 11:13:15 AM, LastAccessTime: 7/21/2014 11:13:15 AM, LastWriteTime: 7/21/2014 11:13:22 AM, ChangeTime: 7/21/2014 11:13:23 AM, FileAttributes: A
11:31:48.1469769 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\org\drools\drools-core\6.0.1.Final\drools-core-6.0.1.Final.jar SUCCESS
11:31:50.0040011 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:31:50.0040832 AM eclipse.exe 3736 QueryNetworkOpenInformationFile C:\LAS\Maven\Repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar SUCCESS CreationTime: 7/21/2014 11:13:15 AM, LastAccessTime: 7/21/2014 11:13:15 AM, LastWriteTime: 7/21/2014 11:13:21 AM, ChangeTime: 7/21/2014 11:13:23 AM, AllocationSize: 28672, EndOfFile: 24956, FileAttributes: A
11:31:50.0041397 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar SUCCESS
(четыре секунды стоит этого)
11:31:50.0700821 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\.locks\com.lmax~disruptor~3.3.0.aetherlock SUCCESS Desired Access: Write Attributes, Synchronize, Disposition: Open, Options: Synchronous IO Non-Alert, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:31:50.0701770 AM eclipse.exe 3736 SetBasicInformationFile C:\LAS\Maven\Repository\.locks\com.lmax~disruptor~3.3.0.aetherlock SUCCESS CreationTime: 0, LastAccessTime: 0, LastWriteTime: 0, ChangeTime: 0, FileAttributes: N
11:31:50.0703100 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\.locks\com.lmax~disruptor~3.3.0.aetherlock SUCCESS
11:31:59.7990517 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\.locks\xpp3~xpp3_min~1.1.4c.aetherlock SUCCESS Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:31:59.7991381 AM eclipse.exe 3736 QueryAttributeTagFile C:\LAS\Maven\Repository\.locks\xpp3~xpp3_min~1.1.4c.aetherlock SUCCESS Attributes: N, ReparseTag: 0x0
11:31:59.7991864 AM eclipse.exe 3736 SetDispositionInformationFile C:\LAS\Maven\Repository\.locks\xpp3~xpp3_min~1.1.4c.aetherlock SUCCESS Delete: True
11:31:59.7992609 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\.locks\xpp3~xpp3_min~1.1.4c.aetherlock SUCCESS
(9 второго стоит этого)
11:31:59.8364794 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\com\lmax\disruptor\3.3.0\disruptor-3.3.0-sources.jar SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:31:59.8367613 AM eclipse.exe 3736 QueryNetworkOpenInformationFile C:\LAS\Maven\Repository\com\lmax\disruptor\3.3.0\disruptor-3.3.0-sources.jar SUCCESS CreationTime: 11/18/2014 2:17:33 PM, LastAccessTime: 11/18/2014 2:17:33 PM, LastWriteTime: 11/18/2014 2:17:33 PM, ChangeTime: 11/18/2014 2:17:33 PM, AllocationSize: 81920, EndOfFile: 80291, FileAttributes: A
11:31:59.8367994 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\com\lmax\disruptor\3.3.0\disruptor-3.3.0-sources.jar SUCCESS
11:32:02.0222874 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\org\antlr\antlr-runtime\3.5\antlr-runtime-3.5.jar SUCCESS Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:32:02.0223541 AM eclipse.exe 3736 QueryNetworkOpenInformationFile C:\LAS\Maven\Repository\org\antlr\antlr-runtime\3.5\antlr-runtime-3.5.jar SUCCESS CreationTime: 7/21/2014 11:13:15 AM, LastAccessTime: 7/21/2014 11:13:15 AM, LastWriteTime: 7/21/2014 11:13:21 AM, ChangeTime: 7/21/2014 11:13:22 AM, AllocationSize: 167936, EndOfFile: 167735, FileAttributes: A
11:32:02.0223896 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\org\antlr\antlr-runtime\3.5\antlr-runtime-3.5.jar SUCCESS
(3 секунды стоит)
11:32:33.2963547 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\.locks\commons-logging~commons-logging~1.1.aetherlock SUCCESS Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:32:33.2964727 AM eclipse.exe 3736 QueryAttributeTagFile C:\LAS\Maven\Repository\.locks\commons-logging~commons-logging~1.1.aetherlock SUCCESS Attributes: N, ReparseTag: 0x0
11:32:33.2965390 AM eclipse.exe 3736 SetDispositionInformationFile C:\LAS\Maven\Repository\.locks\commons-logging~commons-logging~1.1.aetherlock SUCCESS Delete: True
11:32:33.2966382 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\.locks\commons-logging~commons-logging~1.1.aetherlock SUCCESS
11:32:33.2970685 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS Desired Access: Synchronize, Disposition: Open, Options: , Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
11:32:33.2971806 AM eclipse.exe 3736 QueryNameInformationFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS Name: \LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom
11:32:33.2972430 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS
11:32:33.2980275 AM eclipse.exe 3736 CreateFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS Desired Access: Generic Read, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Attributes: N, ShareMode: Read, Write, AllocationSize: n/a, OpenResult: Opened
11:32:33.2981528 AM eclipse.exe 3736 ReadFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS Offset: 0, Length: 4,096, Priority: Normal
11:32:33.2983145 AM eclipse.exe 3736 QueryStandardInformationFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS AllocationSize: 8,192, EndOfFile: 6,182, NumberOfLinks: 1, DeletePending: False, Directory: False
11:32:33.2983774 AM eclipse.exe 3736 ReadFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS Offset: 4,096, Length: 2,086
11:32:33.2984420 AM eclipse.exe 3736 QueryStandardInformationFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS AllocationSize: 8,192, EndOfFile: 6,182, NumberOfLinks: 1, DeletePending: False, Directory: False
11:32:33.2985057 AM eclipse.exe 3736 QueryStandardInformationFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS AllocationSize: 8,192, EndOfFile: 6,182, NumberOfLinks: 1, DeletePending: False, Directory: False
11:32:33.2987730 AM eclipse.exe 3736 CloseFile C:\LAS\Maven\Repository\commons-logging\commons-logging\1.1\commons-logging-1.1.pom SUCCESS
(30 секунд !)
Eclipse собирает все файлы JAR, необходимые для запуска виртуальной машины Java. Я не думаю, что это займет много времени; вы можете увидеть, действительно ли Eclipse читает JAR или он только проверяет, что они есть? –
У вас такая же проблема, когда вы выполняете 'mvn test' из командной строки? –
Eclipse блокирует локальный репозиторий и открывает каждый файл jar при подготовке к запуску. – Arkadiy