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

Commons IO Incompatibility: Missing AbstractStreamBuilder #37

Closed
melloware opened this issue Feb 24, 2024 · 19 comments
Closed

Commons IO Incompatibility: Missing AbstractStreamBuilder #37

melloware opened this issue Feb 24, 2024 · 19 comments

Comments

@melloware
Copy link
Contributor

With 1.3.0.

[ERROR] Failed to execute goal io.github.cleydyr:dart-sass-maven-plugin:1.3.0:compile-sass (generate-css-using-sass) on project designer: 
Execution generate-css-using-sass of goal io.github.cleydyr:dart-sass-maven-plugin:1.3.0:compile-sass failed: 
A required class was missing while executing io.github.cleydyr:dart-sass-maven-plugin:1.3.0:compile-sass: org/apache/commons/io/build/AbstractStreamBuilder

I think you need to upgrade to 2.15.1: https://commons.apache.org/proper/commons-io/

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

Can you backup your .m2 folder (to ensure the dependencies are downloaded again) and try to run the goal again?

@melloware
Copy link
Contributor Author

sure

@melloware
Copy link
Contributor Author

Did that and deleted my /temp directory as well same issue...

@melloware
Copy link
Contributor Author

This fixes it for me...

            <plugin>
                <groupId>io.github.cleydyr</groupId>
                <artifactId>dart-sass-maven-plugin</artifactId>
                <version>1.3.0</version>
                <executions>
                    <execution>
                        <id>generate-css-using-sass</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>compile-sass</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <inputFolder>${basedir}/src/main/webapp/resources/</inputFolder>
                    <outputFolder>${basedir}/src/main/webapp/resources/</outputFolder>
                    <update>true</update>
                    <noSourceMap>true</noSourceMap>
                    <style>COMPRESSED</style>
                    <quiet>false</quiet>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>commons-io</groupId>
                        <artifactId>commons-io</artifactId>
                        <version>2.15.1</version>
                    </dependency>
                </dependencies>
            </plugin>

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

By the way, your theme-builder project does not use commons-io.

[INFO] Scanning for projects...
[INFO] 
[INFO] ----------------------< org.primefaces:designer >-----------------------
[INFO] Building designer 13.0.0
[INFO]   from pom.xml
[INFO] --------------------------------[ war ]---------------------------------
[INFO] 
[INFO] --- dependency:3.6.1:tree (default-cli) @ designer ---
[INFO] org.primefaces:designer:war:13.0.0
[INFO] +- org.primefaces:primefaces:jar:13.0.6:compile
[INFO] +- org.primefaces.extensions:primefaces-extensions:jar:13.0.6:compile
[INFO] +- org.webjars:font-awesome:jar:6.4.0:compile
[INFO] +- org.webjars.npm:primeflex:jar:3.3.1:compile
[INFO] +- org.apache.myfaces.core:myfaces-api:jar:2.3.10:compile
[INFO] +- org.apache.myfaces.core:myfaces-impl:jar:2.3.10:compile
[INFO] |  +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  |  \- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  \- commons-digester:commons-digester:jar:1.8:compile
[INFO] +- org.apache.geronimo.specs:geronimo-atinject_1.0_spec:jar:1.2:compile
[INFO] +- org.apache.geronimo.specs:geronimo-jcdi_2.0_spec:jar:1.3:compile
[INFO] +- org.apache.geronimo.specs:geronimo-interceptor_1.2_spec:jar:1.2:compile
[INFO] +- org.apache.geronimo.specs:geronimo-annotation_1.3_spec:jar:1.3:compile
[INFO] +- org.apache.geronimo.specs:geronimo-validation_2.0_spec:jar:1.1:compile
[INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.3.6:compile
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.1:provided
[INFO] +- javax.el:javax.el-api:jar:3.0.0:provided
[INFO] +- org.apache.openwebbeans:openwebbeans-impl:jar:2.0.27:compile
[INFO] |  +- org.apache.xbean:xbean-finder-shaded:jar:4.21:compile
[INFO] |  +- org.apache.xbean:xbean-asm9-shaded:jar:4.21:compile
[INFO] |  \- org.apache.openwebbeans:openwebbeans-spi:jar:2.0.27:compile
[INFO] +- org.apache.openwebbeans:openwebbeans-jsf:jar:2.0.27:compile
[INFO] +- org.apache.openwebbeans:openwebbeans-web:jar:2.0.27:compile
[INFO] \- org.apache.openwebbeans:openwebbeans-el22:jar:2.0.27:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.514 s
[INFO] Finished at: 2024-02-24T14:45:19+01:00
[INFO] ------------------------------------------------------------------------

@melloware
Copy link
Contributor Author

melloware commented Feb 24, 2024

No it doesn't its very strange but is definitely picking it up somewhere as an incompatibility. I assume its another plugin? Since dependency tree doesn't show plugin dependencies

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

Can you attach the complete output of running MAVEN_OPTS="-verbose:class" mvn clean package on your project when it throws an error?

@melloware
Copy link
Contributor Author

Here you go:
verbose.txt

@melloware
Copy link
Contributor Author

Here it is when i change your plugin to 2.15.1
verbose-2151.txt

@melloware
Copy link
Contributor Author

Rebooted my machine. Deleted /temp and ./m2 and now the issue is gone. Sorry that was crazy. I have been using Maven since 2004 and I have never seen this kind of weirdness!

@melloware melloware reopened this Feb 24, 2024
@melloware
Copy link
Contributor Author

Nope nevermind a second build caused the issue again.

@melloware
Copy link
Contributor Author

only updating to 2.15.1 makes the issue not happen.

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

Can you run

set MAVEN_OPTS=-verbose:class
mvn clean package -X

remove the 2.15.1 to make the build throw an error, and attach the output here?

(Notice the extra debug option for maven -X.)

@melloware
Copy link
Contributor Author

Will do. Are you on windows or Linux? Our Linux build is working so I wonder if it's windows related somehow?

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

I'm using a Mac, but I can try on Windows 11 as well. The CI also runs the plugin with a sample project on multiple OSes (including Windows), but that project has no dependencies.

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

I could reproduce the behavior on a clean Windows VM.

Commit 69b4923 upgraded commons-compress from 1.24.0 to 1.26.0, the latter depending on commons-io 2.15.1. However, the plugin explicitly sets the commons-io 2.11.0 as a dependency. commons-io 2.11.0 doesn't have the class the error says can't be found.

I don't understand why it'd only happen on Windows and why the CI didn't catch this while executing the plugin.

Anyway, I'm fixing this and publishing a new plugin version soon.

Thanks, @melloware!

@cleydyr
Copy link
Owner

cleydyr commented Feb 24, 2024

Version 1.3.1 has been released!

@melloware
Copy link
Contributor Author

Woo hoo! Ok so I am not that crazy 😜

@melloware
Copy link
Contributor Author

Confirmed!

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

2 participants