Closed jacomago closed 5 months ago
Is there any specific reason to remove ant from this repository?
@jeonghanlee
Is there any specific reason to remove ant from this repository?
@jeonghanlee
Main reasons:
I could add calling gradle from ant if you really want to keep ant.
@slacmshankar Are we going to the gradle as the archiver appliance building system now? If so, I must wait for these works and study how Gradle works before upgrading my environment.
Please let me know what the schedule or plan will be for the migration from Ant to Gradle.
@jeonghanlee I altered the pull request a little to make the move easier.
From playing around with github.com:jeonghanlee/epicsarchiverap-env I think you would only have to manually add the maria db connector into the tomcat folder and call gradle instead of ant. I don't think you even need to install ant anymore as gradle includes an ant runner, and can be run from the wrapper.
@jeonghanlee Why don't you help make a call on this? If the suggestion works for you, we'll move to gradle and that helps with VSCode and the like.
@slacmshankar it is up to you if you want to move the gradle. I don't care about Java building environments, which typically make me sick. ;) You can decide, so I will accept this change to update my environment.
What I need is well-written documentation on how I can compile them with Gladle.
@slacmshankar @jacomago I finally evaluated the gradle building system. Then, I realized this is not the Java building system, but the universal building system.
I don't see any advantage in the long term. Anyway, after an hour's study, I saw a new building system, and I could build the archiver appliance without any issues. However, it looks like gradle build
doesn't work. Can you make that work? I don't see any advantage to using a heavy wrapper shell script to build Java applications. It also downloads their own gradle file and does something that I don't understand on my Linux system.
I naively thought gradle
was a better solution, but it looks like it will be very messy if one cannot maintain it every single day.
Here are questions in my mind
@slacmshankar @jacomago
If I add some my own files into the source directory, the following command triggers to do something, which I don't ask to do
epicsarchiverap-src ((758004c...))$ ./gradlew build
> Configure project :
[ant:echo] Building the archiver appliance for the site tests
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Task :compileTestJava
Note: /home/jeonglee/gitsrc/epicsarchiverap-env/epicsarchiverap-src/src/test/org/epics/archiverappliance/mgmt/pva/actions/NTUtilTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/jeonglee/gitsrc/epicsarchiverap-env/epicsarchiverap-src/src/test/edu/stanford/slac/archiverappliance/PB/data/BoundaryConditionsSimulationValueGenerator.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
> Task :spotlessStyling FAILED
Step 'prettier-format' found problem in 'src/sitespecific/als/template_changes.html':
Can't automatically determine npm executable and none was specifically supplied!
Spotless tries to find your npm executable automatically. It looks for npm in the following places:
- An executable referenced by the java system property 'npm.exec' - if such a system property exists.
- The environment variable 'NVM_BIN' - if such an environment variable exists.
- The environment variable 'NVM_SYMLINK' - if such an environment variable exists.
- The environment variable 'NODE_PATH' - if such an environment variable exists.
- In your 'PATH' environment variable
If autodiscovery fails for your system, try to set one of the environment variables correctly or
try setting the system property 'npm.exec' in the build process to override autodiscovery.
java.lang.IllegalStateException: Can't automatically determine npm executable and none was specifically supplied!
...............
at org.gradle.internal.operations.CurrentBuildOperationRef.with(CurrentBuildOperationRef.java:80)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:314)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:303)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:463)
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:380)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:47)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':spotlessStyling'.
> Issue processing file: /home/jeonglee/gitsrc/epicsarchiverap-env/epicsarchiverap-src/src/sitespecific/als/template_changes.html
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 16s
22 actionable tasks: 11 executed, 11 up-to-date
Okay, the building system checked the style, it is good, but what for here?
I see the issue here.
If you decide to go the Gradle completely, I have to think, about resuming the ant or maven building system again into the forked repository.
I am frustating a lot today about gradle, it may be wrong about everything what I see today. And my comments are completely junk. It is the main reason why I cannot find a documentation which I asked and you mentioned here. Where is the documentation about the building system?
Also