feign icon indicating copy to clipboard operation
feign copied to clipboard

How to package or compile or X locally?

Open dancer1325 opened this issue 11 months ago • 1 comments

I miss an entry in the README.md to compile it locally, in order to test locally features or even just play with the examples

Failure attempts

  • Attempt1: .mvn clean compile
    • try to use the corresponding maven wrapper without succeed
  • Attempt2: specifying locally in the ".m2/toolchains.xml", the jdk entry to my JDK v11 + mvn clean compile
    ...
    <type>jdk</type> 
      <provides>
        <version>1.11</version>
        <vendor>zulu</vendor>
      </provides>
      <configuration>
        <jdkHome>/Library/Java/JavaVirtualMachines/zulu-11.jdk</jdkHome>
      </configuration>
    ...
    
  • Attempt3: specifying in the root pom.xml + mvn clean compile
    <main.java.version>1.11</main.java.version>
    

Current stack locally

  • Maven

    Apache Maven 3.9.9 
    Java version: 11.0.24, vendor: Azul Systems, Inc.
    OS name: "mac os x", version: "15.2", arch: "aarch64", family: "mac"
    
  • Java

    openjdk 11.0.24 2024-07-16 LTS
    OpenJDK Runtime Environment Zulu11.74+15-CA (build 11.0.24+8-LTS)
    

dancer1325 avatar Feb 08 '25 20:02 dancer1325

Hello @dancer1325

To build this project locally, you need to setup multiple versions of JDK (8, 11, 17, 21) and configure the toolchain. The first step can be achieved using sdkman. You should chose Java 21 as default version (check documentation of SDKman for that).

You can find toolchains.xml for this project here: https://github.com/OpenFeign/feign/blob/master/.github/files/toolchains.xml

Even if it is not very clear, you can learn all the steps of building this project by looking into its build pipeline: https://github.com/OpenFeign/feign/blob/master/.github/workflows/build.yml

If you still have questions, feel free to ask.

hosuaby avatar Feb 12 '25 10:02 hosuaby