Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/543#discussion_r112815565
  
    --- Diff: metron-deployment/packaging/docker/rpm-docker/pom.xml ---
    @@ -227,4 +183,97 @@
                 </plugin>
             </plugins>
         </build>
    +    <profiles>
    +        <profile>
    +            <id>InDocker</id>
    +            <activation>
    +                <file>
    +                    <!-- If this file exists, then we are running in 
docker already -->
    +                    <exists>/.dockerenv</exists>
    +                </file>
    +            </activation>
    +            <build>
    +                <plugins>
    +                    <plugin>
    +                        <groupId>org.codehaus.mojo</groupId>
    +                        <artifactId>exec-maven-plugin</artifactId>
    +                        <version>1.5.0</version>
    +                        <executions>
    +                            <execution>
    +                                <id>rpm-build</id>
    +                                <phase>package</phase>
    +                                <goals>
    +                                    <goal>exec</goal>
    +                                </goals>
    +                                <configuration>
    +                                    <executable>/bin/bash</executable>
    +                                    <arguments>
    +                                        <argument>-c</argument>
    +                                        <argument>./build.sh 
${project.version}</argument>
    +                                    </arguments>
    +                                </configuration>
    +                            </execution>
    +                        </executions>
    +                    </plugin>
    +                </plugins>
    +            </build>
    +        </profile>
    +        <profile>
    +            <id>NeedsDocker</id>
    +            <activation>
    --- End diff --
    
    The way I did it with activation, you don't have to do anything.  The only 
thing you need to do is the -P build-rams as before.  The POM automatically 
activates the appropriate behavior.  Start docker unless we are in docker.  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to