MAVEN Archtype 15 Issue with AEM 6.4.3

Avatar

Avatar
Validate 10
Level 3
sathya_prakasha
Level 3

Likes

22 likes

Total Posts

100 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sathya_prakasha
Level 3

Likes

22 likes

Total Posts

100 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sathya_prakasha
Level 3

29-03-2019

Hi Team,

I have created maven project and deployed the same into my local server. I have created a new package under core bundle just say(com.example.myOrg) and created a some couple of java classes . I am getting an error as "com.example.myOrg.*. cannot be resolved to a type" when I am using those java class in my component.

The same java classes are working fine if i moved the classes into other packages which was created by maven intially. The issue is with newly created package alone.

* Bundle is in active status

Do we need to configure something on pom.xml for this?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 2
kiranv40650953
Level 2

Likes

8 likes

Total Posts

32 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 2
kiranv40650953
Level 2

Likes

8 likes

Total Posts

32 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
kiranv40650953
Level 2

01-04-2019

Hi Sathya,

Update your core pom.xml plugin with <Sling-Model-Packages> tag  like below.

<build>

   <plugins>

   <plugin>

   <groupId>org.apache.sling</groupId>

   <artifactId>maven-sling-plugin</artifactId>

   </plugin>

   <plugin>

   <groupId>org.apache.felix</groupId>

   <artifactId>maven-bundle-plugin</artifactId>

   <extensions>true</extensions>

   <configuration>

   <instructions>


   <Import-Package>

  javax.inject;version=1.0.0,*

   </Import-Package>

   <Sling-Model-Packages>

  com.example.myorg,

    </Sling-Model-Packages>

   </instructions>

   </configuration>

   </plugin>

   </plugins>

</build>

Let me Know if you face any issue.

Thanks,

Kiran

Answers (2)

Answers (2)

Avatar

Avatar
Validate 10
Level 3
sathya_prakasha
Level 3

Likes

22 likes

Total Posts

100 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile

Avatar
Validate 10
Level 3
sathya_prakasha
Level 3

Likes

22 likes

Total Posts

100 posts

Correct reply

2 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 10
View profile
sathya_prakasha
Level 3

01-04-2019

Hi Kiran,

Its not working  ... If I put export package - com.adobe.aem.guides.wknd.core.*  , its working ..any pointers here? i                 

<instructions>

                        <!-- Import any version of javax. , to allow running on multiple versions of AEM -->

                        <Import-Package>javax.inject;version=0.0.0,*</Import-Package>

                        <!--<Export-Package>com.adobe.aem.guides.wknd.core.*</Export-Package> -->

                        <Bundle-SymbolicName>com.adobe.aem.guides.aem-guides-wknd.core</Bundle-SymbolicName>

                          <Sling-Model-Packages>

                            com.adobe.aem.guides.wknd.core

                        </Sling-Model-Packages>

                       

                    </instructions>

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,329 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,462 likes

Total Posts

3,329 posts

Correct reply

949 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

01-04-2019

Hi,

Please don’t use package name in Capital letter.

Package name should be in small case.