imbajin commented on code in PR #2277:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2277#discussion_r1292384879


##########
hugegraph-dist/pom.xml:
##########
@@ -179,21 +179,42 @@
                             <goal>run</goal>
                         </goals>
                         <configuration>
-                            <tasks>
-                                <echo file="${project.basedir}/dist.sh">
-                                    wget --version 1>/dev/null || exit
-                                    wget 
https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz
-                                    tar zxvf v4.15.5.tar.gz
-                                    echo "window.onload = function() { 
window.ui = SwaggerUIBundle({
-                                    
url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout',
-                                    presets:[SwaggerUIBundle.presets.apis, 
SwaggerUIStandalonePreset ],
-                                    
plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > 
swagger-ui-4.15.5/dist/swagger-initializer.js
-                                    cp -r swagger-ui-4.15.5/dist 
../${final.name}/swagger-ui
-                                </echo>
-                                <exec executable="${shell-executable}" 
dir="${project.basedir}" failonerror="true">
-                                    <arg line="./dist.sh"/>
-                                </exec>
-                            </tasks>
+                            <target>
+                                <taskdef 
resource="net/sf/antcontrib/antcontrib.properties"
+                                         
classpathref="maven.plugin.classpath"/>
+                                <if>

Review Comment:
   maybe we could also check if curl exist in os env? skip the swagger building 
if network/curl broken(do we need it?)
   
   In general,the building shouldn't be bounded with outside network?



##########
hugegraph-dist/pom.xml:
##########
@@ -179,21 +179,42 @@
                             <goal>run</goal>
                         </goals>
                         <configuration>
-                            <tasks>
-                                <echo file="${project.basedir}/dist.sh">
-                                    wget --version 1>/dev/null || exit
-                                    wget 
https://github.com/swagger-api/swagger-ui/archive/refs/tags/v4.15.5.tar.gz
-                                    tar zxvf v4.15.5.tar.gz
-                                    echo "window.onload = function() { 
window.ui = SwaggerUIBundle({
-                                    
url:'/openapi.json',dom_id:'#swagger-ui',deepLinking:true,layout:'StandaloneLayout',
-                                    presets:[SwaggerUIBundle.presets.apis, 
SwaggerUIStandalonePreset ],
-                                    
plugins:[SwaggerUIBundle.plugins.DownloadUrl]});};" > 
swagger-ui-4.15.5/dist/swagger-initializer.js
-                                    cp -r swagger-ui-4.15.5/dist 
../${final.name}/swagger-ui
-                                </echo>
-                                <exec executable="${shell-executable}" 
dir="${project.basedir}" failonerror="true">
-                                    <arg line="./dist.sh"/>
-                                </exec>
-                            </tasks>
+                            <target>
+                                <taskdef 
resource="net/sf/antcontrib/antcontrib.properties"
+                                         
classpathref="maven.plugin.classpath"/>
+                                <if>

Review Comment:
   maybe we could also check if curl exist in os env? skip the swagger building 
if network/curl broken(do we need it?)
   
   In general,the building shouldn't be bounded with outside network?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to