com.google.guava not deploying to console when embedded as a third party dependency | Community
Skip to main content
Level 4
August 11, 2022

com.google.guava not deploying to console when embedded as a third party dependency

  • August 11, 2022
  • 2 replies
  • 1703 views

Hello Team,

 

I am trying to embed com.google.guava jar file as a third party dependency in my maven build. But it does not deploy to felix console. When I try to manually upload to felix console it works but not through maven build.

 

I am following the below steps for this.

In the main pom of the project, I am adding it as a dependency.

<dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
</dependency>

 

In ui.apps, I am embedding it as below.

<embedded>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <target>/apps/my-project/install</target>
</embedded>

 

I have the physical jar file in the above mentioned location as well. I tried similar steps for other jar files and they were deployed to felix console. But only this jar file (com.google.gauva) doesn't deploy.

 

Kindly suggest.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Nikhil_Verma
Level 4
August 12, 2022

This works for me:

 

1. Add below in main pom (You've already done that):

<dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
</dependency>

 

2. In core pom:

<project>
  ..
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Include-Resource> @2838557-{version}.jar </Include-Resource>  [Example: @2838557-31.1-jre.jar]
.........
.........
</project>
 
3. In core pom again, add below dependecy:
<dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
</dependency>
 
4. In apps pom, remove the below dependency:
<dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
</dependency>
 
If this doesn't work, then unpack the jar file for your maven project and see if the guava jar file exists in it?
Level 4
August 12, 2022

Hi @nikhil_verma, I tried the way you suggested. It still doesn't work.

Also, I unpacked the jar file and checked for guava jar. Its not there. So it explains why its not deploying but not sure why its not adding to manifest file.

Level 4
August 12, 2022

Please check this link as well and suggest if this could be the reason.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/unable-to-resolve-bundle/td-p/229089

 

HeenaMadan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
August 12, 2022

Try below code. It worked for me.

Add below dependency in root pom.xml

<dependencyManagement>
 <dependencies>
   <dependency>
	<groupId>com.google.guava</groupId>
	<artifactId>guava</artifactId>
	<version>20.0</version>
   </dependency>
 </dependencies>
</dependencyManagement>

 core pom.xml

<dependencies>
   <dependency>
	<groupId>com.google.guava</groupId>
	<artifactId>guava</artifactId>
    </dependency>
</dependencies>

in all module's pom.xml

<project>
<build>
        <plugins>
            <!-- ====================================================================== -->
            <!-- V A U L T   P A C K A G E   P L U G I N S                              -->
            <!-- ====================================================================== -->
            <plugin>
                <groupId>org.apache.jackrabbit</groupId>
                <artifactId>filevault-package-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <group><com.project...></group>
                    <packageType>container</packageType>
                    <properties>
                        <cloudManagerTarget>all</cloudManagerTarget>
                    </properties>
                    <!-- skip sub package validation for now as some vendor packages like CIF apps will not pass -->
                    <skipSubPackageValidation>true</skipSubPackageValidation>
                    <embeddeds>
                       
                        <embedded>
                            <groupId>com.google.guava</groupId>
                            <artifactId>guava</artifactId>
                            <target>/apps/<project-name-packages/application/install</target>
                        </embedded>
            
​                    </embeddeds>
					
                </configuration>
            </plugin>
        </plugins>
    </build>
	<dependencies>
	<dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
    </dependencies>
</project>

 

Level 4
August 12, 2022

@heenamadan - tried this as well. Still doesn't work. Do you think it has something to do with old archetype version. And something like mentioned in the below link?

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/unable-to-resolve-bundle/td-p/229089