Skip to content
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

LGP not work with gradle 7.3 #655

Closed
gkwan-ibm opened this issue Nov 19, 2021 · 10 comments
Closed

LGP not work with gradle 7.3 #655

gkwan-ibm opened this issue Nov 19, 2021 · 10 comments
Assignees

Comments

@gkwan-ibm
Copy link
Member

I got the following error when I use gradle 7.3.

gilberts-mbp:gradle gkwan$ gradle libertyStart
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
> Task :installLiberty FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':installLiberty' (type 'InstallLibertyTask').
  - In plugin 'liberty' type 'io.openliberty.tools.gradle.tasks.InstallLibertyTask' property 'libertyRuntimeConfiguration' has @Input annotation used on property of type 'Configuration'.
    
    Reason: A property of type 'Configuration' annotated with @Input cannot determine how to interpret the file.
    
    Possible solutions:
      1. Annotate with @InputFile for regular files.
      2. Annotate with @InputDirectory for directories.
      3. If you want to track the path, return File.absolutePath as a String and keep @Input.
    
    Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem.

* 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

BUILD FAILED in 6s
1 actionable task: 1 executed
@mattbsox
Copy link
Member

mattbsox commented Dec 8, 2021

This issue should be fixed with the 3.2 release. Version 3.3 had a similar issue fixed in #666. Updating to 3.3.1-SNAPSHOT should fix these issues for Gradle 7.3.

@jensengelke
Copy link

@mattbsox How would I point to 3.3.1-SNAPSHOT from my gradle file? It is not in maven central (or at least not resolved with my current repository definition).

I run into a related issue with gradle-7.3.3 and the open liberty plugin 3.3:

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':liberty:installFeature' (type 'InstallFeatureTask').
  - In plugin 'io.openliberty.tools.gradle.Liberty' type 'io.openliberty.tools.gradle.tasks.InstallFeatureTask' property 'additionalJsonList' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'io.openliberty.tools.gradle.Liberty' type 'io.openliberty.tools.gradle.tasks.InstallFeatureTask' property 'newProject' is missing an input or output annotation.
    
    Reason: A property without annotation isn't considered during up-to-date checking.
    
    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.
    
    Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#missing_annotation for more details about this problem.

* 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

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

The issue appears to be fixed with #666 but there hasn't been a release to pick up.

@cherylking
Copy link
Member

@jensengelke You need to add the sonatype repo to pick up a snapshot. Our readme contains a snippet like this:

buildscript {
    repositories {
        mavenCentral()
        maven {
            name = 'Sonatype Nexus Snapshots'
            url = 'https://oss.sonatype.org/content/repositories/snapshots/'
        }
    }
    dependencies {
        classpath 'io.openliberty.tools:liberty-gradle-plugin:3.3.1-SNAPSHOT'
    }
}

@jensengelke
Copy link

Thanks @cherylking
This worked.

Is there a timeline when to expect a release?

@cherylking
Copy link
Member

@jensengelke We will likely have a milestone release in February as we have some new functionality currently under development.

@realModusOperandi
Copy link

Will there be a public 3.3.1 release? As of right now it's not possible to use LGP on Java 17 due to the confluence of version incompatibilities. It's also extremely difficult to convert a build.gradle.kts to point at the snapshots (and then convert it back when a public release is available.)

@cherylking
Copy link
Member

@realModusOperandi We have been planning a release for late March with some new functionality and this fix will be included. It will most likely be a 3.4 release since it includes new functionality.

@jensengelke
Copy link

jensengelke commented Apr 20, 2022

@cherylking How does 3.3.1 progress?
Older versions of the plugin and gradle appear WhiteSource reports. We'd like to close these findings by moving to a properly released plugin that can support latest gradle.

@cherylking
Copy link
Member

@jensengelke Hello, I totally understand and the new release was supposed to be delivered already, but some final fixes were needed. The 3.4 release is imminent. Should be published early next week.

@cherylking
Copy link
Member

cherylking commented Apr 26, 2022

@jensengelke @realModusOperandi Sorry for the delay. The 3.3.1 release has been published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants