[STAGING] Add build profiles

Use build profiles to enable/disable staging and blackduck scans

Change-Id: I075c076206a401afc46c76b06cb3b642cb9c3eed
Signed-off-by: Dan Timoney <dtimoney@att.com>
diff --git a/rootpom/pom.xml b/rootpom/pom.xml
index 1d1c8eb..48ceb3d 100755
--- a/rootpom/pom.xml
+++ b/rootpom/pom.xml
@@ -18,6 +18,8 @@
 		<openecomp.nexus.release-url>https://nexus.openecomp.org/content/repositories/releases/</openecomp.nexus.release-url>
 		<openecomp.nexus.snapshot-url>https://nexus.openecomp.org/content/repositories/snapshots/</openecomp.nexus.snapshot-url>
 		<openecomp.nexus.public-url>https://nexus.openecomp.org/content/groups/public/</openecomp.nexus.public-url>
+		<openecomp.nexus.staging.server-id>ecomp-staging</openecomp.nexus.staging.server-id>
+		<openecomp.nexus.staging.profile-id>176c31dfe190a</openecomp.nexus.staging.profile-id>
 		<openecomp.git.host>gerrit.openecomp.org</openecomp.git.host>
 		<openecomp.git.port>443</openecomp.git.port>
 		<openecomp.git.project>sdnc</openecomp.git.project>
@@ -68,8 +70,8 @@
 		<sonar.jacoco.reportMissing.force.zero>true</sonar.jacoco.reportMissing.force.zero>
 		<sonar.projectVersion>${project.version}</sonar.projectVersion>
 
-		<sdnc.core.version>1.0.0-SNAPSHOT</sdnc.core.version>
-		<sdnc.adaptors.version>1.0.0-SNAPSHOT</sdnc.adaptors.version>
+		<sdnc.core.version>1.0.0</sdnc.core.version>
+		<sdnc.adaptors.version>1.0.0</sdnc.adaptors.version>
 		<sdnctl.sli.version>${sdnc.core.version}</sdnctl.sli.version>
 		<sdnctl.aai.service.version>${sdnc.adaptors.version}</sdnctl.aai.service.version>
 		<sdnctl.dblib.version>${sdnc.core.version}</sdnctl.dblib.version>
@@ -83,6 +85,35 @@
 	<artifactId>root</artifactId>
 	<version>1.0.0</version>
 
+	<profiles>
+		<profile>
+			<id>staging</id>
+			<activation>
+				<property>
+					<name>!no-staging</name>
+				</property>
+			</activation>
+			<build>
+				<pluginManagement>
+					<plugins>
+						<plugin>
+							<groupId>org.sonatype.plugins</groupId>
+							<artifactId>nexus-staging-maven-plugin</artifactId>
+							<version>1.6.7</version>
+							<extensions>true</extensions>
+							<configuration>
+								<nexusUrl>https://${openecomp.nexus.host}</nexusUrl>
+								<stagingProfileId>${openecomp.nexus.staging.profile-id}</stagingProfileId>
+								<serverId>${openecomp.nexus.staging.server-id}</serverId>
+							</configuration>
+						</plugin>
+					</plugins>
+				</pluginManagement>
+			</build>
+		</profile>
+
+	</profiles>
+
 	<dependencyManagement>
 		<dependencies>
 			<dependency>
@@ -581,17 +612,7 @@
 					</executions>
 				</plugin>
 
-				<plugin>
-					<groupId>org.sonatype.plugins</groupId>
-					<artifactId>nexus-staging-maven-plugin</artifactId>
-					<version>1.6.7</version>
-					<extensions>true</extensions>
-					<configuration>
-						<nexusUrl>https://nexus.openecomp.org</nexusUrl>
-						<stagingProfileId>176c31dfe190a</stagingProfileId>
-						<serverId>ecomp-staging</serverId>
-					</configuration>
-				</plugin>
+
 			</plugins>
 
 		</pluginManagement>