Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for toSnapshotVersion (0.12 sec)

  1. compat/maven-artifact/src/test/java/org/apache/maven/artifact/ArtifactUtilsTest.java

        void testToSnapshotVersion() {
            assertEquals("1.2.3", ArtifactUtils.toSnapshotVersion("1.2.3"));
            assertEquals("1.2.3-SNAPSHOT", ArtifactUtils.toSnapshotVersion("1.2.3-SNAPSHOT"));
            assertEquals("1.2.3-SNAPSHOT", ArtifactUtils.toSnapshotVersion("1.2.3-20090413.094722-2"));
            assertEquals("1.2.3-20090413X094722-2", ArtifactUtils.toSnapshotVersion("1.2.3-20090413X094722-2"));
        }
    
        /**
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. compat/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java

        public void setBaseVersion(String baseVersion) {
            setBaseVersionInternal(baseVersion);
        }
    
        protected void setBaseVersionInternal(String baseVersion) {
            this.baseVersion = ArtifactUtils.toSnapshotVersion(baseVersion);
        }
    
        @Override
        public int compareTo(Artifact a) {
            int result = groupId.compareTo(a.getGroupId());
            if (result == 0) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  3. compat/maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java

                    return true;
                } else {
                    return Artifact.VERSION_FILE_PATTERN.matcher(version).matches();
                }
            }
            return false;
        }
    
        public static String toSnapshotVersion(String version) {
            notBlank(version, "version can neither be null, empty nor blank");
    
            int lastHyphen = version.lastIndexOf('-');
            if (lastHyphen > 0) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  4. impl/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java

        }
    
        private static String getKey(Plugin plugin, boolean extension) {
            String version = ArtifactUtils.toSnapshotVersion(plugin.getVersion());
            return (extension ? "extension>" : "plugin>") + plugin.getGroupId() + ":" + plugin.getArtifactId() + ":"
                    + version;
        }
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13.4K bytes
    - Viewed (0)
Back to top