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

Plugin is running twice and attempts to run on excluded module #35

Open
bemonovoid opened this issue Sep 4, 2018 · 1 comment
Open

Comments

@bemonovoid
Copy link

bemonovoid commented Sep 4, 2018

Using plugin version: 1.4.1-Final.
I have a multi module maven project that I am running with:
mvn -pl "!excluded-module-name" clean package -T 4C -X

(The excluded-module-name uses the plugin as follows:

           <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.5.0</version>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.0.0:exe:${os.detected.classifier}</pluginArtifact>
                </configuration>
                <executions>
                    ...
                </executions>
            </plugin>

)

Once the build started I can see from the logs:

14:49:39] : [Step 1/1] [INFO] os.detected.name: windows
[14:49:39] : [Step 1/1] [INFO] os.detected.arch: x86_64
[14:49:39] : [Step 1/1] [INFO] os.detected.classifier: windows-x86_64
[14:49:39] : [Step 1/1] [INFO] ------------------------------------------------------------------------
[14:49:39] : [Step 1/1] [INFO] Reactor Build Order:

Here goes the list of all the modules to be built (it does not have the excluded-module-name that is expected)

Finally the build successfully completes:

[15:00:58] : [Step 1/1] [INFO] BUILD SUCCESS
[15:00:58] : [Step 1/1] [INFO] ------------------------------------------------------------------------
[15:00:58] : [Step 1/1] [INFO] Total time: 11:20 min (Wall Clock)
[15:00:58] : [Step 1/1] [INFO] Finished at: 2018-09-04T15:00:58+01:00
....

After that it looks like the plugin attempts to run again with a failure:

[14:46:45] : [Step 1/1] [DEBUG] Extension realms for project my-artifact-name-SNAPSHOT: [ClassRealm[extension>kr.motd.maven:os-maven-plugin:1.4.1.Final, parent: sun.misc.Launcher$AppClassLoader@33909752]]
[14:46:45] : [Step 1/1] [DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[project>[my-artifact-name]-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[14:46:46]W: [Step 1/1] [ERROR] [ERROR] Could not find the selected project in the reactor: excluded-module-name @
[14:46:46]W: [Step 1/1] [ERROR] Could not find the selected project in the reactor: excluded-module-name -> [Help 1]
[14:46:46] : [Step 1/1] org.apache.maven.MavenExecutionException: Could not find the selected project in the reactor: excluded-module-name
[14:46:46] : [Step 1/1] at org.apache.maven.graph.DefaultGraphBuilder.trimExcludedProjects (DefaultGraphBuilder.java:263)
[14:46:46] : [Step 1/1] at org.apache.maven.graph.DefaultGraphBuilder.reactorDependencyGraph (DefaultGraphBuilder.java:125)

And the build that is in fact SUCCESSFUL fails.

If I run the build again just after this failure - it completes successfully without the plugin running twice.
The error reproduces randomly

@trustin
Copy link
Owner

trustin commented Feb 6, 2021

Sorry for a very late reply. Do you have a full stack trace of this failure? The given log does not show which part of this plugin is involved with the MavenExecutionException.

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