use of org.jetbrains.idea.maven.model.MavenArchetype in project intellij-community by JetBrains.
the class MavenArchetypesStep method updateDataModel.
@Override
public void updateDataModel() {
MavenArchetype selectedArchetype = getSelectedArchetype();
myBuilder.setArchetype(selectedArchetype);
}
use of org.jetbrains.idea.maven.model.MavenArchetype in project intellij-community by JetBrains.
the class MavenModuleWizardStep method saveSettings.
private void saveSettings() {
saveValue(INHERIT_GROUP_ID_KEY, myInheritGroupIdCheckBox.isSelected());
saveValue(INHERIT_VERSION_KEY, myInheritVersionCheckBox.isSelected());
if (myArchetypes != null) {
MavenArchetype arch = myArchetypes.getSelectedArchetype();
saveValue(ARCHETYPE_GROUP_ID_KEY, arch == null ? null : arch.groupId);
saveValue(ARCHETYPE_ARTIFACT_ID_KEY, arch == null ? null : arch.artifactId);
saveValue(ARCHETYPE_VERSION_KEY, arch == null ? null : arch.version);
}
}
use of org.jetbrains.idea.maven.model.MavenArchetype in project intellij-community by JetBrains.
the class MavenModuleWizardStep method loadSettings.
private void loadSettings() {
myBuilder.setInheritedOptions(getSavedValue(INHERIT_GROUP_ID_KEY, true), getSavedValue(INHERIT_VERSION_KEY, true));
String archGroupId = getSavedValue(ARCHETYPE_GROUP_ID_KEY, null);
String archArtifactId = getSavedValue(ARCHETYPE_ARTIFACT_ID_KEY, null);
String archVersion = getSavedValue(ARCHETYPE_VERSION_KEY, null);
if (archGroupId == null || archArtifactId == null || archVersion == null) {
myBuilder.setArchetype(null);
} else {
myBuilder.setArchetype(new MavenArchetype(archGroupId, archArtifactId, archVersion, null, null));
}
}
use of org.jetbrains.idea.maven.model.MavenArchetype in project intellij-community by JetBrains.
the class MavenIndicesManagerTest method testAddingArchetypes.
public void testAddingArchetypes() throws Exception {
myIndicesFixture.getIndicesManager().addArchetype(new MavenArchetype("myGroup", "myArtifact", "666", null, null));
assertArchetypeExists("myGroup:myArtifact:666");
myIndicesFixture.tearDown();
myIndicesFixture.setUp();
assertArchetypeExists("myGroup:myArtifact:666");
}
use of org.jetbrains.idea.maven.model.MavenArchetype in project intellij-community by JetBrains.
the class MavenIndicesManagerTest method assertArchetypeExists.
private void assertArchetypeExists(String archetypeId) {
Set<MavenArchetype> achetypes = myIndicesFixture.getIndicesManager().getArchetypes();
List<String> actualNames = new ArrayList<>();
for (MavenArchetype each : achetypes) {
actualNames.add(each.groupId + ":" + each.artifactId + ":" + each.version);
}
assertTrue(actualNames.toString(), actualNames.contains(archetypeId));
}
Aggregations