Updane new aknot
This commit is contained in:
parent
42dd73995e
commit
381980372e
@ -1,27 +1,31 @@
|
||||
package org.atriasoft.island.model;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
@AknotDefaultAttribute
|
||||
public class Volatile {
|
||||
private String address;
|
||||
private String path;
|
||||
|
||||
@XmlName({"address", "path"})
|
||||
@AknotName({ "address", "path" })
|
||||
public Volatile(final String gitAddress, final String path) {
|
||||
this.address = gitAddress;
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return this.address;
|
||||
}
|
||||
public void setAddress(final String gitAddress) {
|
||||
this.address = gitAddress;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
public void setAddress(final String gitAddress) {
|
||||
this.address = gitAddress;
|
||||
}
|
||||
|
||||
public void setPath(final String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
@ -1,50 +1,31 @@
|
||||
package org.atriasoft.island.model.manifest;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
@AknotDefaultAttribute
|
||||
public class Artifactory {
|
||||
private String name; // Local name of the remote.
|
||||
private String fetch; // Address to fetch.
|
||||
private String type; // type of artifactory (default maven to update later ...)
|
||||
|
||||
@XmlName({"name", "fetch", "type"})
|
||||
public Artifactory(final String name, final String fetch, final String type) {
|
||||
this.name = name;
|
||||
this.fetch = fetch;
|
||||
this.type = type;
|
||||
}
|
||||
@XmlName({"name", "fetch"})
|
||||
public Artifactory(final String name, final String fetch) {
|
||||
this.name = name;
|
||||
this.fetch = fetch;
|
||||
this.type = "maven";
|
||||
}
|
||||
public Artifactory() {
|
||||
this.name = "";
|
||||
this.fetch = "";
|
||||
this.type = "maven";
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
public void setName(final String name) {
|
||||
@AknotName({ "name", "fetch" })
|
||||
public Artifactory(final String name, final String fetch) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getFetch() {
|
||||
return this.fetch;
|
||||
}
|
||||
public void setFetch(final String fetch) {
|
||||
this.fetch = fetch;
|
||||
this.type = "maven";
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
public void setType(final String type) {
|
||||
@AknotName({ "name", "fetch", "type" })
|
||||
public Artifactory(final String name, final String fetch, final String type) {
|
||||
this.name = name;
|
||||
this.fetch = fetch;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@ -54,5 +35,28 @@ public class Artifactory {
|
||||
return new Artifactory(this.name, this.fetch, this.type);
|
||||
}
|
||||
|
||||
public String getFetch() {
|
||||
return this.fetch;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public void setFetch(final String fetch) {
|
||||
this.fetch = fetch;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setType(final String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
}
|
@ -6,106 +6,26 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
||||
import org.atriasoft.aknot.annotation.AknotList;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.exml.Exml;
|
||||
import org.atriasoft.exml.annotation.XmlList;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.exception.ExmlBuilderException;
|
||||
import org.atriasoft.exml.exception.ExmlException;
|
||||
import org.atriasoft.island.Env;
|
||||
import org.atriasoft.island.internal.Log;
|
||||
import org.atriasoft.island.model.Volatile;
|
||||
|
||||
public class ConfigManifest {
|
||||
|
||||
private String repo = "";
|
||||
private String branch = "master";
|
||||
private String manifestName = "default.xml";
|
||||
private List<Volatile> volatiles = new ArrayList<>();
|
||||
private List<Link> links = new ArrayList<>();
|
||||
|
||||
public ConfigManifest() {
|
||||
}
|
||||
|
||||
public String getRepo() {
|
||||
return this.repo;
|
||||
}
|
||||
public void setRepo(final String repo) {
|
||||
this.repo = repo;
|
||||
}
|
||||
public String getBranch() {
|
||||
return this.branch;
|
||||
}
|
||||
public void setBranch(final String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
@XmlName(value="manifest-name")
|
||||
public String getManifestName() {
|
||||
return this.manifestName;
|
||||
}
|
||||
public void setManifestName(final String manifestName) {
|
||||
this.manifestName = manifestName;
|
||||
}
|
||||
@XmlList(value="volatile")
|
||||
public List<Volatile> getVolatiles() {
|
||||
return this.volatiles;
|
||||
}
|
||||
public void setVolatiles(final List<Volatile> volatiles) {
|
||||
this.volatiles = volatiles;
|
||||
}
|
||||
public void addVolatile(final String gitAddress, final String path) {
|
||||
rmVolatile(path);
|
||||
this.volatiles.add(new Volatile(gitAddress, path));
|
||||
}
|
||||
public void rmVolatile(final String path) {
|
||||
ListIterator<Volatile> it = this.volatiles.listIterator();
|
||||
while (it.hasNext()) {
|
||||
Volatile elem = it.next();
|
||||
if (elem.getPath().equals(path)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean existVolatile(final String path) {
|
||||
ListIterator<Volatile> it = this.volatiles.listIterator();
|
||||
while (it.hasNext()) {
|
||||
Volatile elem = it.next();
|
||||
if (elem.getPath().equals(path)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@XmlList(value="link")
|
||||
public List<Link> getLinks() {
|
||||
return this.links;
|
||||
}
|
||||
public void setLinks(final List<Link> curentLink) {
|
||||
this.links = curentLink;
|
||||
}
|
||||
public void addLink(final String source, final String destination) {
|
||||
rmLink(destination);
|
||||
this.links.add(new Link(source, destination));
|
||||
}
|
||||
private void rmLink(final String destination) {
|
||||
ListIterator<Link> it = this.links.listIterator();
|
||||
while (it.hasNext()) {
|
||||
Link elem = it.next();
|
||||
if (elem.getDestination().equals(destination)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ConfigManifest load() {
|
||||
return ConfigManifest.load(Env.getIslandPathConfig());
|
||||
}
|
||||
|
||||
public static ConfigManifest load(final Path path) {
|
||||
ConfigManifest[] root = null;
|
||||
try {
|
||||
root = Exml.parse(path, ConfigManifest.class, "config-island");
|
||||
} catch (ExmlBuilderException e) {
|
||||
Log.error("Can not parse the file.1. " + path);
|
||||
e.printStackTrace();
|
||||
} catch (ExmlException e) {
|
||||
} catch (final ExmlException e) {
|
||||
Log.error("Can not parse the file.1. " + path);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -114,34 +34,32 @@ public class ConfigManifest {
|
||||
}
|
||||
return root[0];
|
||||
}
|
||||
public void store() {
|
||||
try {
|
||||
store(Env.getIslandPathConfig());
|
||||
} catch (ExmlBuilderException e) {
|
||||
Log.error("Can not store the configuration ... ");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void store(final Path path) throws ExmlBuilderException {
|
||||
try {
|
||||
Exml.store(path, this, "config-island");
|
||||
} catch (ExmlException ex) {
|
||||
Log.warning("detect throw: " + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
} catch (IOException ex) {
|
||||
Log.warning("detect throw: " + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
|
||||
private String repo = "";
|
||||
private String branch = "master";
|
||||
private String manifestName = "default.xml";
|
||||
|
||||
private List<Volatile> volatiles = new ArrayList<>();
|
||||
|
||||
private List<Link> links = new ArrayList<>();
|
||||
|
||||
public ConfigManifest() {}
|
||||
|
||||
public void addLink(final String source, final String destination) {
|
||||
rmLink(destination);
|
||||
this.links.add(new Link(source, destination));
|
||||
}
|
||||
|
||||
public void addVolatile(final String gitAddress, final String path) {
|
||||
rmVolatile(path);
|
||||
this.volatiles.add(new Volatile(gitAddress, path));
|
||||
}
|
||||
|
||||
public String createAdressGitRepo(final String fetch, final String name) {
|
||||
|
||||
// check if it is a directAdress:
|
||||
if (fetch.startsWith("git@")
|
||||
|| fetch.startsWith("http://")
|
||||
|| fetch.startsWith("https://")) {
|
||||
if (fetch.startsWith("git@")
|
||||
&& fetch.substring(4).split(":").length <= 1) {
|
||||
if (fetch.startsWith("git@") || fetch.startsWith("http://") || fetch.startsWith("https://")) {
|
||||
if (fetch.startsWith("git@") && fetch.substring(4).split(":").length <= 1) {
|
||||
return fetch + ":" + name;
|
||||
}
|
||||
return fetch + "/" + name;
|
||||
@ -152,7 +70,7 @@ public class ConfigManifest {
|
||||
while (offsetFetch.startsWith("..")) {
|
||||
if (offsetFetch.startsWith("../")) {
|
||||
offsetFetch = offsetFetch.substring(3);
|
||||
} else if (offsetFetch.equals("..")){
|
||||
} else if (offsetFetch.equals("..")) {
|
||||
offsetFetch = offsetFetch.substring(2);
|
||||
} else {
|
||||
break;
|
||||
@ -171,7 +89,99 @@ public class ConfigManifest {
|
||||
|
||||
}
|
||||
|
||||
public boolean existVolatile(final String path) {
|
||||
final ListIterator<Volatile> it = this.volatiles.listIterator();
|
||||
while (it.hasNext()) {
|
||||
final Volatile elem = it.next();
|
||||
if (elem.getPath().equals(path)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getBranch() {
|
||||
return this.branch;
|
||||
}
|
||||
|
||||
@AknotList(value = "link")
|
||||
public List<Link> getLinks() {
|
||||
return this.links;
|
||||
}
|
||||
|
||||
public ProjectConfig getManifestConfig() {
|
||||
return new ProjectConfig("manifest", Env.getIslandPathManifest().resolve(getManifestName()).toString());
|
||||
}
|
||||
|
||||
@AknotName(value = "manifest-name")
|
||||
public String getManifestName() {
|
||||
return this.manifestName;
|
||||
}
|
||||
|
||||
public String getRepo() {
|
||||
return this.repo;
|
||||
}
|
||||
|
||||
@AknotList(value = "volatile")
|
||||
public List<Volatile> getVolatiles() {
|
||||
return this.volatiles;
|
||||
}
|
||||
|
||||
private void rmLink(final String destination) {
|
||||
final ListIterator<Link> it = this.links.listIterator();
|
||||
while (it.hasNext()) {
|
||||
final Link elem = it.next();
|
||||
if (elem.getDestination().equals(destination)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void rmVolatile(final String path) {
|
||||
final ListIterator<Volatile> it = this.volatiles.listIterator();
|
||||
while (it.hasNext()) {
|
||||
final Volatile elem = it.next();
|
||||
if (elem.getPath().equals(path)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setBranch(final String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
|
||||
public void setLinks(final List<Link> curentLink) {
|
||||
this.links = curentLink;
|
||||
}
|
||||
|
||||
public void setManifestName(final String manifestName) {
|
||||
this.manifestName = manifestName;
|
||||
}
|
||||
|
||||
public void setRepo(final String repo) {
|
||||
this.repo = repo;
|
||||
}
|
||||
|
||||
public void setVolatiles(final List<Volatile> volatiles) {
|
||||
this.volatiles = volatiles;
|
||||
}
|
||||
|
||||
public void store() {
|
||||
try {
|
||||
store(Env.getIslandPathConfig());
|
||||
} catch (final ExmlBuilderException e) {
|
||||
Log.error("Can not store the configuration ... ");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void store(final Path path) throws ExmlBuilderException {
|
||||
try {
|
||||
Exml.store(path, this, "config-island");
|
||||
} catch (final ExmlException | IOException ex) {
|
||||
Log.warning("detect throw: " + ex.getMessage());
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,29 +1,30 @@
|
||||
package org.atriasoft.island.model.manifest;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
public record Dependency (
|
||||
@AknotDefaultAttribute
|
||||
public record Dependency(
|
||||
String org,
|
||||
String name,
|
||||
@XmlOptional String revision,
|
||||
@XmlOptional String remote) { // TODO this is a big mistake for xml , can not parse multiple type... use @XmlOptionnal(nullDefaultValue=true)
|
||||
@AknotOptional String revision,
|
||||
@AknotOptional String remote) { // TODO this is a big mistake for xml , can not parse multiple type... use @XmlOptionnal(nullDefaultValue=true)
|
||||
|
||||
@XmlName({"org", "name", "rev", "remote"})
|
||||
@AknotName({ "org", "name", "rev", "remote" })
|
||||
public Dependency(final String org, final String name, final String revision, final String remote) {
|
||||
this.org = org;
|
||||
this.name = name;
|
||||
this.revision = revision;
|
||||
this.remote = remote==null?"default":remote;
|
||||
this.remote = remote == null ? "default" : remote;
|
||||
}
|
||||
@XmlName({"org", "name", "rev"})
|
||||
|
||||
@AknotName({ "org", "name", "rev" })
|
||||
public Dependency(final String org, final String name, final String revision) {
|
||||
this(org, name, revision, null);
|
||||
}
|
||||
|
||||
@XmlName({"org", "name"})
|
||||
@AknotName({ "org", "name" })
|
||||
public Dependency(final String org, final String name) {
|
||||
this(org, name, null, null);
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
package org.atriasoft.island.model.manifest;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
@AknotDefaultAttribute
|
||||
public class Link {
|
||||
private String source;
|
||||
private String destination;
|
||||
|
@ -4,12 +4,12 @@ import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlIgnoreUnknow;
|
||||
import org.atriasoft.exml.annotation.XmlList;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotIgnoreUnknown;
|
||||
import org.atriasoft.aknot.annotation.AknotList;
|
||||
import org.atriasoft.aknot.annotation.AknotManaged;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
|
||||
@XmlIgnoreUnknow
|
||||
@AknotIgnoreUnknown
|
||||
public class ManifestFile {
|
||||
private Path fileRealPath = null;
|
||||
private List<ProjectConfig> projects = new ArrayList<>();
|
||||
@ -20,28 +20,28 @@ public class ManifestFile {
|
||||
private OptionRepository options = null;
|
||||
private List<Link> links = new ArrayList<>();
|
||||
|
||||
@XmlName("artefactory")
|
||||
@AknotName("artefactory")
|
||||
public List<Artifactory> getArtefactories() {
|
||||
return this.artefactories;
|
||||
}
|
||||
|
||||
@XmlName(value = "dependencies")
|
||||
@XmlList(value = "dependency")
|
||||
@AknotName(value = "dependencies")
|
||||
@AknotList(value = "dependency")
|
||||
public List<Dependency> getDependencies() {
|
||||
return this.dependencies;
|
||||
}
|
||||
|
||||
@XmlManaged(false)
|
||||
@AknotManaged(false)
|
||||
public Path getFileRealPath() {
|
||||
return this.fileRealPath;
|
||||
}
|
||||
|
||||
@XmlName(value = "include")
|
||||
@AknotName(value = "include")
|
||||
public List<String> getIncludes() {
|
||||
return this.includes;
|
||||
}
|
||||
|
||||
@XmlName(value = "link")
|
||||
@AknotName(value = "link")
|
||||
public List<Link> getLinks() {
|
||||
return this.links;
|
||||
}
|
||||
@ -50,12 +50,12 @@ public class ManifestFile {
|
||||
return this.options;
|
||||
}
|
||||
|
||||
@XmlName(value = "project")
|
||||
@AknotName(value = "project")
|
||||
public List<ProjectConfig> getProjects() {
|
||||
return this.projects;
|
||||
}
|
||||
|
||||
@XmlName(value = "remote")
|
||||
@AknotName(value = "remote")
|
||||
public List<RemoteConfig> getRemotes() {
|
||||
return this.remotes;
|
||||
}
|
||||
|
@ -1,30 +1,33 @@
|
||||
package org.atriasoft.island.model.manifest;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
@AknotDefaultAttribute
|
||||
public class MirrorConfig {
|
||||
private String name;
|
||||
private String fetch;
|
||||
|
||||
@XmlName({"name", "fetch"})
|
||||
@AknotName({ "name", "fetch" })
|
||||
public MirrorConfig(final String name, final String fetch) {
|
||||
this.name = name;
|
||||
this.fetch = fetch;
|
||||
}
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getFetch() {
|
||||
return this.fetch;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setFetch(final String fetch) {
|
||||
this.fetch = fetch;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
package org.atriasoft.island.model.manifest;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
|
||||
public class OptionRepository {
|
||||
private String branchRelease;
|
||||
@ -10,7 +10,6 @@ public class OptionRepository {
|
||||
private String defaultRemote;
|
||||
private boolean synchronizeSubmodule;
|
||||
|
||||
|
||||
public OptionRepository() {
|
||||
this.branchRelease = "master";
|
||||
this.branchDevelop = "dev";
|
||||
@ -19,7 +18,9 @@ public class OptionRepository {
|
||||
this.defaultRemote = "origin";
|
||||
this.synchronizeSubmodule = false;
|
||||
}
|
||||
public OptionRepository(final String branchRelease, final String branchDevelop, final DeliverMode deliverMode, final String defaultBranch, final String defaultRemote, final boolean synchronizeSubmodule) {
|
||||
|
||||
public OptionRepository(final String branchRelease, final String branchDevelop, final DeliverMode deliverMode, final String defaultBranch, final String defaultRemote,
|
||||
final boolean synchronizeSubmodule) {
|
||||
this.branchRelease = branchRelease;
|
||||
this.branchDevelop = branchDevelop;
|
||||
this.deliverMode = deliverMode;
|
||||
@ -27,65 +28,71 @@ public class OptionRepository {
|
||||
this.defaultRemote = defaultRemote;
|
||||
this.synchronizeSubmodule = synchronizeSubmodule;
|
||||
}
|
||||
@XmlName(value="branch-release")
|
||||
public String getBranchRelease() {
|
||||
return this.branchRelease;
|
||||
}
|
||||
public void setBranchRelease(final String branchRelease) {
|
||||
this.branchRelease = branchRelease;
|
||||
|
||||
@Override
|
||||
public OptionRepository clone() {
|
||||
// TODO Auto-generated method stub
|
||||
return new OptionRepository(this.branchRelease, this.branchDevelop, this.deliverMode, this.defaultBranch, this.defaultRemote, this.synchronizeSubmodule);
|
||||
}
|
||||
|
||||
@XmlName(value="branch-develop")
|
||||
@AknotName(value = "branch-develop")
|
||||
public String getBranchDevelop() {
|
||||
return this.branchDevelop;
|
||||
}
|
||||
|
||||
@AknotName(value = "branch-release")
|
||||
public String getBranchRelease() {
|
||||
return this.branchRelease;
|
||||
}
|
||||
|
||||
@AknotName(value = "default-branch")
|
||||
public String getDefaultBranch() {
|
||||
return this.defaultBranch;
|
||||
}
|
||||
|
||||
@AknotName(value = "default-remote")
|
||||
public String getDefaultRemote() {
|
||||
return this.defaultRemote;
|
||||
}
|
||||
|
||||
@AknotName(value = "deliver-mode")
|
||||
public DeliverMode getDeliverMode() {
|
||||
return this.deliverMode;
|
||||
}
|
||||
|
||||
@AknotName(value = "synchronize-submodule")
|
||||
public boolean isSynchronizeSubmodule() {
|
||||
return this.synchronizeSubmodule;
|
||||
}
|
||||
|
||||
public void setBranchDevelop(final String branchDevelop) {
|
||||
this.branchDevelop = branchDevelop;
|
||||
}
|
||||
|
||||
@XmlName(value="deliver-mode")
|
||||
public DeliverMode getDeliverMode() {
|
||||
return this.deliverMode;
|
||||
}
|
||||
public void setDeliverMode(final DeliverMode deliverMode) {
|
||||
this.deliverMode = deliverMode;
|
||||
public void setBranchRelease(final String branchRelease) {
|
||||
this.branchRelease = branchRelease;
|
||||
}
|
||||
|
||||
@XmlName(value="default-branch")
|
||||
public String getDefaultBranch() {
|
||||
return this.defaultBranch;
|
||||
}
|
||||
public void setDefaultBranch(final String defaultBranch) {
|
||||
this.defaultBranch = defaultBranch;
|
||||
}
|
||||
|
||||
@XmlName(value="default-remote")
|
||||
public String getDefaultRemote() {
|
||||
return this.defaultRemote;
|
||||
}
|
||||
public void setDefaultRemote(final String defaultRemote) {
|
||||
this.defaultRemote = defaultRemote;
|
||||
}
|
||||
|
||||
@XmlName(value="synchronize-submodule")
|
||||
public boolean isSynchronizeSubmodule() {
|
||||
return this.synchronizeSubmodule;
|
||||
public void setDeliverMode(final DeliverMode deliverMode) {
|
||||
this.deliverMode = deliverMode;
|
||||
}
|
||||
|
||||
public void setSynchronizeSubmodule(final boolean downloadSubmodule) {
|
||||
this.synchronizeSubmodule = downloadSubmodule;
|
||||
}
|
||||
@Override
|
||||
public OptionRepository clone() {
|
||||
// TODO Auto-generated method stub
|
||||
return new OptionRepository( this.branchRelease, this.branchDevelop, this.deliverMode, this.defaultBranch, this.defaultRemote, this.synchronizeSubmodule);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "OptionRepository [branchRelease=" + this.branchRelease + ", branchDevelop=" + this.branchDevelop + ", deliverMode=" + this.deliverMode + ", defaultBranch=" + this.defaultBranch + ", defaultRemote="
|
||||
+ this.defaultRemote + ", synchronizeSubmodule=" + this.synchronizeSubmodule + "]";
|
||||
return "OptionRepository [branchRelease=" + this.branchRelease + ", branchDevelop=" + this.branchDevelop + ", deliverMode=" + this.deliverMode + ", defaultBranch=" + this.defaultBranch
|
||||
+ ", defaultRemote=" + this.defaultRemote + ", synchronizeSubmodule=" + this.synchronizeSubmodule + "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ package org.atriasoft.island.model.manifest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlManaged;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotManaged;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
@AknotDefaultAttribute
|
||||
public class ProjectConfig {
|
||||
private String name;
|
||||
private String path;
|
||||
@ -25,72 +25,87 @@ public class ProjectConfig {
|
||||
this.tag = null;
|
||||
this.branch = null;
|
||||
}
|
||||
@XmlName({"name", "path"})
|
||||
|
||||
@AknotName({ "name", "path" })
|
||||
public ProjectConfig(final String name, final String path) {
|
||||
this.name = name;
|
||||
this.path = path;
|
||||
this.tag = null;
|
||||
this.branch = null;
|
||||
}
|
||||
@XmlName({"name", "path", "branch"})
|
||||
|
||||
@AknotName({ "name", "path", "branch" })
|
||||
public ProjectConfig(final String name, final String path, final String branch) {
|
||||
this.name = name;
|
||||
this.path = path;
|
||||
this.tag = null;
|
||||
this.tag = branch;
|
||||
}
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getPath() {
|
||||
return this.path;
|
||||
}
|
||||
public void setPath(final String path) {
|
||||
this.path = path;
|
||||
}
|
||||
@XmlOptional
|
||||
public String getTag() {
|
||||
return this.tag;
|
||||
}
|
||||
public void setTag(final String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
@XmlOptional
|
||||
public void setBranch(final String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
public String getBranch() {
|
||||
return this.branch;
|
||||
}
|
||||
|
||||
@XmlManaged(false)
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getPath() {
|
||||
return this.path;
|
||||
}
|
||||
|
||||
@AknotManaged(false)
|
||||
public List<RemoteConfig> getRemotes() {
|
||||
return this.remotes;
|
||||
}
|
||||
|
||||
@AknotManaged(false)
|
||||
public RemoteConfig getSelectRemotes() {
|
||||
return this.selectRemotes;
|
||||
}
|
||||
|
||||
@AknotOptional
|
||||
public String getTag() {
|
||||
return this.tag;
|
||||
}
|
||||
|
||||
@AknotManaged(false)
|
||||
public boolean isVolatile() {
|
||||
return this.volatileElement;
|
||||
}
|
||||
|
||||
@AknotOptional
|
||||
public void setBranch(final String branch) {
|
||||
this.branch = branch;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setPath(final String path) {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public void setRemotes(final List<RemoteConfig> remotes) {
|
||||
this.remotes = remotes;
|
||||
}
|
||||
|
||||
@XmlManaged(false)
|
||||
public RemoteConfig getSelectRemotes() {
|
||||
return this.selectRemotes;
|
||||
}
|
||||
public void setSelectRemotes(final RemoteConfig selectRemotes) {
|
||||
this.selectRemotes = selectRemotes;
|
||||
}
|
||||
@XmlManaged(false)
|
||||
public boolean isVolatile() {
|
||||
return this.volatileElement;
|
||||
|
||||
public void setTag(final String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public void setVolatile(final boolean volatileElement) {
|
||||
this.volatileElement = volatileElement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ProjectConfig [name=" + this.name + ", path=" + this.path + ", tag=" + this.tag +", branch=" + this.branch + ", volatileElement=" + this.volatileElement + ", remotes=" + this.remotes + ", selectRemotes=" + this.selectRemotes + "]";
|
||||
return "ProjectConfig [name=" + this.name + ", path=" + this.path + ", tag=" + this.tag + ", branch=" + this.branch + ", volatileElement=" + this.volatileElement + ", remotes=" + this.remotes
|
||||
+ ", selectRemotes=" + this.selectRemotes + "]";
|
||||
}
|
||||
}
|
@ -3,62 +3,67 @@ package org.atriasoft.island.model.manifest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlAttribute;
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotAttribute;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute
|
||||
@AknotDefaultAttribute
|
||||
public class RemoteConfig {
|
||||
private String name; // Local name of the remote.
|
||||
private String fetch; // Address to fetch.
|
||||
private boolean sync = true; // Need to sync the submodule.
|
||||
List<MirrorConfig> mirror; // List of all mirror available.
|
||||
|
||||
@XmlName({"name", "fetch", "mirror"})
|
||||
public RemoteConfig(final String name, final String fetch, final List<MirrorConfig> mirror) {
|
||||
this.name = name;
|
||||
this.fetch = fetch;
|
||||
this.mirror = mirror;
|
||||
}
|
||||
public RemoteConfig() {
|
||||
this.name = "";
|
||||
this.fetch = "";
|
||||
this.mirror = new ArrayList<>();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
public void setName(final String name) {
|
||||
@AknotName({ "name", "fetch", "mirror" })
|
||||
public RemoteConfig(final String name, final String fetch, final List<MirrorConfig> mirror) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getFetch() {
|
||||
return this.fetch;
|
||||
}
|
||||
public void setFetch(final String fetch) {
|
||||
this.fetch = fetch;
|
||||
}
|
||||
|
||||
@XmlAttribute(false)
|
||||
public List<MirrorConfig> getMirror() {
|
||||
return this.mirror;
|
||||
}
|
||||
public void setMirror(final List<MirrorConfig> mirror) {
|
||||
this.mirror = mirror;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RemoteConfig clone() {
|
||||
// TODO Auto-generated method stub
|
||||
return new RemoteConfig(this.name, this.fetch, new ArrayList<>(this.mirror));
|
||||
}
|
||||
|
||||
@XmlOptional
|
||||
public String getFetch() {
|
||||
return this.fetch;
|
||||
}
|
||||
|
||||
@AknotAttribute(false)
|
||||
public List<MirrorConfig> getMirror() {
|
||||
return this.mirror;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@AknotOptional
|
||||
public boolean isSync() {
|
||||
return this.sync;
|
||||
}
|
||||
|
||||
public void setFetch(final String fetch) {
|
||||
this.fetch = fetch;
|
||||
}
|
||||
|
||||
public void setMirror(final List<MirrorConfig> mirror) {
|
||||
this.mirror = mirror;
|
||||
}
|
||||
|
||||
public void setName(final String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setSync(final boolean sync) {
|
||||
this.sync = sync;
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
package org.atriasoft.island.model.maven;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultAttibute;
|
||||
import org.atriasoft.exml.annotation.XmlIgnoreUnknow;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotIgnoreUnknown;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultAttribute;
|
||||
|
||||
@XmlDefaultAttibute(false)
|
||||
@XmlIgnoreUnknow
|
||||
@AknotDefaultAttribute(false)
|
||||
@AknotIgnoreUnknown
|
||||
public record MavenMetadata(
|
||||
@XmlName("groupId") String groupId,
|
||||
@XmlName("artifactId") String artifactId,
|
||||
@XmlName("versioning") Versioning versioning) {
|
||||
@AknotName("groupId") String groupId,
|
||||
@AknotName("artifactId") String artifactId,
|
||||
@AknotName("versioning") Versioning versioning) {
|
||||
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
package org.atriasoft.island.model.maven;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultNullValue;
|
||||
import org.atriasoft.exml.annotation.XmlIgnoreUnknow;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultNullValue;
|
||||
import org.atriasoft.aknot.annotation.AknotIgnoreUnknown;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotOptional;
|
||||
|
||||
@XmlDefaultNullValue
|
||||
@XmlIgnoreUnknow
|
||||
@AknotDefaultNullValue
|
||||
@AknotIgnoreUnknown
|
||||
public record PomDependency(
|
||||
@XmlName("groupId") String groupId,
|
||||
@XmlName("artifactId") String artifactId,
|
||||
@XmlOptional @XmlName("version") String version,
|
||||
@XmlOptional @XmlName("scope") String scope) {
|
||||
@AknotName("groupId") String groupId,
|
||||
@AknotName("artifactId") String artifactId,
|
||||
@AknotOptional @AknotName("version") String version,
|
||||
@AknotOptional @AknotName("scope") String scope) {
|
||||
|
||||
}
|
||||
|
@ -2,21 +2,20 @@ package org.atriasoft.island.model.maven;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlDefaultNullValue;
|
||||
import org.atriasoft.exml.annotation.XmlIgnoreUnknow;
|
||||
import org.atriasoft.exml.annotation.XmlList;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.exml.annotation.XmlOptional;
|
||||
import org.atriasoft.aknot.annotation.AknotDefaultNullValue;
|
||||
import org.atriasoft.aknot.annotation.AknotIgnoreUnknown;
|
||||
import org.atriasoft.aknot.annotation.AknotList;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
import org.atriasoft.aknot.annotation.AknotOptional;
|
||||
|
||||
@XmlDefaultNullValue
|
||||
@XmlIgnoreUnknow
|
||||
public record PomMaven (
|
||||
@XmlName("modelVersion") String modelVersion,
|
||||
@XmlName("groupId") String groupId,
|
||||
@XmlName("artifactId") String artifactId,
|
||||
@XmlName("version") String version,
|
||||
@XmlOptional @XmlName("name") String name,
|
||||
@XmlOptional @XmlName("description") String description,
|
||||
@XmlOptional @XmlName("url") String url,
|
||||
@XmlOptional @XmlName("dependencies") @XmlList(value="dependency") List<PomDependency> dependencies) {
|
||||
}
|
||||
@AknotDefaultNullValue
|
||||
@AknotIgnoreUnknown
|
||||
public record PomMaven(
|
||||
@AknotName("modelVersion") String modelVersion,
|
||||
@AknotName("groupId") String groupId,
|
||||
@AknotName("artifactId") String artifactId,
|
||||
@AknotName("version") String version,
|
||||
@AknotOptional @AknotName("name") String name,
|
||||
@AknotOptional @AknotName("description") String description,
|
||||
@AknotOptional @AknotName("url") String url,
|
||||
@AknotOptional @AknotName("dependencies") @AknotList(value = "dependency") List<PomDependency> dependencies) {}
|
||||
|
@ -2,13 +2,13 @@ package org.atriasoft.island.model.maven;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.atriasoft.exml.annotation.XmlList;
|
||||
import org.atriasoft.exml.annotation.XmlName;
|
||||
import org.atriasoft.aknot.annotation.AknotList;
|
||||
import org.atriasoft.aknot.annotation.AknotName;
|
||||
|
||||
public record Versioning(
|
||||
@XmlName("latest") String latest,
|
||||
@XmlName("release") String release,
|
||||
@XmlName("lastUpdated") String lastUpdated,
|
||||
@XmlName("versions") @XmlList(value="version") List<String> versions) {
|
||||
@AknotName("latest") String latest,
|
||||
@AknotName("release") String release,
|
||||
@AknotName("lastUpdated") String lastUpdated,
|
||||
@AknotName("versions") @AknotList(value = "version") List<String> versions) {
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user