Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for isApplicable (0.04 sec)

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

                when(mockStrategies.get(0).isApplicable(context)).thenReturn(true);
                when(mockStrategies.get(0).apply(Mockito.eq(context), Mockito.any()))
                        .thenReturn(UpgradeResult.empty());
    
                when(mockStrategies.get(1).isApplicable(context)).thenReturn(false);
                when(mockStrategies.get(2).isApplicable(context)).thenReturn(false);
    
    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/CompatibilityFixStrategyTest.java

                when(options.all()).thenReturn(Optional.empty());
    
                UpgradeContext context = createMockContext(options);
    
                assertTrue(strategy.isApplicable(context), "Strategy should be applicable when --model is true");
            }
    
            @Test
            @DisplayName("should be applicable when --all option is specified")
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 12.6K bytes
    - Viewed (0)
  3. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/PluginUpgradeStrategyTest.java

                when(options.all()).thenReturn(Optional.empty());
    
                UpgradeContext context = createMockContext(options);
    
                assertTrue(strategy.isApplicable(context), "Strategy should be applicable when --plugins is true");
            }
    
            @Test
            @DisplayName("should be applicable when --all option is specified")
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 27.8K bytes
    - Viewed (0)
  4. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/InferenceStrategyTest.java

                when(options.all()).thenReturn(Optional.empty());
    
                UpgradeContext context = createMockContext(options);
    
                assertTrue(strategy.isApplicable(context), "Strategy should be applicable when --infer is true");
            }
    
            @Test
            @DisplayName("should be applicable when --all option is specified")
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 35.2K bytes
    - Viewed (0)
  5. impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/mvnup/goals/ModelUpgradeStrategyTest.java

                UpgradeContext context = TestUtils.createMockContext(TestUtils.createOptions(all, null, null, null, model));
    
                boolean isApplicable = strategy.isApplicable(context);
    
                assertEquals(expectedApplicable, isApplicable, description);
            }
    
            private static Stream<Arguments> provideApplicabilityScenarios() {
                return Stream.of(
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 38.8K bytes
    - Viewed (0)
  6. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/UpgradeStrategy.java

        /**
         * Checks if this strategy is applicable given the current options.
         *
         * @param context the upgrade context
         * @return true if this strategy should be applied
         */
        boolean isApplicable(UpgradeContext context);
    
        /**
         * Helper method to check if a specific option is enabled, considering --all flag and defaults.
         *
         * @param options the upgrade options
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  7. compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/MethodMap.java

         */
        private static LinkedList<Method> getApplicables(List<Method> methods, Class<?>... classes) {
            LinkedList<Method> list = new LinkedList<>();
    
            for (Method method : methods) {
                if (isApplicable(method, classes)) {
                    list.add(method);
                }
            }
            return list;
        }
    
        /**
         * Returns true if the supplied method is applicable to actual
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Feb 25 08:27:34 UTC 2025
    - 14.2K bytes
    - Viewed (0)
  8. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/StrategyOrchestrator.java

            // Filter and execute applicable strategies
            List<UpgradeStrategy> applicableStrategies = strategies.stream()
                    .filter(strategy -> strategy.isApplicable(context))
                    .toList();
    
            if (applicableStrategies.isEmpty()) {
                context.warning("No applicable upgrade strategies found");
                return overallResult;
            }
    
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 7K bytes
    - Viewed (0)
  9. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/ModelUpgradeStrategy.java

    @Priority(40)
    public class ModelUpgradeStrategy extends AbstractUpgradeStrategy {
    
        public ModelUpgradeStrategy() {
            // Target model version will be determined from context
        }
    
        @Override
        public boolean isApplicable(UpgradeContext context) {
            UpgradeOptions options = getOptions(context);
    
            // Handle --all option (overrides individual options)
            if (options.all().orElse(false)) {
                return true;
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  10. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnup/goals/CompatibilityFixStrategy.java

     * Fixes issues that prevent POMs from being processed by Maven 4.
     */
    @Named
    @Singleton
    @Priority(20)
    public class CompatibilityFixStrategy extends AbstractUpgradeStrategy {
    
        @Override
        public boolean isApplicable(UpgradeContext context) {
            UpgradeOptions options = getOptions(context);
    
            // Handle --all option (overrides individual options)
            boolean useAll = options.all().orElse(false);
            if (useAll) {
    Registered: Sun Dec 28 03:35:09 UTC 2025
    - Last Modified: Tue Nov 18 18:03:26 UTC 2025
    - 22.2K bytes
    - Viewed (0)
Back to top