You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2024/07/23 16:20:20 UTC

[I] Require JDK 9 for building [mina-sshd]

gnodet opened a new issue, #536:
URL: https://github.com/apache/mina-sshd/issues/536

   ### Description
   
   Bump the minimal JDK version required for building to java 9.
   
   ### Motivation
   
   This will streamline the build, allow upgrading to more recent plugins.
   The minimal JDK requirement for runtime will be unchanged at JDK 8.
   
   ### Alternatives considered
   
   _No response_
   
   ### Additional context
   
   _No response_


-- 
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: dev-unsubscribe@mina.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 11 for building [mina-sshd]

Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2245793633

   > I'm working on CI. I've set up a `jdk8` profile which removes some plugins that require JDK 11. I don't think toolchains are required here.
   
   Then we're not really requiring Java 11 for building. So still no multi-release.
   
   I would require 11 (or even 17) for compiling/building always; just run the tests on different JVMs (8, 11, 17). That's why I mentioned toolchains. I think there is a way to tell surefire to use a specific toolchain.


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 11 for building [mina-sshd]

Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2245728476

   This might require changing the CI builds. We still should test on Java 8. Might require maven toolchains.
   
   Otherwise fine by me.


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 11 for building [mina-sshd]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2245743326

   > This might require changing the CI builds. We still should test on Java 8. Might require maven toolchains.
   
   I'm working on CI.  I've set up a `jdk8` profile which removes some plugins that require JDK 11.  I don't think toolchains are required here.
   


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 11 for building [mina-sshd]

Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2249775970

   You can use JDK 21 in CI, but I would not require it as minimum for building.
   
   Still looks more complicated that needed. I'm not at my development machine, so I cannot verify myself that this would work, but it seems to me the following patch would be a minimal change to build with Java 11 and test on JDK 8, 11, 17:
   ```
   diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
   index 0eb87ee..7ab3828 100644
   --- a/.github/workflows/build.yml
   +++ b/.github/workflows/build.yml
   @@ -29,15 +29,14 @@
        strategy:
          matrix:
            os: [ ubuntu-latest, windows-latest ]
   -        java: [ '8' ]
        steps:
          - uses: actions/checkout@v4
    
   -      - name: Set up JDK ${{ matrix.java }}
   +      - name: Set up JDK 11
            uses: actions/setup-java@v4
            with:
              distribution: temurin
   -          java-version: ${{ matrix.java }}
   +          java-version: '11'
    
          - uses: actions/cache@v4
            with:
   @@ -63,7 +62,10 @@
            uses: actions/setup-java@v4
            with:
              distribution: temurin
   -          java-version: ${{ matrix.java }}
   +          # Unsure whether this works if matrix.java == 11. If not, need two different setups with a conditional
   +          java-version: |
   +            ${{ matrix.java }}
   +            '11'
    
          - uses: actions/cache@v4
            with:
   @@ -74,7 +76,7 @@
    
          - name: Build and test with maven
            # Skip all static checks, they were already done in the compile jobs
   -        run: mvn -B --errors --activate-profiles ci --no-transfer-progress package
   +        run: mvn -B --errors --activate-profiles ci -Dtest.jdk.vendor=temurin -Dtest.jdk.version=${{ matrix.java }} --no-transfer-progress package
    
          - name: Archive test results and logs
            # if: success() || failure() to also get the test results on successful runs.
   diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml
   index 7aa899e..1d5a991 100644
   --- a/.github/workflows/master-build.yml
   +++ b/.github/workflows/master-build.yml
   @@ -47,7 +47,7 @@
            uses: actions/setup-java@v4
            with:
              distribution: temurin
   -          java-version: '8'
   +          java-version: '11'
              # Create a ~/.m2/settings.xml referencing these environment variable names
              server-id: 'apache.snapshots.https'
              server-username: NEXUS_USERNAME
   diff --git a/pom.xml b/pom.xml
   index fcbc28d..60ea820 100644
   --- a/pom.xml
   +++ b/pom.xml
   @@ -138,9 +138,6 @@
        <profiles>
            <profile>
                <id>release</id>
   -            <properties>
   -                <required.java.version>[1.8,1.9)</required.java.version>
   -            </properties>
            </profile>
    
            <profile>
   @@ -149,6 +146,20 @@
                    <sshd.tests.timeout.factor>4.0</sshd.tests.timeout.factor>
                    <sshd.tests.rerun.count>4</sshd.tests.rerun.count>
                </properties>
   +            <build>
   +                <plugins>
   +                    <plugin>
   +                        <groupId>org.apache.maven.plugins</groupId>
   +                        <artifactId>maven-surefire-plugin</artifactId>
   +                        <configuration>
   +                            <jdkToolchain>
   +                               <version>${test.jdk.version}</version>
   +                               <vendor>${test.jdk.vendor}</vendor>
   +                            </jdkToolchain>
   +                        </configuration>
   +                    </plugin>
   +                </plugins>
   +            </build>
            </profile>
    
            <profile>
   ```
   This should use toolchains only in CI, so building locally doesn't require people to define toolchains manually. Adapting to build with Java 21 and running tests on 8,11,17,21 would be simple.


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 11 for building [mina-sshd]

Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2245710786

   +1 here.


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 17 for building [mina-sshd]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #536: Require JDK 17 for building
URL: https://github.com/apache/mina-sshd/issues/536


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 11 for building [mina-sshd]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2249734807

   > > I'm working on CI. I've set up a `jdk8` profile which removes some plugins that require JDK 11. I don't think toolchains are required here.
   > 
   > Then we're not really requiring Java 11 for building. So still no multi-release.
   > 
   > I would require 11 (or even 17) for compiling/building always; just run the tests on different JVMs (8, 11, 17). That's why I mentioned toolchains. I think there is a way to tell surefire to use a specific toolchain.
   
   The #537 PR now does that.  I've bumped to JDK 21, but we can go down if we want.


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 17 for building [mina-sshd]

Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet closed issue #536: Require JDK 17 for building
URL: https://github.com/apache/mina-sshd/issues/536


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] Require JDK 17 for building [mina-sshd]

Posted by "Moonergfp (via GitHub)" <gi...@apache.org>.
Moonergfp commented on issue #536:
URL: https://github.com/apache/mina-sshd/issues/536#issuecomment-2982560867

   As a user of Mina-SSHD, I would like to inquire: when building my project with JDK 17, is it feasible to use a Mina-SSHD version lower than 2.14?


-- 
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: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org