reficio / p2-maven-plugin

Maven3 plugin that automates the third-party dependency management for Eclipse RCP
http://reficio.org
230 stars 100 forks source link

Making a local site that _mimic_ a `.target` results in `ZipException: zip END header not found` #285

Closed bric3 closed 2 years ago

bric3 commented 2 years ago
[info] Resolving artifact=[org.eclipse.platform.sdk:4.20.0.I20210611-1600] source=[false]
[info]  Downloading: http://download.eclipse.org/releases/2021-06/202106161001/plugins/org.eclipse.platform.sdk_4.20.0.I20210611-1600.jar
[INFO] Command line:
    [/Users/brice.dutheil/.asdf/installs/java/corretto-11.0.13.8.1/bin/java, -jar, /Users/brice.dutheil/.m2/repository/org/eclipse/tycho/tycho-bundles-external/1.0.0/eclipse/plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar, -configuration, /var/folders/vr/gc7zwl7x1kvcykpbl0j4zdb00000gq/T/tycho-p2-runtime4676273878341494082.tmp/configuration, -nosplash, -application, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, -artifactRepository, file:/Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/repository, -metadataRepository, file:/Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/repository, -publishArtifacts, -compress, -nouses, -source, /Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/source]
Generating metadata for ..
Status ERROR: this code=0 publishing result null children=[Status OK: unknown code=0 OK null Status ERROR: org.eclipse.equinox.p2.publisher.eclipse code=0 An error occurred while publishing bundle /Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/source/plugins/org.eclipse.platform.sdk_4.20.0.I20210611-1600.jar: zip END header not found java.util.zip.ZipException: zip END header not found]
Product publisher application was executed with the following arguments:
-artifactRepository
file:/Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/repository
-metadataRepository
file:/Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/repository
-publishArtifacts
-compress
-nouses
-source
/Users/brice.dutheil/opensource/jmc/releng/platform-target-cache/target/source

So on the actual p2 site there's no similarly named files org.eclipse.platform.sdk:4.20.0.I20210611-1600.jar, but since the plugin seems to be using an equinox p2 command line tool I supposed this would resolved to the right artifact(s).

I am not sure if this a supported case, or if I am doing something wrong entirely.

Thanks in advance.


For reference, here's a .target file that I would like to mirror locally.

platform-definition-2021-06.target ```xml ```

And here I tried to map the units to what is documented with this plugin

pom.xml ``` 4.0.0 com.github.bric3 platform-target-cache war 0.0.1-SNAPSHOT ${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml 2.1.12 2.0.1 2.0.1 1.1 10.0.5 2.0.0 1.8.0 1.2.3 1.3.4 3.0.0 9.4.43.v20210629 1.5.0 org.reficio p2-maven-plugin ${p2-maven-plugin.version} default-cli -nouses true com.sun.mail:jakarta.mail:${jakarta.mail.version} true *;resolution:=optional * com.sun.activation:jakarta.activation:${jakarta.activation.version} org.owasp.encoder:encoder:${owasp.encoder.version} org.lz4:lz4-java:${lz4.version} true org.lz4.lz4-java org.lz4.lz4-java org.hdrhistogram:HdrHistogram:${hdrhistogram.version} org.adoptopenjdk:jemmy-awt-input:${jemmy.version} org.adoptopenjdk:jemmy-browser:${jemmy.version} org.adoptopenjdk:jemmy-core:${jemmy.version} org.adoptopenjdk:jemmy-swt:${jemmy.version} org.eclipse.jetty.websocket:websocket-jetty-server:${jetty.version} org.eclipse.jetty.websocket:websocket-javax-server:${jetty.version} org.eclipse.jetty.websocket:websocket-jetty-api:${jetty.version} org.apache.aries.spifly:org.apache.aries.spifly.dynamic.bundle:${spifly.version} org.eclipse.equinox.executable.feature.group:3.8.1200.v20210527-0259 org.eclipse.pde.feature.group:3.14.800.v20210611-1636 org.eclipse.platform.sdk:4.20.0.I20210611-1600 org.eclipse.jetty jetty-maven-plugin ${jetty-maven-plugin.version} 60 ${basedir}/target/repository/ /site 8080 org.apache.maven.plugins maven-enforcer-plugin ${maven-enforcer-plugin.version} enforce-java enforce [1.8.0-40,) Building JMC requires Java 8 version JDK 1.8.0_40 or later enforce-maven enforce 3.3.1 Building JMC requires at least Maven 3.3.1 eclipse-releases http://download.eclipse.org/releases/2021-06/202106161001 p2 ```
sparsick commented 2 years ago

@bric3 Could you please retest your issue with the current p2-maven-plugin version (it's 2.0.0)? I see in your POM that you are using 1.5.0.

bric3 commented 2 years ago

Oh sorry I forgot to reply, thanks it works now :)