-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(dist): replace wget to curl to download swagger-ui #2277
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2277 +/- ##
============================================
- Coverage 68.63% 68.24% -0.39%
- Complexity 977 981 +4
============================================
Files 498 498
Lines 40684 41240 +556
Branches 5681 5738 +57
============================================
+ Hits 27922 28146 +224
- Misses 10056 10363 +307
- Partials 2706 2731 +25 see 73 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
also added maven-enforcer-plugin to check java and maven version for #2114 (comment) |
The order of executions related to packaging should be To control the execution order of different goals within the same phase, consider declaring the above executions in sequence within the |
pom.xml
Outdated
</build> | ||
</profile> | ||
<profile> | ||
<id>assembly-hugegraph</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after we move the profile, what's the proper building command?
Before:
mvn clean install -Papache-release -DskipTests
for building apache-release
source/binary package
Now: ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a profile is activated through the implicit profile activation mechanism, the explicit profile activation mechanism within the same pom becomes ineffective.
So it's necessary to explicitly specify the profiles:
mvn clean install -Papache-release,assembly-hugegraph,tar-package -DskipTests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a profile is activated through the implicit profile activation mechanism, the explicit profile activation mechanism within the same pom becomes ineffective.
So it's necessary to explicitly specify the profiles:
mvn clean install -Papache-release,assembly-hugegraph,tar-package -DskipTestsref: maven.apache.org/guides/introduction/introduction-to-profiles.html#explicit-profile-activation
The relevant scripts and documentation need to be updated later.
pom.xml
Outdated
<id>download-swagger-ui</id> | ||
<phase>prepare-package</phase> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this step will not be inherited by other modules?
hugegraph-dist/pom.xml
Outdated
<profile> | ||
<id>tar-package</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>1.8</version> | ||
<executions> | ||
<execution> | ||
<id>tar-package</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<tar destfile="${final.destfile}" compression="gzip"> | ||
<tarfileset dir="${top.level.dir}/" filemode="755"> | ||
<include name="${final.name}/**"/> | ||
</tarfileset> | ||
</tar> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
</profile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After introducing pd and store (#2265), the relevant package goals could be considered for reuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hugegraph-dist/pom.xml
Outdated
<profile> | ||
<id>tar-package</id> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>1.8</version> | ||
<executions> | ||
<execution> | ||
<id>tar-package</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<tar destfile="${final.destfile}" compression="gzip"> | ||
<tarfileset dir="${top.level.dir}/" filemode="755"> | ||
<include name="${final.name}/**"/> | ||
</tarfileset> | ||
</tar> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
</profile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</plugins> | ||
|
||
<pluginManagement> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need pluginManagement
?
BTW, all the CI failed now 🔎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need
pluginManagement
?BTW, all the CI failed now 🔎
- for reuse the configuration of the
maven-antrun-plugin
- because of chore(dist): replace wget to curl to download swagger-ui #2277 (comment), fix in
880d283
(#2277)
Following this discussion: Through researching relevant information, we found that the semantics of
Then, within the same pom, a profile configured with To avoid explicitly specifying profiles suppressed from activation due to the aforementioned mechanisms via <profiles>
<profile>
<id>xxx</id>
<activation>
<property>
<name>!skip-xxx</name>
</property>
</activation>
...
</profile>
</profiles> Using the property mechanism within implicit profile activation to activate profiles configured with Additionally, it's important to minimize occurrences of identical property names across different profiles. For example: In a scenario where both profiles are activated, the value of References: |
TODO: We have observed that when the
There might be an issue with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Main Changes: 1. replace `wget` by `curl` when downloading `swagger-ui` 2. silence the output of `curl` and `tar` commands 3. reuse the existing `v4.15.5.tar.gz` before downloading 4. avoid downloading `swagger-ui` in non-Linux platforms to prevent build failures (there might be a cross-platform build approach available 🤔) 5. wrapp the script content within `<![CDATA[ ... ]]>` blocks ensures that the script retains its original format when generating the `dist.sh` script (also suppresses automatic indentation) 6. remove intermediate files at the end of the script **An alternative approach**, during the generation of the `dist.sh` script, only the `${final.name}` property from the build process is utilized. It might be possible to separately store a `dist.sh` script within hugegraph-dist, then use `sed` during the build process to replace the value of `${final.name}`, **thereby avoiding the need to embed script content within the pom file**. --------- Co-authored-by: imbajin <jin@apache.org>
Main Changes: 1. replace `wget` by `curl` when downloading `swagger-ui` 2. silence the output of `curl` and `tar` commands 3. reuse the existing `v4.15.5.tar.gz` before downloading 4. avoid downloading `swagger-ui` in non-Linux platforms to prevent build failures (there might be a cross-platform build approach available 🤔) 5. wrapp the script content within `<![CDATA[ ... ]]>` blocks ensures that the script retains its original format when generating the `dist.sh` script (also suppresses automatic indentation) 6. remove intermediate files at the end of the script **An alternative approach**, during the generation of the `dist.sh` script, only the `${final.name}` property from the build process is utilized. It might be possible to separately store a `dist.sh` script within hugegraph-dist, then use `sed` during the build process to replace the value of `${final.name}`, **thereby avoiding the need to embed script content within the pom file**. --------- Co-authored-by: imbajin <jin@apache.org>
Main Changes: 1. replace `wget` by `curl` when downloading `swagger-ui` 2. silence the output of `curl` and `tar` commands 3. reuse the existing `v4.15.5.tar.gz` before downloading 4. avoid downloading `swagger-ui` in non-Linux platforms to prevent build failures (there might be a cross-platform build approach available 🤔) 5. wrapp the script content within `<![CDATA[ ... ]]>` blocks ensures that the script retains its original format when generating the `dist.sh` script (also suppresses automatic indentation) 6. remove intermediate files at the end of the script **An alternative approach**, during the generation of the `dist.sh` script, only the `${final.name}` property from the build process is utilized. It might be possible to separately store a `dist.sh` script within hugegraph-dist, then use `sed` during the build process to replace the value of `${final.name}`, **thereby avoiding the need to embed script content within the pom file**. --------- Co-authored-by: imbajin <jin@apache.org>
Purpose of the PR
close #2223
related issue or PR:
Main Changes
wget
bycurl
when downloadingswagger-ui
curl
andtar
commandsv4.15.5.tar.gz
before downloadingswagger-ui
in non-Linux platforms to prevent build failures (there might be a cross-platform build approach available 🤔)<![CDATA[ ... ]]>
blocks ensures that the script retains its original format when generating thedist.sh
script (also suppresses automatic indentation)An alternative approach, during the generation of the
dist.sh
script, only the${final.name}
property from the build process is utilized. It might be possible to separately store adist.sh
script within hugegraph-dist, then usesed
during the build process to replace the value of${final.name}
, thereby avoiding the need to embed script content within the pom file.Verifying these changes
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO
Doc - Done
Doc - No Need