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

Not working for Eclipse/Tycho project #5

Closed
kriegaex opened this issue Mar 24, 2024 · 31 comments
Closed

Not working for Eclipse/Tycho project #5

kriegaex opened this issue Mar 24, 2024 · 31 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kriegaex
Copy link

Clone https://github.com/eclipse-aspectj/ajdt and import the project into IDEA 2023.3.6 Ultimate. You will only see this error in the "Build" tab:

Collection contains no element matching the predicate.

image

On reload, the IDEA log file only says:

2024-03-24 14:04:54,479 [16299532]   INFO - #c.i.o.e.u.ExternalSystemUtil - External project [C:/Users/xxx/Documents/java-src/org.eclipse.ajdt] resolution task started
2024-03-24 14:04:54,482 [16299535]   INFO - #c.i.o.e.u.ExternalSystemUtil - External project [C:/Users/xxx/Documents/java-src/org.eclipse.ajdt] resolution task executed in 3 ms.

This was my first try with the plugin, because you asked me to try it via your friend's LinkedIn account. This experience is not very encouraging.

@grisha9
Copy link
Owner

grisha9 commented Mar 24, 2024

I'm very sorry that you are having problems. I would be glad if you help me eliminate them.
I have a few questions:

  1. how build project from command line? 'mvn clean package' has error:
    image

  2. please select node in build tab: "org.eclipse.ajdt"
    image

and you will see the full log. Please send it to me.
I was unable to reproduce this error locally. But I found a problem with support tycho-source-plugin. And I will try to fix it as soon as possible. I will be glad if you help me debug errors related to the eclipse tycho project that you are experiencing.

Unfortunately, I have no experience with Eclipse/Tycho projects. And I debugged my plugin on projects - Quarkus / Spring-Boot-2.1.x. But I am ready to fix all the problems found

@kriegaex
Copy link
Author

kriegaex commented Mar 24, 2024

  • Maven 3.9.0 or newer (due to the recent Tycho update)
  • JDK 17+
  • mvn -P e431 -DskipTests package (or something like clean package, clean install)

Selecting build node "org.eclipse.ajdt" shows a completely empty log in the right panel.

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

If you have time, please download the version with additional logs 233.24.1 https://plugins.jetbrains.com/plugin/22370-gmaven/versions/beta . And try again. There must be a stack trace (See idea logs Help->Show log in editor or there may be a pop-up notification with an error). Send it to me. Because I can't reproduce your problem locally.
Sorry for wasting your time.

@grisha9 grisha9 self-assigned this Mar 25, 2024
@kriegaex
Copy link
Author

I can't reproduce your problem locally.

Are you saying, you can successfully import the project into IDEA with your plugin and build it, both from the Maven panel and - more importantly - from IDEA with Ctrl-F9?

@kriegaex
Copy link
Author

please download the version with additional logs 233.24.1 https://plugins.jetbrains.com/plugin/22370-gmaven/versions/beta . And try again. There must be a stack trace

java.util.NoSuchElementException: Collection contains no element matching the predicate.
	at ru.rzn.gmyasoedov.gmaven.util.ExecutionSettingsUtil.fillExecutionWorkSpace(ExecutionSettingsUtil.kt:180)
	at ru.rzn.gmyasoedov.gmaven.MavenManager.getExecutionSettings(MavenManager.java:219)
	at ru.rzn.gmyasoedov.gmaven.MavenManager.lambda$getExecutionSettingsProvider$1(MavenManager.java:89)
	at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:594)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.prepare(ExternalSystemFacadeManager.java:211)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:157)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:129)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:261)
	at jdk.proxy2/jdk.proxy2.$Proxy270.getResolver(Unknown Source)
	at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:104)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.executeSync(ExternalSystemUtil.java:464)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:325)
	at com.intellij.openapi.externalSystem.util.ExternalSystemTaskUnderProgress$2.run(ExternalSystemTaskUnderProgress.java:53)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:464)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

Are you saying, you can successfully import the project into IDEA with your plugin and build it, both from the Maven panel and - more importantly - from IDEA with Ctrl-F9?

I said that the project is being imported)
Because it is eclipse tycho project and it contain specific "tycho-source-plugin" and dependency plugin for to define source folders and additional dependencies which are tied to the compile phase.
So for successful import you need to specify an "Import args": compile (to run the plugins I listed above)
image

And select profiles e431 and intellij (double click on profile name)
image

And run "Reload all gmaven projects " in GMaven tool window.
Result:

  • i see detected source root folders from "tycho-source-plugin"
  • i see all libraries all downloaded and attached to project structure
    Bundled Maven Plugin didn't do this.

image

image

image

But yes project not build from IDEA with Ctrl-F9 I see error
image

But I'm not familiar with your subject area and don't know what these files are *.aj

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

Please try 233.24.2 version from https://plugins.jetbrains.com/plugin/22370-gmaven/versions/beta

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

But I'm not familiar with your subject area and don't know what these files are *.aj

Probably AspectJ plugin resolve it problem https://plugins.jetbrains.com/plugin/4679-aspectj

@kriegaex
Copy link
Author

The *.aj files are indeed AspectJ source code ones. I am the maintainer of AspectJ and therefore work a lot with AspectJ projects. AJDT is the Eclipse IDE integration for AspectJ. But my own favourite IDE is IntelliJ IDEA, i.e. I am in the weird situation of working on Eclipse plugins in IDEA to avoid having to work with Eclipse.

In Maven, the AspectJ Maven Plugin takes care of compiling the aspects and weaving them into other code. IDEA recognises AJ Maven and imports Maven projects, correctly adding an AspectJ facet to each corresponding module.

I am going to give your new beta a spin, if my day-time work allows it, and then report back.

@kriegaex
Copy link
Author

After updating to beta 2, I see:

java.lang.Throwable: empty projectBuildFile. allPaths [C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven] current: C:/Users/alexa/Documents/java-src/org.eclipse.ajdt_gmaven
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at ru.rzn.gmyasoedov.gmaven.util.ExecutionSettingsUtil.fillExecutionWorkSpace(ExecutionSettingsUtil.kt:59)
	at ru.rzn.gmyasoedov.gmaven.MavenManager.getExecutionSettings(MavenManager.java:219)
	at ru.rzn.gmyasoedov.gmaven.MavenManager.lambda$getExecutionSettingsProvider$1(MavenManager.java:89)
	at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:594)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.prepare(ExternalSystemFacadeManager.java:211)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:157)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:129)
	at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:261)
	at jdk.proxy2/jdk.proxy2.$Proxy198.getResolver(Unknown Source)
	at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:104)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.executeSync(ExternalSystemUtil.java:464)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:325)
	at com.intellij.openapi.externalSystem.util.ExternalSystemTaskUnderProgress$2.run(ExternalSystemTaskUnderProgress.java:53)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:86)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:464)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

@kriegaex
Copy link
Author

OK, I am one step further. I had to deactivate plugin https://plugins.jetbrains.com/plugin/16761-eclipse-pde-partial, which helped me compile the project with the regular Maven plugin. It seems to collide with GMaven.

Re-importing the project with profile e431 yields:

"C:\Program Files\Java\jdk-17.0.4.1\bin\java.exe" -Dmaven.ext.class.path=C:\Users\alexa\AppData\Roaming\JetBrains\IntelliJIdea2023.3\plugins\gmaven\lib\maven-ext-event-handler-1.0-SNAPSHOT.jar "-Dgmaven.maven.home=c:\Program Files\Java\apache-maven-3.9.6" -Dgmaven.plugin.annotation.paths.maven-compiler-plugin=annotationProcessorPaths -Dgmaven.plugins=org.apache.maven.plugins:maven-compiler-plugin;org.codehaus.mojo:build-helper-maven-plugin;org.codehaus.gmavenplus:gmavenplus-plugin;org.codehaus.gmaven:groovy-maven-plugin;org.jetbrains.kotlin:kotlin-maven-plugin -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -Djava.awt.headless=true -classpath "C:\Users\alexa\AppData\Roaming\JetBrains\IntelliJIdea2023.3\plugins\gmaven\lib\server-1.0-SNAPSHOT.jar;C:\Users\alexa\AppData\Roaming\JetBrains\IntelliJIdea2023.3\plugins\gmaven\lib\server-api-1.0-SNAPSHOT.jar;c:\Program Files\Java\apache-maven-3.9.6\boot\plexus-classworlds-2.7.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2018.3\lib\util_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2018.3\plugins\maven-model\lib\maven-model.jar" ru.rzn.gmyasoedov.gmaven.server.RemoteGMavenServer
Port/ServicesPort/ID: 22050/57673/GMavenServerImplf6357035

mvn -f C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\pom.xml -P e431 compile ru.rzn.gmyasoedov:model-reader:1.2:resolve
[INFO] Scanning for projects...
[INFO] Tycho Version:  4.0.6 (9942454590ad8a6e1c9aa907852cf017dc2ccb98)
[INFO] Tycho Mode:     project
[INFO] Tycho Builder:  maven
[INFO] Build Threads:  1
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] parent                                                             [pom]
[INFO] org.aspectj.runtime                                     [eclipse-plugin]
[INFO] org.aspectj.weaver                                      [eclipse-plugin]
[INFO] org.aspectj.ajde                                        [eclipse-plugin]
[INFO] org.aspectj                                            [eclipse-feature]
[INFO] org.eclipse.contribution.weaving.jdt                    [eclipse-plugin]
[INFO] org.eclipse.ajdt.core                                   [eclipse-plugin]
[INFO] org.eclipse.ajdt.doc.user                               [eclipse-plugin]
[INFO] org.eclipse.ajdt.examples                               [eclipse-plugin]
[INFO] org.eclipse.contribution.xref.core                      [eclipse-plugin]
[INFO] org.eclipse.contribution.xref.ui                        [eclipse-plugin]
[INFO] org.eclipse.contribution.visualiser                     [eclipse-plugin]
[INFO] org.eclipse.ajdt.ui                                     [eclipse-plugin]
[INFO] org.eclipse.aspectj                                     [eclipse-plugin]
[INFO] org.eclipse.equinox.weaving.aspectj                     [eclipse-plugin]
[INFO] org.eclipse.equinox.weaving.sdk                        [eclipse-feature]
[INFO] org.eclipse.ajdt                                       [eclipse-feature]
[INFO] org.eclipse.contribution.xref                          [eclipse-feature]
[INFO] org.eclipse.contribution.weaving                       [eclipse-feature]
[INFO] org.eclipse.ajdt.sdk                                   [eclipse-feature]
[INFO] org.eclipse.ajdt.core.tests                        [eclipse-test-plugin]
[INFO] org.eclipse.contribution.visualiser.tests          [eclipse-test-plugin]
[INFO] org.eclipse.ajdt.ui.tests                          [eclipse-test-plugin]
[INFO] org.eclipse.contribution.weaving.jdt.tests         [eclipse-test-plugin]
[INFO] org.eclipse.contribution.xref.core.tests           [eclipse-test-plugin]
[INFO] org.eclipse.contribution.xref.ui.tests             [eclipse-test-plugin]
[INFO] org.eclipse.equinox.weaving.aspectj.tests          [eclipse-test-plugin]
[INFO] org.eclipse.aspectj.feature_tests                      [eclipse-feature]
[INFO] org.eclipse.ajdt.releng                             [eclipse-repository]
[INFO] 
[INFO] ----------------------< org.eclipse.ajdt:parent >-----------------------
[INFO] Building parent 2.2.4-SNAPSHOT                                    [1/29]
[INFO]   from pom.xml
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] ----------------< org.aspectj.ajde:org.aspectj.runtime >----------------
[INFO] Building org.aspectj.runtime 1.9.22-SNAPSHOT                      [2/29]
[INFO]   from org.aspectj.runtime\pom.xml
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[WARNING] Parameter 'resolver' is unknown for plugin 'target-platform-configuration:4.0.6:target-platform (default-target-platform)'
[INFO] ### Using TychoRepositoryTransport for remote P2 access ###
[INFO]     Cache location:         C:\Users\alexa\.m2\repository\.cache\tycho
[INFO]     Transport mode:         online
[INFO]     Http Transport type:    Java11Client
[INFO]     Update mode:            cache first
[INFO]     Minimum cache duration: 60 minutes
[INFO]       (you can configure this with -Dtycho.p2.transport.min-cache-minutes=<desired minimum cache duration>)
[INFO] Downloading from p2: https://download.eclipse.org/releases/2024-03/p2.index
[INFO] Downloaded from p2: https://download.eclipse.org/releases/2024-03/p2.index (122 bytes at 0 bytes/s)
[INFO] Adding repository https://download.eclipse.org/releases/2024-03
[INFO] Downloading from p2: https://download.eclipse.org/technology/epp/packages/2024-03/p2.index
[INFO] Downloading from p2: https://download.eclipse.org/technology/epp/packages/2024-03/202403071200/p2.index
[INFO] Downloading from p2: https://download.eclipse.org/releases/2024-03/202403131000/p2.index
[INFO] Downloaded from p2: https://download.eclipse.org/releases/2024-03/202403131000/p2.index (140 bytes at 68 KB/s)
[INFO] 
[INFO] --- tycho-packaging:4.0.6:build-qualifier (default-build-qualifier) @ org.aspectj.runtime ---
[INFO] The project's OSGi version is 1.9.22.202403251044
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-id (default-validate-id) @ org.aspectj.runtime ---
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-version (default-validate-version) @ org.aspectj.runtime ---
[INFO] 
[INFO] --- target-platform-configuration:4.0.6:target-platform (default-target-platform) @ org.aspectj.runtime ---
[INFO] 
[INFO] --- tycho-compiler:4.0.6:validate-classpath (default-validate-classpath) @ org.aspectj.runtime ---
[INFO] Resolving class path of org.aspectj.runtime
[INFO] 
[INFO] --- dependency:3.5.0:unpack (unpack-aspectj-content) @ org.aspectj.runtime ---
[INFO] Configured Artifact: org.aspectj:aspectjrt:1.9.22:jar
[INFO] Configured Artifact: org.aspectj:aspectjrt:sources:1.9.22:java-source
[INFO] aspectjrt-1.9.22.jar already unpacked.
[INFO] aspectjrt-1.9.22-sources.jar already unpacked.
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ org.aspectj.runtime ---
[INFO] skip non existing resourceDirectory C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.aspectj.runtime\src\main\resources
[INFO] 
[INFO] --- tycho-compiler:4.0.6:compile (default-compile) @ org.aspectj.runtime ---
[INFO] 
[INFO] ----------------< org.aspectj.ajde:org.aspectj.weaver >-----------------
[INFO] Building org.aspectj.weaver 1.9.22-SNAPSHOT                       [3/29]
[INFO]   from org.aspectj.weaver\pom.xml
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[WARNING] Parameter 'resolver' is unknown for plugin 'target-platform-configuration:4.0.6:target-platform (default-target-platform)'
[INFO] 
[INFO] --- tycho-packaging:4.0.6:build-qualifier (default-build-qualifier) @ org.aspectj.weaver ---
[INFO] The project's OSGi version is 1.9.22.202403251044
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-id (default-validate-id) @ org.aspectj.weaver ---
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-version (default-validate-version) @ org.aspectj.weaver ---
[INFO] 
[INFO] --- target-platform-configuration:4.0.6:target-platform (default-target-platform) @ org.aspectj.weaver ---
[INFO] 
[INFO] --- tycho-compiler:4.0.6:validate-classpath (default-validate-classpath) @ org.aspectj.weaver ---
[INFO] Resolving class path of org.aspectj.weaver
[INFO] 
[INFO] --- dependency:3.5.0:unpack (unpack-aspectj-content) @ org.aspectj.weaver ---
[INFO] Configured Artifact: org.aspectj:aspectjweaver:1.9.22:jar
[INFO] Configured Artifact: org.aspectj:aspectjweaver:sources:1.9.22:java-source
[INFO] aspectjweaver-1.9.22.jar already unpacked.
[INFO] aspectjweaver-1.9.22-sources.jar already unpacked.
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ org.aspectj.weaver ---
[INFO] skip non existing resourceDirectory C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.aspectj.weaver\src\main\resources
[INFO] 
[INFO] --- tycho-compiler:4.0.6:compile (default-compile) @ org.aspectj.weaver ---
[INFO] 
[INFO] -----------------< org.aspectj.ajde:org.aspectj.ajde >------------------
[INFO] Building org.aspectj.ajde 1.9.22-SNAPSHOT                         [4/29]
[INFO]   from org.aspectj.ajde\pom.xml
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[WARNING] Parameter 'resolver' is unknown for plugin 'target-platform-configuration:4.0.6:target-platform (default-target-platform)'
[INFO] Downloading from p2: https://download.eclipse.org/releases/2024-03/p2.index
[INFO] Downloaded from p2: https://download.eclipse.org/releases/2024-03/p2.index (122 bytes at 59 KB/s)
[INFO] Downloading from p2: https://download.eclipse.org/technology/epp/packages/2024-03/p2.index
[INFO] Downloading from p2: https://download.eclipse.org/technology/epp/packages/2024-03/202403071200/p2.index
[INFO] Downloading from p2: https://download.eclipse.org/releases/2024-03/202403131000/p2.index
[INFO] Downloaded from p2: https://download.eclipse.org/releases/2024-03/202403131000/p2.index (140 bytes at 136 KB/s)
[INFO] 
[INFO] --- tycho-packaging:4.0.6:build-qualifier (default-build-qualifier) @ org.aspectj.ajde ---
[INFO] The project's OSGi version is 1.9.22.202403251044
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-id (default-validate-id) @ org.aspectj.ajde ---
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-version (default-validate-version) @ org.aspectj.ajde ---
[INFO] 
[INFO] --- target-platform-configuration:4.0.6:target-platform (default-target-platform) @ org.aspectj.ajde ---
[INFO] 
[INFO] --- tycho-compiler:4.0.6:validate-classpath (default-validate-classpath) @ org.aspectj.ajde ---
[INFO] Resolving class path of org.aspectj.ajde
[INFO] 
[INFO] --- dependency:3.5.0:unpack (unpack-aspectj-content) @ org.aspectj.ajde ---
[INFO] Configured Artifact: org.aspectj:aspectjtools:1.9.22:jar
[INFO] Configured Artifact: org.aspectj:aspectjtools:sources:1.9.22:java-source
[INFO] aspectjtools-1.9.22.jar already unpacked.
[INFO] aspectjtools-1.9.22-sources.jar already unpacked.
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ org.aspectj.ajde ---
[INFO] skip non existing resourceDirectory C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.aspectj.ajde\src\main\resources
[INFO] 
[INFO] --- tycho-compiler:4.0.6:compile (default-compile) @ org.aspectj.ajde ---
[INFO] 
[INFO] --------------------< org.aspectj.ajde:org.aspectj >--------------------
[INFO] Building org.aspectj 1.9.22-SNAPSHOT                              [5/29]
[INFO]   from org.aspectj-feature\pom.xml
[INFO] --------------------------[ eclipse-feature ]---------------------------
[WARNING] Parameter 'resolver' is unknown for plugin 'target-platform-configuration:4.0.6:target-platform (default-target-platform)'
[INFO] 
[INFO] --- tycho-packaging:4.0.6:build-qualifier-aggregator (default-build-qualifier-aggregator) @ org.aspectj ---
[INFO] The project's OSGi version is 1.9.22.202403251044
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-id (default-validate-id) @ org.aspectj ---
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-version (default-validate-version) @ org.aspectj ---
[INFO] 
[INFO] --- target-platform-configuration:4.0.6:target-platform (default-target-platform) @ org.aspectj ---
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ org.aspectj ---
[INFO] skip non existing resourceDirectory C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.aspectj-feature\src\main\resources
[INFO] 
[INFO] -------< org.eclipse.ajdt:org.eclipse.contribution.weaving.jdt >--------
[INFO] Building org.eclipse.contribution.weaving.jdt 2.2.4-SNAPSHOT      [6/29]
[INFO]   from org.eclipse.contribution.weaving.jdt\pom.xml
[INFO] ---------------------------[ eclipse-plugin ]---------------------------
[WARNING] Parameter 'resolver' is unknown for plugin 'target-platform-configuration:4.0.6:target-platform (default-target-platform)'
[WARNING] The following locally built units have been used to resolve project dependencies:
[WARNING]   org.eclipse.jdt.core/3.38.0.v20240322-1515
[WARNING]   org.eclipse.jdt.core.source/3.38.0.v20240322-1515
[WARNING]   org.eclipse.jdt.core.compiler.batch/3.38.0.v20240322-1515
[WARNING]   org.eclipse.jdt.core.compiler.batch.source/3.38.0.v20240322-1515
[INFO] 
[INFO] --- tycho-packaging:4.0.6:build-qualifier (default-build-qualifier) @ org.eclipse.contribution.weaving.jdt ---
[INFO] The project's OSGi version is 2.2.4.202403251044
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-id (default-validate-id) @ org.eclipse.contribution.weaving.jdt ---
[INFO] 
[INFO] --- tycho-packaging:4.0.6:validate-version (default-validate-version) @ org.eclipse.contribution.weaving.jdt ---
[INFO] 
[INFO] --- target-platform-configuration:4.0.6:target-platform (default-target-platform) @ org.eclipse.contribution.weaving.jdt ---
[INFO] 
[INFO] --- tycho-compiler:4.0.6:validate-classpath (default-validate-classpath) @ org.eclipse.contribution.weaving.jdt ---
[INFO] Resolving class path of org.eclipse.contribution.weaving.jdt
[INFO] 
[INFO] --- aspectj:1.14:compile (compile) @ org.eclipse.contribution.weaving.jdt ---
[INFO] No modifications found skipping aspectJ compile
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ org.eclipse.contribution.weaving.jdt ---
[INFO] skip non existing resourceDirectory C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\main\resources
[INFO] 
[INFO] --- tycho-compiler:4.0.6:compile (default-compile) @ org.eclipse.contribution.weaving.jdt ---
Downloading from ossrh-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/osgi/org.osgi.annotation.bundle/maven-metadata.xml
Downloaded from ossrh-snapshots: https://oss.sonatype.org/content/repositories/snapshots/org/osgi/org.osgi.annotation.bundle/maven-metadata.xml (350 B at 104 B/s)
[INFO] Compiling 5 source files to C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\target\classes using Eclipse Compiler for Java(TM) 3.36.0.v20231114-0937
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Skipping parent
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] parent 2.2.4-SNAPSHOT .............................. SUCCESS [  0.011 s]
[INFO] org.aspectj.runtime 1.9.22-SNAPSHOT ................ SUCCESS [ 10.692 s]
[INFO] org.aspectj.weaver 1.9.22-SNAPSHOT ................. SUCCESS [  0.435 s]
[INFO] org.aspectj.ajde 1.9.22-SNAPSHOT ................... SUCCESS [  1.472 s]
[INFO] org.aspectj 1.9.22-SNAPSHOT ........................ SUCCESS [  0.084 s]
[INFO] org.eclipse.contribution.weaving.jdt 2.2.4-SNAPSHOT  FAILURE [ 10.539 s]
[INFO] org.eclipse.ajdt.core 2.2.4-SNAPSHOT ............... SKIPPED
[INFO] org.eclipse.ajdt.doc.user 2.2.4-SNAPSHOT ........... SKIPPED
[INFO] org.eclipse.ajdt.examples 2.2.4-SNAPSHOT ........... SKIPPED
[INFO] org.eclipse.contribution.xref.core 2.2.4-SNAPSHOT .. SKIPPED
[INFO] org.eclipse.contribution.xref.ui 2.2.4-SNAPSHOT .... SKIPPED
[INFO] org.eclipse.contribution.visualiser 2.2.4-SNAPSHOT . SKIPPED
[INFO] org.eclipse.ajdt.ui 2.2.4-SNAPSHOT ................. SKIPPED
[INFO] org.eclipse.aspectj 2.2.4-SNAPSHOT ................. SKIPPED
[INFO] org.eclipse.equinox.weaving.aspectj 1.0.400-SNAPSHOT SKIPPED
[INFO] org.eclipse.equinox.weaving.sdk 1.2.0-SNAPSHOT ..... SKIPPED
[INFO] org.eclipse.ajdt 2.2.4-SNAPSHOT .................... SKIPPED
[INFO] org.eclipse.contribution.xref 2.2.4-SNAPSHOT ....... SKIPPED
[INFO] org.eclipse.contribution.weaving 2.2.4-SNAPSHOT .... SKIPPED
[INFO] org.eclipse.ajdt.sdk 2.2.4-SNAPSHOT ................ SKIPPED
[INFO] org.eclipse.ajdt.core.tests 2.2.4-SNAPSHOT ......... SKIPPED
[INFO] org.eclipse.contribution.visualiser.tests 2.2.4-SNAPSHOT SKIPPED
[INFO] org.eclipse.ajdt.ui.tests 2.2.4-SNAPSHOT ........... SKIPPED
[INFO] org.eclipse.contribution.weaving.jdt.tests 2.2.4-SNAPSHOT SKIPPED
[INFO] org.eclipse.contribution.xref.core.tests 2.2.4-SNAPSHOT SKIPPED
[INFO] org.eclipse.contribution.xref.ui.tests 2.2.4-SNAPSHOT SKIPPED
[INFO] org.eclipse.equinox.weaving.aspectj.tests 1.0.400-SNAPSHOT SKIPPED
[INFO] org.eclipse.aspectj.feature_tests 2.2.4-SNAPSHOT ... SKIPPED
[INFO] org.eclipse.ajdt.releng 2.2.4-SNAPSHOT ............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  35.997 s
[INFO] Finished at: 2024-03-25T11:44:38+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:4.0.6:compile (default-compile) on project org.eclipse.contribution.weaving.jdt: Compilation failure: Compilation failure: 
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\JDTWeavingPlugin.java:[49] 
[ERROR] 	if (!IsWovenTester.isWeavingActive() && JDTWeavingPreferences.shouldAskToEnableWeaving()) {
[ERROR] 	     ^^^^^^^^^^^^^
[ERROR] IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\WeavingTestApplication.java:[22] 
[ERROR] 	if (IsWovenTester.isWeavingActive()) {
[ERROR] 	    ^^^^^^^^^^^^^
[ERROR] IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\WeavingTestApplication.java:[42] 
[ERROR] 	return IsWovenTester.isWeavingActive() ? WEAVING_ENABLED : WEAVING_DISABLED;
[ERROR] 	       ^^^^^^^^^^^^^
[ERROR] IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\preferences\JDTWeavingPreferences.java:[14] 
[ERROR] 	import org.eclipse.contribution.jdt.IsWovenTester;
[ERROR] 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.eclipse.contribution.jdt.IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\preferences\JDTWeavingPreferences.java:[71] 
[ERROR] 	IsWovenTester.isWeavingActive() &&
[ERROR] 	^^^^^^^^^^^^^
[ERROR] IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\preferences\WeavableProjectListener.java:[17] 
[ERROR] 	import org.eclipse.contribution.jdt.IsWovenTester;
[ERROR] 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.eclipse.contribution.jdt.IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\preferences\WeavableProjectListener.java:[187] 
[ERROR] 	if (!IsWovenTester.isWeavingActive()) {
[ERROR] 	     ^^^^^^^^^^^^^
[ERROR] IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\preferences\WeavingStateConfigurer.java:[24] 
[ERROR] 	import org.eclipse.contribution.jdt.IsWovenTester;
[ERROR] 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ERROR] The import org.eclipse.contribution.jdt.IsWovenTester cannot be resolved
[ERROR] C:\Users\alexa\Documents\java-src\org.eclipse.ajdt_gmaven\org.eclipse.contribution.weaving.jdt\src\org\eclipse\contribution\jdt\preferences\WeavingStateConfigurer.java:[50] 
[ERROR] 	private final static boolean IS_WEAVING = IsWovenTester.isWeavingActive();
[ERROR] 	                                          ^^^^^^^^^^^^^
[ERROR] IsWovenTester cannot be resolved
[ERROR] 9 problems (9 errors)
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :org.eclipse.contribution.weaving.jdt

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

please enable also profile "intelliji" or replace compile to package in imports args. But the "package" phase looks very redundant

@kriegaex
Copy link
Author

kriegaex commented Mar 25, 2024

Oh yes, long ago I added that profile as a workaround for the fact that the modules

  • org.aspectj.runtime,
  • org.aspectj.weaver,
  • org.aspectj.ajde

actually do not compile anything, but simply re-package sources and binaries into new JARs, adding Eclipse-related OSGi stuff to the manifests. I was just thinking about moving all those plugin executions to pre-compile phases in order to enable the plugin to find the artifacts, but actually the special profile is easier for now. I am going to stash the POM changes I was in the process of making and try the profile first.

@kriegaex
Copy link
Author

OK, -P e431,intellij compile seems to have done the trick, despite GMaven not having recognised and imported the AspectJ facet. Deferring compilation to Maven and then to recompile in IDEA kind of defeats the whole purpose of importing build settings from Maven, but at least somehow I was able to do an IDE build without getting reports about missing classes.

Do you feel like integrating Aspectj Maven into GMaven?

@kriegaex
Copy link
Author

kriegaex commented Mar 25, 2024

Actually, when closing an reopening the project, it did not remember the profile settings and reimported with compile only, which failed. Back to square one. So, I actually had to add compile -P e431,intellij to the plugin's import args to make re-import reliable. That is not so nice, because if I want to switch profiles, e.g. to e430, I have different fixed values in the plugin settings.

Worse, the profile settings for the IDE build were also forgotten, I had to re-select the same profiles in the GMaven tab on the right.

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

Deferring compilation to Maven and then to recompile in IDEA kind of defeats the whole purpose of importing build settings from Maven

Yes, this is a price for simplicity, so that you can get all the information about the project from Maven (content roots and dependencies). The IDEA Maven plugin uses a different approach, where code is duplicated from tycho-*-plugins and etc. But this leads, as practice shows, to many errors. I believe that there should be one data source - Maven. Excessive customization will lead to errors.

Do you feel like integrating Aspectj Maven into GMaven?

Thanks for the feedback. I'll try to study this aspect in the near future.

How did you work with your project before if the Maven bundled plugin does not recognize either the dependencies and the content roots?

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

Worse, the profile settings for the IDE build were also forgotten, I had to re-select the same profiles in the GMaven tab on the right.

strangely it doesn't play locally. I'll take a look

@kriegaex
Copy link
Author

Even after a successfuly compile with Ctrl-F9, which ever file I open does not seem to find the imported dependencies, even if I can open their classes from the IDE, if I search for them with Ctrl-N.

image

@kriegaex
Copy link
Author

Another problem is that whenever I close and reopen the project, I get this error:

com.intellij.openapi.externalSystem.model.ExternalSystemException: See log for details
	at ru.rzn.gmyasoedov.gmaven.server.GServerHelper.processExceptions(GServerHelper.kt:196)
	at ru.rzn.gmyasoedov.gmaven.server.GServerHelper.runMavenTask(GServerHelper.kt:162)
	at ru.rzn.gmyasoedov.gmaven.server.GServerHelper.runMavenTask$default(GServerHelper.kt:155)
	at ru.rzn.gmyasoedov.gmaven.server.GServerHelper.getProjectModel(GServerHelper.kt:51)
	at ru.rzn.gmyasoedov.gmaven.project.MavenProjectResolver.resolveProjectInfo(MavenProjectResolver.kt:65)
	at ru.rzn.gmyasoedov.gmaven.project.MavenProjectResolver.resolveProjectInfo(MavenProjectResolver.kt:37)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:35)
	at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:40)
	at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:34)
	at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:46)
	at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:125)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
	at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:123)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.executeSync(ExternalSystemUtil.java:464)
	at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:325)
	at com.intellij.openapi.externalSystem.util.ExternalSystemTaskUnderProgress$2.run(ExternalSystemTaskUnderProgress.java:53)
	at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:434)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:132)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:484)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:248)
	at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:192)
	at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:610)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:685)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:641)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:609)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:78)
	at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:179)
	at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:73)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:248)
	at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:498)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:81)
	at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invokeSuspend(propagation.kt:195)
	at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invoke(propagation.kt)
	at com.intellij.util.concurrency.Propagation$runAsCoroutine$deferred$1.invoke(propagation.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:44)
	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.async(Builders.common.kt:91)
	at kotlinx.coroutines.BuildersKt.async(Unknown Source)
	at com.intellij.util.concurrency.Propagation.runAsCoroutine(propagation.kt:190)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:89)
	at com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:81)
	at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:464)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
	at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
	at java.base/java.lang.Thread.run(Thread.java:840)

@kriegaex
Copy link
Author

Some good news in between - sorry for posting a lot here: Now suddenly, some modules have AspectJ facets.

@kriegaex
Copy link
Author

How did you work with your project before if the Maven bundled plugin does not recognize either the dependencies and the content roots?

A combination of PDE Partial plugin, OSGi plugin and the intellij profile.

@kriegaex
Copy link
Author

Another problem is that whenever I close and reopen the project, I get this error:

Worse than this, the error also appears when opening other projects that do not use GMaven but the normal Maven plugin.

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

Oh sorry... I use Linux so there is no way to test on Windows. This is where there are so many problems.
Please try 233.24.3 version from https://plugins.jetbrains.com/plugin/22370-gmaven/versions/beta
Fixed profiles and some small errors

@kriegaex
Copy link
Author

kriegaex commented Mar 25, 2024

Update installed. The problem from #5 (comment) still exists. I see that the OSGi dependencies are resolved to libraries in the project configuration by GMaven, but not listed as dependencies in the relevant modules. I am not sure if that is important, so I am mentioning it, just in case.

Look at this:
image

But the library is already part of the project, just not assigned as a plugin dependency.

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

This is very similar to the standard problem with the index idea. I do not have that. Try this Files -> Invalidate caches -> restart
You can also try deleting .idea folder and importing the project again.

image

@kriegaex
Copy link
Author

kriegaex commented Mar 25, 2024

Invalidating the caches did not help. After the restart, the class names are still red, even after a successful recompile. The GMaven tab forgot to remember the last state, i.e. opened list entries for profiles and modules (both closed again). It also forgot the selected profiles. I re-selected them, re-imported the project and issued a project rebuild. The rebuild purged the compiled aspects again, so I re-imported a second time. Next, I tried a normal IDEA build instead of a full rebuild. That build is slow, but successful, repeating what Maven just did. But to no avail, the classes are still unresolved. Next, I will purge the .idea folder and start from scratch. But that will be my last try. I gave this plugin the benefit of the doubt, but it causes more problems than it solves, even though the problems are different from my previous setup.

@kriegaex
Copy link
Author

For now, removing the IDEA project folder and starting from scratch helped. I will not work on that project much in the next few weeks, because I just finished an AspectJ update yesterday with the old setup, but I will definitely continue testing GMaven for this project and see how stable it is when changing files, closing and re-opening the project and IDEA etc.

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

Thank you for taking the time to leave a feedback. It is very important for me to make gmaven better

@kriegaex
Copy link
Author

As both an OSS user and developer, I know how important user feedback is. Your plugin has potential, but I did not want to test it in simpler projects which are dealt with nicely by the built-in Maven plugin, but on another one inadequately handled by IDEA out of the box. This is where the main benefit lies for me personally.

@grisha9
Copy link
Owner

grisha9 commented Mar 25, 2024

I completely agree with you that it is necessary to test on those projects on which Maven bundled plugin not work. I know one such project https://github.com/dbeaver/dbeaver.
I wrote about it in my article that the Maven bundled plugin does not open it (not recognize dependencies).
I will be glad if you can give me examples of projects that do not work as expected. If you have time.

grisha9 pushed a commit that referenced this issue Mar 25, 2024
grisha9 pushed a commit that referenced this issue Mar 25, 2024
grisha9 pushed a commit that referenced this issue Mar 25, 2024
grisha9 pushed a commit that referenced this issue Mar 25, 2024
grisha9 pushed a commit that referenced this issue Mar 25, 2024
grisha9 pushed a commit that referenced this issue Mar 25, 2024
grisha9 pushed a commit that referenced this issue Mar 25, 2024
@grisha9 grisha9 modified the milestones: 233.25, 232.25 Mar 27, 2024
@grisha9
Copy link
Owner

grisha9 commented Mar 29, 2024

Error opening project in Windows fixed in 232.25 and others versions (*.25). Already available in marketplace.
@kriegaex Support aspectj-maven-plugin will adding in #7

@grisha9 grisha9 closed this as completed Mar 29, 2024
@grisha9 grisha9 added the bug Something isn't working label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants