Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for UpgradeResult (0.99 sec)

  1. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/StrategyOrchestratorTest.java

                    when(strategy.isApplicable(context)).thenReturn(true);
                    when(strategy.apply(Mockito.eq(context), Mockito.any())).thenReturn(UpgradeResult.empty());
                }
    
                UpgradeResult result = orchestrator.executeStrategies(context, pomMap);
    
                assertTrue(result.success(), "Orchestrator should succeed when all strategies succeed");
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 12.3K bytes
    - Viewed (0)
  2. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategyTest.java

                Document document = Document.of(pomXml);
                Map<Path, Document> pomMap = Map.of(Paths.get("pom.xml"), document);
    
                UpgradeContext context = createMockContext();
                UpgradeResult result = strategy.doApply(context, pomMap);
    
                assertTrue(result.success(), "Plugin upgrade should succeed");
                // Note: POM may or may not be modified depending on whether upgrades are needed
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 27.8K bytes
    - Viewed (0)
  3. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/AbstractUpgradeGoalTest.java

                // Mock successful strategy execution
                when(mockOrchestrator.executeStrategies(Mockito.any(), Mockito.any()))
                        .thenReturn(UpgradeResult.empty());
    
                // Execute with target model 4.0.0 (should create .mvn directory)
                upgradeGoal.testExecuteWithTargetModel(context, "4.0.0");
    
                Path mvnDir = projectDir.resolve(".mvn");
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 13.7K bytes
    - Viewed (0)
  4. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/ModelUpgradeStrategyTest.java

                pomMap.put(Paths.get("pom.xml"), document);
    
                UpgradeContext context = createMockContext(TestUtils.createOptionsWithModelVersion(targetModelVersion));
    
                UpgradeResult result = strategy.doApply(context, pomMap);
    
                assertTrue(result.success(), "Model upgrade should succeed: " + description);
                assertEquals(expectedModifiedCount, result.modifiedCount(), description);
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 38.8K bytes
    - Viewed (0)
  5. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategyTest.java

                Document document = Document.of(pomXml);
                Map<Path, Document> pomMap = Map.of(Paths.get("pom.xml"), document);
    
                UpgradeContext context = createMockContext();
                UpgradeResult result = strategy.doApply(context, pomMap);
    
                assertTrue(result.success(), "Compatibility fix should succeed");
                assertTrue(result.modifiedCount() > 0, "Should have removed duplicate dependency");
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  6. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/ModelUpgradeStrategy.java

            return !MODEL_VERSION_4_0_0.equals(targetModel);
        }
    
        @Override
        public String getDescription() {
            return "Upgrading POM model version";
        }
    
        @Override
        public UpgradeResult doApply(UpgradeContext context, Map<Path, Document> pomMap) {
            String targetModelVersion = determineTargetModelVersion(context);
    
            Set<Path> processedPoms = new HashSet<>();
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  7. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java

            }
    
            return false;
        }
    
        @Override
        public String getDescription() {
            return "Applying Maven 4 compatibility fixes";
        }
    
        @Override
        public UpgradeResult doApply(UpgradeContext context, Map<Path, Document> pomMap) {
            Set<Path> processedPoms = new HashSet<>();
            Set<Path> modifiedPoms = new HashSet<>();
            Set<Path> errorPoms = new HashSet<>();
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 22.2K bytes
    - Viewed (0)
  8. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategy.java

            }
    
            return false;
        }
    
        @Override
        public String getDescription() {
            return "Applying Maven inference optimizations";
        }
    
        @Override
        public UpgradeResult doApply(UpgradeContext context, Map<Path, Document> pomMap) {
            Set<Path> processedPoms = new HashSet<>();
            Set<Path> modifiedPoms = new HashSet<>();
            Set<Path> errorPoms = new HashSet<>();
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 27.6K bytes
    - Viewed (0)
  9. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategy.java

        }
    
        @Override
        public String getDescription() {
            return "Upgrading Maven plugins to recommended versions";
        }
    
        @Override
        public UpgradeResult doApply(UpgradeContext context, Map<Path, Document> pomMap) {
            Set<Path> processedPoms = new HashSet<>();
            Set<Path> modifiedPoms = new HashSet<>();
            Set<Path> errorPoms = new HashSet<>();
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 37K bytes
    - Viewed (0)
  10. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/AbstractUpgradeGoal.java

         */
        protected int doUpgrade(UpgradeContext context, String targetModel, Map<Path, Document> pomMap) {
            // Execute strategies using the orchestrator
            try {
                UpgradeResult result = orchestrator.executeStrategies(context, pomMap);
    
                // Create .mvn directory if needed to avoid root directory warnings
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 12.5K bytes
    - Viewed (0)
Back to top