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

Different p2 repository content generated on Windows and Linux/MacOS #323

Open
jpstotz opened this issue Sep 2, 2024 · 0 comments
Open

Comments

@jpstotz
Copy link

jpstotz commented Sep 2, 2024

I have some problems that the renerated p2 repo on MacOS/Linux contains artifacts that causes an OSGI dependency error at start-up of my Eclipse RCP based application.

I boiled the problem down to a minimal example which can be started by simply executing mvn (see at the end of this issue). On Windows it creates a a repository with these plugins:

image

On Linux and MacOS however I get this result (see especially the size of the .httpclient_4.5.13.jar file 764KB vs. 1.4MB):

-rw-rw-r-- 1 user user 328K Sep  2 15:57 org.apache.commons.codec_1.11.0.jar
-rw-rw-r-- 1 user user  61K Sep  2 15:57 org.apache.commons.logging_1.2.0.jar
-rw-rw-r-- 1 user user  32K Sep  2 15:57 org.apache.httpcomponents.fluent-hc_4.5.13.jar
-rw-rw-r-- 1 user user 1.4M Sep  2 15:57 org.apache.httpcomponents.httpclient_4.5.13.jar
-rw-rw-r-- 1 user user 161K Sep  2 15:57 org.apache.httpcomponents.httpclient-cache_4.5.13.jar
-rw-rw-r-- 1 user user 322K Sep  2 15:57 org.apache.httpcomponents.httpcore_4.4.13.jar
-rw-rw-r-- 1 user user  42K Sep  2 15:57 org.apache.httpcomponents.httpmime_4.5.13.jar

Based on the MANIFEST.MF files from the httpclient jar file from Windows respectively Linux it seems like the Windows version has been processed by bnd-tool and the Linux version has not ben processed. I wasn't able to understand which component decides if or if not to process a jar with bnd, therefore I am starting in this project with the issue. Is there any logging I can enable to shed some light on p2-maven-plugin and bnd-tool what they do (or not do)?

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>t</groupId>
  <artifactId>t</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>
  <build>
    <defaultGoal>package</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.reficio</groupId>
        <artifactId>p2-maven-plugin</artifactId>
        <version>2.1.0</version>
        <configuration></configuration>
        <executions>
          <execution>
            <id>generate-p2-site</id>
            <phase>compile</phase>
            <goals>
              <goal>site</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <id>org.apache.httpcomponents:httpclient-osgi:4.5.13</id>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
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

1 participant