Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for getModelVersion (0.1 sec)

  1. compat/maven-model/src/test/java/org/apache/maven/model/v4/MavenModelVersionTest.java

            }
        }
    
        @Test
        void testV4Model() {
            assertEquals("4.0.0", new MavenModelVersion().getModelVersion(model));
        }
    
        @Test
        void testV4ModelVersion() {
            Model m = model.withModelVersion("4.1.0");
            assertEquals("4.0.0", new MavenModelVersion().getModelVersion(m));
        }
    
        @Test
        void testV4ModelRoot() {
            Model m = model.withRoot(true);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. impl/maven-core/src/main/java/org/apache/maven/internal/transformation/impl/DefaultConsumerPomBuilder.java

                }
    
                if (!model.isPreserveModelVersion()) {
                    model = model.withPreserveModelVersion(false);
                    String modelVersion = new MavenModelVersion().getModelVersion(model);
                    model = model.withModelVersion(modelVersion);
                }
            } else if (BOM_PACKAGING.equals(packaging)) {
                DependencyManagement dependencyManagement =
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 11K bytes
    - Viewed (0)
  3. compat/maven-compat/src/test/java/org/apache/maven/project/inheritance/t00/ProjectInheritanceTest.java

            // Value taken from super model
            // ----------------------------------------------------------------------
    
            assertEquals("4.0.0", p4.getModelVersion());
    
            assertEquals("4.0.0", p4.getModelVersion());
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  4. compat/maven-model/src/test/java/org/apache/maven/model/merge/MavenMergerTest.java

            source.setModelVersion( "SOURCE" );
    
            modelMerger.merge( target, source, true, null );
            assertThat( target.getModelVersion(), is( "SOURCE" ) );
    
            target.setModelVersion( "TARGET" );;
            modelMerger.merge( target, source, false, null );
            assertThat( target.getModelVersion(), is( "TARGET" ) );
        }
    
        @Test
        public void mergeSameModules()
        {
            Model target = new Model();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  5. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/BuildModelSourceTransformer.java

        }
    
        //
        // Infer modelVersion from namespace URI
        //
        void handleModelVersion(Model model) {
            String namespace = model.getDelegate().getNamespaceUri();
            if (model.getModelVersion() == null && namespace != null && namespace.startsWith(NAMESPACE_PREFIX)) {
                model.setModelVersion(namespace.substring(NAMESPACE_PREFIX.length()));
            }
        }
    
        //
        // Infer parent information
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. compat/maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java

            validateStringNotEmpty("modelVersion", problems, Severity.ERROR, Version.V20, m.getModelVersion(), m);
    
            validateModelVersion(problems, m.getModelVersion(), m, VALID_MODEL_VERSIONS);
    
            String minVersion = new MavenModelVersion().getModelVersion(m);
            if (m.getModelVersion() != null && compareModelVersions(minVersion, m.getModelVersion()) > 0) {
                addViolation(
                        problems,
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 77.1K bytes
    - Viewed (0)
  7. impl/maven-core/src/main/java/org/apache/maven/internal/transformation/impl/DefaultConsumerPomArtifactTransformer.java

                }
                artifacts = result;
            }
            return artifacts;
        }
    
        void write(Model model, Path dest) throws IOException, XMLStreamException {
            String version = model.getModelVersion();
            Files.createDirectories(dest.getParent());
            try (Writer w = Files.newBufferedWriter(dest)) {
                MavenStaxWriter writer = new MavenStaxWriter();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. compat/maven-compat/src/test/java/org/apache/maven/project/inheritance/t02/ProjectInheritanceTest.java

            // Value taken from super model
            // ----------------------------------------------------------------------
    
            assertEquals("4.0.0", project4.getModelVersion());
    
            Build build = project4.getBuild();
            List<Plugin> plugins = build.getPlugins();
    
            Map<String, Integer> validPluginCounts = new HashMap<>();
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  9. compat/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/reflection/ReflectionValueExtractorTest.java

            public void setVersion(String version) {
                this.version = version;
            }
    
            public Scm getScm() {
                return scm;
            }
    
            public String getModelVersion() {
                return modelVersion;
            }
    
            public String getGroupId() {
                return groupId;
            }
    
            public List<Dependency> getDependencies() {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 16.9K bytes
    - Viewed (0)
  10. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java

            problems.setRootModel(inputModel);
    
            ModelData resultData = new ModelData(request.getModelSource(), inputModel);
            String superModelVersion =
                    inputModel.getModelVersion() != null ? inputModel.getModelVersion() : MODEL_VERSION_4_0_0;
            if (!DefaultModelValidator.VALID_MODEL_VERSIONS.contains(superModelVersion)) {
                // Maven 3.x is always using 4.0.0 version to load the supermodel, so
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 83.6K bytes
    - Viewed (0)
Back to top