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

Gradle 4.10.1+ is unable to build a working war project within a ear project if scala plugin is used #7014

Closed
KrauseStefan opened this issue Oct 4, 2018 · 7 comments

Comments

@KrauseStefan
Copy link

Gradle 4.10.1 is unable to build a sound war project within a ear project if Scala plugin is used.

Projects structure:

build.gradle (parrent)
|- build.gralde (war)
\- build.gralde (ear)

We have 200+ Scala sub projects in the overall project but only 2 sub projects is needed to reproduce.

All projects are configured to apply the Scala plugin from the parrent project

Expected Behavior

I would expect the behavior to be simuler to the one in previous Gradle versions

Current Behavior

The ear file contains a unexpected compileScala.mapping file, and the file has an entry in applications.xml

  <module>
    <ejb>compileScala.mapping</ejb>
  </module>

This causes in our case Wildfly to try to deploy the compileScala.mapping and fails at the extraction step.

Steps to Reproduce (for bugs)

Your Environment

Windows 10 1709

I've tested with a few Gradle version but the latest fails also fails

$  .\gradlew.bat -version
------------------------------------------------------------
Gradle 4.10.2
------------------------------------------------------------

Build time:   2018-09-19 18:10:15 UTC
Revision:     b4d8d5d170bb4ba516e88d7fe5647e2323d791dd

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_171 (Oracle Corporation 25.171-b11)
OS:           Windows 10 10.0 amd64

We are under strict rules not to leak source code.
If I cannot inspect what a build scan publishes I cannot share it, sorry.

@KrauseStefan
Copy link
Author

@KrauseStefan KrauseStefan changed the title Gradle 4.10.1+ is unable to build a sound war project within a ear project if scala plugin is used Gradle 4.10.1+ is unable to build a working war project within a ear project if scala plugin is used Oct 4, 2018
@oehme
Copy link
Contributor

oehme commented Oct 4, 2018

@big-guy Can you look into this one please?

@KrauseStefan
Copy link
Author

I see that the issue was added to the 5.0 RC1, does this mean that it will not be fixed for 4.10?
We are currently using 4.7 and I wanted to stop at 4.10 before fixing the deprecation warnings that would prevent us moving to 5.0

@big-guy
Copy link
Member

big-guy commented Oct 17, 2018

When I have a better idea of the fix for the underlying problem, we'll see about backporting.

As a workaround, can you try adding this to your war projects?

configurations.archives.artifacts.clear()
artifacts {
   archives war
}

If you want to try to do this generically, you can put this in the root project:

allprojects {
    pluginManager.withPlugin('war') {
        configurations.archives.artifacts.clear()
        artifacts {
            archives war
        }
    }
}

@KrauseStefan
Copy link
Author

Thank you I will try that tomorrow and get back to you

@big-guy big-guy modified the milestones: 5.0 RC1, 4.10.3 Oct 22, 2018
@KrauseStefan
Copy link
Author

The workaround works like a charm.
Thank you, I guess we should wait with closing this until the fixes are released.

big-guy added a commit that referenced this issue Dec 3, 2018
@big-guy
Copy link
Member

big-guy commented Dec 4, 2018

This will be released in 4.10.3 (hopefully today)

hyochan pushed a commit to dooboolab-community/flutter_inapp_purchase that referenced this issue Mar 13, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [gradle](https://gradle.org)
([source](https://togithub.com/gradle/gradle)) | patch | `4.10.2` ->
`4.10.3` |

---

### Release Notes

<details>
<summary>gradle/gradle</summary>

###
[`v4.10.3`](https://togithub.com/gradle/gradle/releases/tag/v4.10.3):
4.10.3

This bug-fix release contains **3** changes to Gradle 4.10.2:

-
[gradle/gradle#7510
-
[gradle/gradle#6849
-
[gradle/gradle#7014

It also incorporates all fixes to 4.10.1 and 4.10.2.

We recommend that you use Gradle 4.10.3 over 4.10, 4.10.1 and 4.10.2.

#### Upgrade Instructions

Switch your build to use Gradle 4.10.3 by updating your wrapper
properties:

`./gradlew wrapper --gradle-version=4.10.3`

Standalone downloads are available at https://gradle.org/install.

#### Reporting Problems

If you find a problem with Gradle 4.10.3, please file a bug on [GitHub
Issues](https://togithub.com/gradle/gradle/issues) adhering to our issue
guidelines. If you're not sure you're encountering a bug, please use the
[forum](https://discuss.gradle.org/c/help-discuss).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/dooboolab/flutter_inapp_purchase).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants