This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-ide-tooling.git
The following commit(s) were added to refs/heads/master by this push:
new d59bb67 SLING-7518 - Deploying a new Sling bundle project from the
create bundle wizard fails: Add and remove cannot both be null/empty
d59bb67 is described below
commit d59bb6793526adcec897189d4c0e19275314c001
Author: Robert Munteanu <[email protected]>
AuthorDate: Mon Feb 26 22:54:55 2018 +0200
SLING-7518 - Deploying a new Sling bundle project from the create bundle
wizard fails: Add and remove cannot both be null/empty
Detect project using the bnd-maven-plugin as bundle projects.
---
.../np/AbstractNewMavenBasedSlingApplicationWizard.java | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git
a/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
b/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
index d6caf18..a3e0d3e 100644
---
a/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
+++
b/eclipse-m2e-ui/src/org/apache/sling/ide/eclipse/ui/wizards/np/AbstractNewMavenBasedSlingApplicationWizard.java
@@ -23,6 +23,7 @@ import java.util.Properties;
import org.apache.maven.archetype.catalog.Archetype;
import org.apache.maven.model.Model;
+import org.apache.maven.model.Plugin;
import
org.apache.sling.ide.eclipse.ui.wizards.AbstractNewSlingApplicationWizard;
import org.apache.sling.ide.eclipse.ui.wizards.Projects;
import org.eclipse.core.resources.IFile;
@@ -40,6 +41,17 @@ public abstract class
AbstractNewMavenBasedSlingApplicationWizard extends Abstra
private ChooseArchetypeWizardPage chooseArchetypePage;
private ArchetypeParametersWizardPage archetypeParametersPage;
+ private static boolean isConfiguredWithBndPlugin(Model model) {
+ for ( Plugin buildPlugin: model.getBuild().getPlugins() ) {
+ if ( "biz.aQute.bnd".equals(buildPlugin.getGroupId())
+ &&
"bnd-maven-plugin".equals(buildPlugin.getArtifactId()) ) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public abstract boolean acceptsArchetype(Archetype archetype);
/**
@@ -118,7 +130,7 @@ public abstract class
AbstractNewMavenBasedSlingApplicationWizard extends Abstra
if ("content-package".equals(packaging)) {
projects.getContentProjects().add(project);
- } else if ("bundle".equals(packaging)) {
+ } else if ("bundle".equals(packaging) ||
isConfiguredWithBndPlugin(model)) {
projects.getBundleProjects().add(project);
} else if ("pom".equals(packaging)) {
if (projects.getReactorProject() == null) {
--
To stop receiving notification emails like this one, please contact
[email protected].