pom.xml 8.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

19
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20 21
    <modelVersion>4.0.0</modelVersion>
    <parent>
22
        <groupId>org.apache.dolphinscheduler</groupId>
23
        <artifactId>dolphinscheduler</artifactId>
24
        <version>3.0.2</version>
25 26 27 28 29
    </parent>
    <artifactId>dolphinscheduler-python</artifactId>
    <name>${project.artifactId}</name>
    <packaging>jar</packaging>

30
    <profiles>
31 32 33 34 35 36
        <profile>
            <id>release</id>
            <properties>
                <python.sign.skip>false</python.sign.skip>
            </properties>
        </profile>
37
        <profile>
38
            <id>python</id>
39 40 41 42 43 44 45 46 47 48 49 50 51
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>python-api-prepare</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
52
                                    <executable>python</executable>
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>-m</argument>
                                        <argument>pip</argument>
                                        <argument>install</argument>
                                        <argument>--upgrade</argument>
                                        <argument>pip</argument>
                                        <argument>.[build]</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>python-api-clean</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
71
                                    <executable>python</executable>
72 73 74 75 76 77 78 79 80 81 82 83 84 85
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>setup.py</argument>
                                        <argument>pre_clean</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>python-api-build</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
86
                                    <executable>python</executable>
87 88 89 90 91 92 93
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>-m</argument>
                                        <argument>build</argument>
                                    </arguments>
                                </configuration>
                            </execution>
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
                            <!-- Rename Python dist package to avoid confusion with dolphinscheduler main package -->
                            <execution>
                                <id>python-pkg-rename-tar</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>bash</executable>
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>-c</argument>
                                        <argument>mv dist/apache-dolphinscheduler-*.tar.gz dist/apache-dolphinscheduler-python-${project.version}.tar.gz</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>python-pkg-rename-whl</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>bash</executable>
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>-c</argument>
                                        <argument>mv dist/apache_dolphinscheduler-*py3-none-any.whl dist/apache_dolphinscheduler-python-${project.version}-py3-none-any.whl</argument>
                                    </arguments>
                                </configuration>
                            </execution>
125 126 127 128 129 130 131 132 133 134 135 136 137
                            <execution>
                                <id>sign-source</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <skip>${python.sign.skip}</skip>
                                    <executable>bash</executable>
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>-c</argument>
                                        <!-- We use `bash -c` here cause plugin exec-maven-plugin do not support wildcard-->
138
                                        <argument>gpg --armor --detach-sign --digest-algo=SHA512 dist/*.tar.gz</argument>
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
                                    </arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>sign-wheel</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <skip>${python.sign.skip}</skip>
                                    <executable>bash</executable>
                                    <workingDirectory>${project.basedir}/pydolphinscheduler</workingDirectory>
                                    <arguments>
                                        <argument>-c</argument>
                                        <!-- We use `bash -c` here cause plugin exec-maven-plugin do not support wildcard-->
155
                                        <argument>gpg --armor --detach-sign --digest-algo=SHA512 dist/*.whl</argument>
156 157 158
                                    </arguments>
                                </configuration>
                            </execution>
159 160 161 162 163
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
164
    </profiles>
165
</project>