Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 44 for normalize (0.17 sec)

  1. compat/maven-model-builder/src/test/java/org/apache/maven/model/path/DefaultUrlNormalizerTest.java

     */
    class DefaultUrlNormalizerTest {
    
        private UrlNormalizer normalizer = new DefaultUrlNormalizer();
    
        private String normalize(String url) {
            return normalizer.normalize(url);
        }
    
        @Test
        void testNullSafe() {
            assertNull(normalize(null));
        }
    
        @Test
        void testTrailingSlash() {
            assertEquals("", normalize(""));
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. compat/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultModelUrlNormalizer.java

        }
    
        @Override
        public void normalize(Model model, ModelBuildingRequest request) {
            if (model == null) {
                return;
            }
    
            model.setUrl(normalize(model.getUrl()));
    
            Scm scm = model.getScm();
            if (scm != null) {
                scm.setUrl(normalize(scm.getUrl()));
                scm.setConnection(normalize(scm.getConnection()));
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.4K bytes
    - Viewed (1)
  3. compat/maven-model-builder/src/main/java/org/apache/maven/model/path/UrlNormalizer.java

         * @return The normalized URL or {@code null} if the input was {@code null}.
         */
        String normalize(String url);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  4. compat/maven-model-builder/src/main/java/org/apache/maven/model/path/ModelUrlNormalizer.java

         * @param request The model building request that holds further settings, must not be {@code null}.
         */
        void normalize(Model model, ModelBuildingRequest request);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  5. compat/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultPathTranslator.java

                path = path.replace('\\', File.separatorChar).replace('/', File.separatorChar);
    
                File file = new File(path);
                if (file.isAbsolute()) {
                    // path was already absolute, just normalize file separator and we're done
                    result = file.getPath();
                } else if (file.getPath().startsWith(File.separator)) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/UrlNormalizingPostProcessor.java

        }
    
        private UrlNormalizer normalizer;
    
        UrlNormalizingPostProcessor(UrlNormalizer normalizer) {
            this.normalizer = normalizer;
        }
    
        @Override
        public Object execute(String expression, Object value) {
            if (value != null && URL_EXPRESSIONS.contains(expression)) {
                return normalizer.normalize(value.toString());
            }
    
            return null;
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. compat/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java

                return null;
            }
    
            String s = stripBasedirToken(path);
    
            File file = new File(s);
            if (file.isAbsolute()) {
                // path was already absolute, just normalize file separator and we're done
                s = file.getPath();
            } else if (file.getPath().startsWith(File.separator)) {
                // drive-relative Windows path, don't align with project directory but with drive root
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  8. compat/maven-model-builder/src/main/java/org/apache/maven/model/building/BuildModelSourceTransformer.java

            if (Files.isDirectory(pomPath)) {
                pomPath = context.locate(pomPath);
            }
    
            if (pomPath == null || !Files.isRegularFile(pomPath)) {
                return Optional.empty();
            }
    
            Optional<RelativeProject> mappedProject = Optional.ofNullable(context.getRawModel(pomFile, pomPath.normalize()))
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  9. compat/maven-model-builder/src/main/java/org/apache/maven/model/path/DefaultUrlNormalizer.java

    import javax.inject.Named;
    import javax.inject.Singleton;
    
    /**
     * Normalizes a URL.
     *
     * @deprecated use {@link org.apache.maven.api.services.ModelBuilder} instead
     */
    @Named
    @Singleton
    @Deprecated(since = "4.0.0")
    public class DefaultUrlNormalizer implements UrlNormalizer {
    
        @Override
        public String normalize(String url) {
            String result = url;
    
            if (result != null) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  10. compat/maven-embedder/src/main/java/org/apache/maven/cli/ResolveFile.java

            } else if (file.getPath().startsWith(File.separator)) {
                // drive-relative Windows path
                return file.getAbsoluteFile();
            } else {
                return Paths.get(baseDirectory, file.getPath()).normalize().toFile();
            }
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 1.4K bytes
    - Viewed (0)
Back to top