Closed dipen-sen closed 5 years ago
Hi @dipen-sen, please add more information and describe the actual issue. I'm closing this issue for now, but we'll reopen it if we get more information.
@gabrielwalt Once you create a project in Eclipse using AEM archetype, you will get this error in eclipse for core and test module pom.xml.
Missing m2e incremental build support for generating the bundle manifest, component descriptions and metatype resources. Please use the provided Quick Fixes on this issue to resolve this.
You need to manually define below in maven-bundle-plugin to get rid of this error.
<executions> <execution>
<id>scr-metadata</id>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<supportIncrementalBuild>true</supportIncrementalBuild>
</configuration>
</execution>
</executions>
@gabrielwalt Can you please have a look into it?
@gabrielwalt Did you get time to check? This issue is inherited into all archtypes.
Were you able to get this working? For some reason I cannot. I read the directions provided here which links to this which in turn links to this.
The instructions basically boil down to the change you've indicated above however after cutting and pasting your code into my project, Eclipse is still giving me the same errors. It would be helpful to me if I knew that someone else had overcome this issue.
@rmcdouga I had the same problem, and follow the step @dipen-sen provided, I can get it to work. What I did is copy and paste too, and right click on project > maven > update project.
http://felix.apache.org/documentation/faqs/apache-felix-bundle-plugin-faq.html copy and paste the missing part.
Thanks to @EasonPai and @hwrichter . I tried this again and it now works in my project based on Archetype 16. I copied and pasted the text from the 11 Oct 2018 post by @dipen-sen into the core project's pom.xml file (minus the surrounding
@gabrielwalt , @bpauli can we re-open this issue and update the poms in core and it.tests? IMO the archetype should already be pre-configured in the POMs to support the incremental build and avoid seeing errors in eclipse when dropping in a fresh project generated from the archetype.
FWIW here are the updates I made to the maven-bundle-plugin in core/pom.xml
(following generation of archetype 17):
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>generate-osgi-metadata-for-unittests</id>
<goals>
<goal>manifest</goal>
</goals>
<phase>process-classes</phase>
</execution>
<execution>
<id>scr-metadata</id>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<supportIncrementalBuild>true</supportIncrementalBuild>
</configuration>
</execution>
</executions>
<configuration>
<exportScr>true</exportScr>
<instructions>
<!-- Import any version of javax.inject, to allow
running on multiple versions of AEM -->
<Import-Package>javax.inject;version=0.0.0,*</Import-Package>
<Sling-Model-Packages>
com.adobe.aem.guides.wknd.core
</Sling-Model-Packages>
<_dsannotations>*</_dsannotations>
<_metatypeannotations>*</_metatypeannotations>
<!-- Allow the processing of SCR annotations via
a bnd plugin -->
<_plugin>org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin;destdir=${project.build.outputDirectory}</_plugin>
</instructions>
</configuration>
And the updates in it.tests/pom.xml
:
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<inherited>true</inherited>
<executions>
<!-- Configure extra execution of 'manifest' in process-classes phase to make sure SCR metadata is generated before unit test runs -->
<execution>
<id>scr-metadata</id>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<supportIncrementalBuild>true</supportIncrementalBuild>
</configuration>
</execution>
</executions>
<configuration>
<exportScr>true</exportScr>
<instructions>
<Sling-Test-Regexp>.*Test</Sling-Test-Regexp>
<!-- Enable processing of OSGI DS component annotations -->
<_dsannotations>*</_dsannotations>
<!-- Enable processing of OSGI metatype annotations -->
<_metatypeannotations>*</_metatypeannotations>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
@godanny86 Thank you for bringing this up again. I'll reopen the issue.
This is still a problem in the aem-guides-wknd-events.core projects
Modifying pom.xml like this solves the issue.
Similar changes needed in it.tests module as well.