diff --git a/src/crufty/artifact_type.rs b/src/crufty/artifact_type.rs index 6a632a8..5bedb5e 100644 --- a/src/crufty/artifact_type.rs +++ b/src/crufty/artifact_type.rs @@ -3,6 +3,7 @@ pub enum ArtifactType { Rust, Scala, + JavaMaven, Custom { pattern: &'static str, name: &'static str, @@ -10,8 +11,12 @@ pub enum ArtifactType { }, } -pub fn builtin() -> [ArtifactType; 2] { - [ArtifactType::Rust, ArtifactType::Scala] +pub fn builtin() -> [ArtifactType; 3] { + [ + ArtifactType::Rust, + ArtifactType::Scala, + ArtifactType::JavaMaven, + ] } impl ArtifactType { @@ -19,6 +24,7 @@ impl ArtifactType { match self { ArtifactType::Rust => "**/target", ArtifactType::Scala => "**/target", + ArtifactType::JavaMaven => "**/target", ArtifactType::Custom { pattern, .. } => pattern, } } @@ -27,6 +33,7 @@ impl ArtifactType { match self { ArtifactType::Rust => "Rust", ArtifactType::Scala => "Scala", + ArtifactType::JavaMaven => "Java", ArtifactType::Custom { name, .. } => name, } } @@ -35,6 +42,7 @@ impl ArtifactType { match self { ArtifactType::Rust => vec!["Cargo.toml".to_string()], ArtifactType::Scala => vec!["build.sbt".to_string()], + ArtifactType::JavaMaven => vec!["pom.xml".to_string()], ArtifactType::Custom { files, .. } => { files.iter().map(|s| s.to_string()).collect() }