Coder Social home page Coder Social logo

reficio / p2-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
227.0 18.0 100.0 797 KB

Maven3 plugin that automates the third-party dependency management for Eclipse RCP

Home Page: http://reficio.org

Shell 0.77% Groovy 38.31% Java 60.92%
eclipse-rcp hacktoberfest java maven maven-plugin p2

p2-maven-plugin's Issues

Bug with POM file and depedency

I'm trying to dowload a personnal plugin from a private server. I have already configured the server id, the user and password in settings.xml.

But when I execute the mvn p2:site command i become the follwing error :

Downloading: http://yoda.haslerrail.net:8081/nexus/content/repositories/releases/com/haslerrail/schema/haslerrailschema/0.1.7/haslerrailschema-0.1.7.pom
Downloading: http://repo.reficio.org/maven/com/haslerrail/schema/haslerrailschema/0.1.7/haslerrailschema-0.1.7.pom
[WARNING] The POM for com.haslerrail.schema:haslerrailschema:jar:0.1.7 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for com.haslerrail.schema:haslerrailschema:0.1.7: Plugin com.haslerrail.schema:haslerrailschema:0.1.7 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.haslerrail.schema:haslerrailschema:jar:0.1.7

Here is my POM file :

<groupId>org.reficio.rcp</groupId>
<artifactId>example-p2-site</artifactId>
<packaging>pom</packaging>
<version>1.0.0</version>

<build>

    <plugins>


        <plugin>
            <groupId>com.haslerrail.schema</groupId>
            <artifactId>haslerrailschema</artifactId>
            <version>0.1.7</version>
            <executions>
                <execution>
                    <configuration>
                        <artifacts>
                            <artifact>
                                <id>haslerrailschema:0.1.7</id>
                            </artifact>
                        </artifacts>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>

            <groupId>org.reficio</groupId>
            <artifactId>p2-maven-plugin</artifactId>
            <version>1.1.0</version>

            <executions>
                <execution>
                    <id>default-cli</id>
                    <configuration>
                        <artifacts>
                            <artifact>
                                <id>commons-logging:commons-logging:1.1.1</id>
                            </artifact>
                            <artifact>
                                <id>commons-io:commons-io:1.3.2</id>
                                <source>true</source>
                            </artifact>
                            <artifact>
                                <id>commons-lang:commons-lang:2.4</id>
                            </artifact>
                            <artifact>
                                <id>commons-lang:commons-lang:2.5</id>
                            </artifact>
                            <artifact>
                                <id>commons-lang:commons-lang:2.6</id>
                            </artifact>
                            <artifact>
                                <id>org.apache.commons:commons-lang3:3.1</id>
                            </artifact>
                        </artifacts>
                    </configuration>
                </execution>
            </executions>
        </plugin>

    </plugins>

</build>

<pluginRepositories>
    <pluginRepository>
        <!-- http://yoda.haslerrail.net:8081/nexus -->
        <id>haslerrail</id>
        <url>http://yoda.haslerrail.net:8081/nexus/content/repositories/releases/</url>
    </pluginRepository>


    <pluginRepository>
        <id>reficio</id>
        <url>http://repo.reficio.org/maven/</url>
    </pluginRepository>

</pluginRepositories>
<!-- <distributionManagement> <repository> <id>release</id> <url>http://localhost:8081/nexus/content/repositories/Tycho/</url> 
    </repository> </distributionManagement> -->

I have attached a print screen of the structure i have after this execution but i didn't have my personnal plugin in plugins repository...

project

Here is the structure of my plugin :

structure

This is so i don't understand why he say "POM is missing"...

Thank you if you can help me

Issues building a p2 site for particular maven artifact

Hi all,

I am having a problem building a p2 site that contains the following artifact:
org.apache.jclouds.labs:openstack-neutron:1.8.0

Any insights would be very valuable.

Regards,
Nicholas

------ POM.XML -------


4.0.0
org.jclouds
p2-site
0.0.1-SNAPSHOT
pom

<build>
    <plugins>
        <plugin>
            <groupId>org.reficio</groupId>
            <artifactId>p2-maven-plugin</artifactId>
            <version>1.1.1-SNAPSHOT</version>
            <executions>
                <execution>
                    <id>default-cli</id>
                </execution>
            </executions>
            <configuration>
                <artifacts>
                    <artifact>
                        <id>org.apache.jclouds.labs:openstack-neutron:1.7.3</id>
                    </artifact>
                </artifacts>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>8.1.5.v20120716</version>
            <configuration>
                <scanIntervalSeconds>10</scanIntervalSeconds>
                <webAppSourceDirectory>${basedir}/target/repository/</webAppSourceDirectory>
                <webApp>
                    <contextPath>/site</contextPath>
                </webApp>
            </configuration>
        </plugin>
    </plugins>
</build>


<pluginRepositories>
    <pluginRepository>
        <id>reficio</id>
        <url>http://repo.reficio.org/maven/</url>
    </pluginRepository>
</pluginRepositories>

------------------------ Stack trace:- ----------------------------------

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building p2-site 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- p2-maven-plugin:1.1.1-SNAPSHOT:site (default-cli) @ p2-site ---
[info] Resolving artifact=[org.apache.jclouds.labs:openstack-neutron:1.8.0] transitive=[false] source=[false]
[info] [JAR] openstack-neutron-1.8.0.jar
[info] Executing Bundler:
[info] [SKIP] openstack-neutron-1.8.0.jar
[INFO] Command line:
/bin/sh -c cd /home/nickl/workspace/openstack-neutron && /usr/lib/jvm/java-6-openjdk/jre/bin/java -jar /home/nickl/.m2/repository/org/eclipse/tycho/tycho-bundles-external/0.18.1/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar -configuration /tmp/tycho-p2-runtime5358553969148673763.tmp/configuration -nosplash -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -artifactRepository file:/home/nickl/workspace/openstack-neutron/target/repository -metadataRepository file:/home/nickl/workspace/openstack-neutron/target/repository -publishArtifacts -compress -source /home/nickl/workspace/openstack-neutron/target/source
Generating metadata for ..
Status ERROR: org.eclipse.equinox.p2.artifact.repository code=0 invalid range "${jclouds.version}": invalid version "${jclouds.version}": non-numeric "${jclouds" java.lang.IllegalArgumentException: invalid range "${jclouds.version}": invalid version "${jclouds.version}": non-numeric "${jclouds"

Product publishing ended with the following exception:
java.lang.IllegalArgumentException: invalid range "${jclouds.version}": invalid version "${jclouds.version}": non-numeric "${jclouds"
at org.osgi.framework.VersionRange.parseVersion(VersionRange.java:196)
at org.osgi.framework.VersionRange.(VersionRange.java:150)
at org.eclipse.osgi.service.resolver.VersionRange.(VersionRange.java:68)
at org.eclipse.osgi.internal.resolver.StateBuilder.getVersionRange(StateBuilder.java:805)
at org.eclipse.osgi.internal.resolver.StateBuilder.addImportPackages(StateBuilder.java:293)
at org.eclipse.osgi.internal.resolver.StateBuilder.createImportPackages(StateBuilder.java:272)
at org.eclipse.osgi.internal.resolver.StateBuilder.createBundleDescription(StateBuilder.java:117)
at org.eclipse.osgi.internal.resolver.StateObjectFactoryImpl.createBundleDescription(StateObjectFactoryImpl.java:33)
at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createBundleDescription(BundlesAction.java:541)
at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createBundleDescription(BundlesAction.java:577)
at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.getBundleDescriptions(BundlesAction.java:891)
at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.perform(BundlesAction.java:711)
at org.eclipse.equinox.p2.publisher.Publisher$ArtifactProcess.run(Publisher.java:207)
at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.executeBatch(SimpleArtifactRepository.java:1344)
at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:231)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:283)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:253)
at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.start(AbstractPublisherApplication.java:317)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.IllegalArgumentException: invalid version "${jclouds.version}": non-numeric "${jclouds"
at org.osgi.framework.Version.parseInt(Version.java:170)
at org.osgi.framework.Version.(Version.java:126)
at org.osgi.framework.Version.parseVersion(Version.java:233)
at org.osgi.framework.VersionRange.parseVersion(VersionRange.java:194)
... 20 more
Caused by: java.lang.NumberFormatException: For input string: "${jclouds"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:470)
at java.lang.Integer.parseInt(Integer.java:514)
at org.osgi.framework.Version.parseInt(Version.java:168)
... 23 more

Product publisher application was executed with the following arguments:
-artifactRepository
file:/home/nickl/workspace/openstack-neutron/target/repository
-metadataRepository
file:/home/nickl/workspace/openstack-neutron/target/repository
-publishArtifacts
-compress
-source
/home/nickl/workspace/openstack-neutron/target/source
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.796 s
[INFO] Finished at: 2014-09-17T11:51:45+03:00
[INFO] Final Memory: 14M/456M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.1.1-SNAPSHOT:site (default-cli) on project p2-site: Execution default-cli of goal org.reficio:p2-maven-plugin:1.1.1-SNAPSHOT:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: P2 publisher return code was 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Pb when using tycho-0.21.0 or 0.22.0

Running the plugin works well when using tycho 0.20.0, but when I try with 0.21 or 0.22, I get some errors like :

[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.1.1:site (default-cli) on project eclipse-target-platform: Execution default-cli of goal org.reficio:p2-maven-plugin:1.1.1:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: Execution null of goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1:publish-features-and-bundles failed: A required class was missing while executing org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1:publish-features-and-bundles: org/eclipse/tycho/core/osgitools/targetplatform/DefaultTargetPlatform
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/elecharny/.m2/repository/org/eclipse/tycho/extras/tycho-p2-extras-plugin/0.18.1/tycho-p2-extras-plugin-0.18.1.jar
[ERROR] urls[1] = file:/Users/elecharny/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[2] = file:/Users/elecharny/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[3] = file:/Users/elecharny/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[4] = file:/Users/elecharny/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[5] = file:/Users/elecharny/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/Users/elecharny/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[7] = file:/Users/elecharny/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[8] = file:/Users/elecharny/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.7/plexus-utils-3.0.7.jar
[ERROR] urls[9] = file:/Users/elecharny/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
[ERROR] urls[10] = file:/Users/elecharny/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
[ERROR] urls[11] = file:/Users/elecharny/.m2/repository/org/eclipse/tycho/sisu-equinox-launching/0.18.1/sisu-equinox-launching-0.18.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>org.apache.directory.studio:eclipse-target-platform:2.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

Plug-in does not work with tycho 0.21.0

With tycho 0.21.0, the following error is returned:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.1.2-SNAPSHOT:site (default-cli) on project components: Execution default-cli of goal org.reficio:p2-maven-plugin:1.1.2-SNAPSHOT:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: Execution null of goal org
.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1:publish-features-and-bundles failed: A required class was missing while executing org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1:publish-features-and-bundles: org/eclipse/tycho/core/osgitools/targetplatform/DefaultTargetPlatform
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/sg0922521/.m2/repository/org/eclipse/tycho/extras/tycho-p2-extras-plugin/0.18.1/tycho-p2-extras-plugin-0.18.1.jar
[ERROR] urls[1] = file:/C:/Users/sg0922521/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[2] = file:/C:/Users/sg0922521/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[3] = file:/C:/Users/sg0922521/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[4] = file:/C:/Users/sg0922521/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[5] = file:/C:/Users/sg0922521/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/C:/Users/sg0922521/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[7] = file:/C:/Users/sg0922521/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[8] = file:/C:/Users/sg0922521/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.7/plexus-utils-3.0.7.jar
[ERROR] urls[9] = file:/C:/Users/sg0922521/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
[ERROR] urls[10] = file:/C:/Users/sg0922521/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
[ERROR] urls[11] = file:/C:/Users/sg0922521/.m2/repository/org/eclipse/tycho/sisu-equinox-launching/0.18.1/sisu-equinox-launching-0.18.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>com.sabre.edge.dynamo.common.nexus-p2:components:1.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------: org.eclipse.tycho.core.osgitools.targetplatform.DefaultTargetPlatform
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

It works fine with the version 0.20.0.

Add local plug-in

I have some plug-ins that was made at our company...is there a way to add local these plug-ins to the pom?

Allow bundling of test-jar artifacts

I have a maven artifact that I would like to expose via p2 - I can depend on the maven artifact in other maven projects using the following dependency:

<dependency>
  <groupId>sample.groupid</groupId>
  <artifactId>sample.artifactid</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <classifier>tests</classifier>
  <scope>test</scope>
  </dependency>

It would be awesome if I could specify this as an artifact in my p2-maven-plugin usage.

Incomplete project in master

I have a bug with Eclipse-BuddyPolicy instruction so i did checkout the project from master branch. But the project has compile error caused by missing classes and packages.

org.reficio.p2.resolver.impl.facade package is missing.
org.reficio.p2.resolver.impl.AetherResolver is missing.

Optional timestamp postfix for bundles

I would like to have an option which allows to add a timestamp postfix for the resulting bundle name. As I see it this option should be part of the artifact definition.

The background to this is that -SNAPSHOT artifacts typically retain the same version which means that the bundles also retain the same name. This leads to problems when trying to update the p2 jars cache in eclipse if you add the p2 repository to your running target platform to satisfy dependencies in eclipse projects.

70% of my builds fail during final cleanupEnvironment

70% of the p2:site builds fail during the final cleanup
usually I have some 2-5 successful builds followed by 5-10 failing builds

Unlocker tool shows no handles and processes that hold on to that files/folders

OS is Win7
Java is 7u9x64
Maven is 3.0.3

builds are done from Jenkins respectively via Eclipse run-config

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.reficio:p2-maven-plugin:1.0.0-SNAPSHOT:site failed: java.io.IOException: Unable to delete file: E:\jenkins-ci\jobs\p2-repo\workspace\target\source\plugins\org.apache.felix.scr.annotations-1.7.0.jar
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Caused by: java.lang.RuntimeException: java.io.IOException: Unable to delete file: E:\jenkins-ci\jobs\p2-repo\workspace\target\source\plugins\org.apache.felix.scr.annotations-1.7.0.jar
at org.reficio.p2.P2Mojo.execute(P2Mojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 28 more
Caused by: java.io.IOException: Unable to delete file: E:\jenkins-ci\jobs\p2-repo\workspace\target\source\plugins\org.apache.felix.scr.annotations-1.7.0.jar
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1919)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1331)
at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:1910)
at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1399)
at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1331)
at org.reficio.p2.P2Mojo.cleanupEnvironment(P2Mojo.java:294)
at org.reficio.p2.P2Mojo.execute(P2Mojo.java:200)
... 29 more

Add pre bundled jars with different symbolic name

I tried to include bundles to the configuration. The only instruction is another symbolic name. Because the manifest is already filled, BND throws an error.

Is there a way to implement this, or do I have to add a bnd prevent instruction?

Snapshot version (feature #14)

Your plugin is very great ! Thank You.

It will be nice if the version of the snapshot plugins can be defined via a new parameter. For example:

 <instructions>
    <useTimestamp>false</useTimestamp>
 </instructions>

So, the user can decide if the JAR file name must contains the time stamp or not. When true (default) the 'SNAPSHOT' will be replaced by the time stamp and when false leave as is.

Best regard

Bibi

Can't browse p2 repo in Eclipse

Hello author,
I use this to convert our own library to p2 format and it works great with Tycho!
However, new classes introduced by our library are not visible in Eclipse causing a lot of errors. Although the p2 repo could be used in Tycho, I cannot install those bundles in "Install New Software." Any workaround?

Corrupted Signed Jars

It appears that the latest build may be causing signed jars to be corrupted. Every osgi I bundle I load into a nexus repository from eclipse, and then try to use during a tycho build after being pulled into a p2 repo created by p2-maven-plugin is complaining about signing errors.

I believe if the plugin isn't already it should skip doing anything to jars that are signed. And fail if somebody tries to do an override on signed jars.

Allow Creation of Features and Source Features

It would be nice to also add optional source features as part of the build. Or figure some way to inject the generated source bundles so that Tycho can see this. Maybe leveraging the tycho-extras source feature plugin to create the feature.

A plugin repository unfortunately can't be mirrored with the tycho-extras mirror goal. It alwasy expects to have features to work from.

Hmmm...might not need the feature after all since the Category.xml is in place. Would still be nice though to beable to specifically specify the feature for source bundles.

Zip Exception while building site

here's a link to the pom.xml : https://gist.github.com/kgirard/5339516

Here's the exception:

[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.0.0:site (default-cli) on project test-p2-site: Execution default-cli of goal org.reficio:p2-maven-plugin:1.0.0:site failed: java.lang.RuntimeException: java.util.zip.ZipException: error reading zip file -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.reficio:p2-maven-plugin:1.0.0:site (default-cli) on project test-p2-site: Execution default-cli of goal org.reficio:p2-maven-plugin:1.0.0:site failed: java.lang.RuntimeException: java.util.zip.ZipException: error reading zip file
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.reficio:p2-maven-plugin:1.0.0:site failed: java.lang.RuntimeException: java.util.zip.ZipException: error reading zip file
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.util.zip.ZipException: error reading zip file
at org.reficio.p2.P2Mojo.execute(P2Mojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Caused by: java.lang.RuntimeException: java.util.zip.ZipException: error reading zip file
at org.reficio.p2.utils.BundleWrapper.unsignJar(BundleWrapper.java:169)
at org.reficio.p2.utils.BundleWrapper.handleVanillaJarWrap(BundleWrapper.java:122)
at org.reficio.p2.utils.BundleWrapper.doWrap(BundleWrapper.java:103)
at org.reficio.p2.utils.BundleWrapper.wrap(BundleWrapper.java:96)
at org.reficio.p2.utils.BundleWrapper.wrapArtifacts(BundleWrapper.java:76)
at org.reficio.p2.utils.BundleWrapper.execute(BundleWrapper.java:68)
at org.reficio.p2.P2Mojo.executeBndWrapper(P2Mojo.java:244)
at org.reficio.p2.P2Mojo.execute(P2Mojo.java:197)
... 21 more
Caused by: java.util.zip.ZipException: error reading zip file
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1200(ZipFile.java:31)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:460)
at java.util.zip.ZipFile$1.fill(ZipFile.java:243)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1383)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1357)
at org.reficio.p2.utils.BundleWrapper.unsignJar(BundleWrapper.java:155)
... 28 more

Custom instructions no taken into account

I have this config with p2-maven-plugin

my project already have a manifest, but as true is set, it should override it. The problem is instrusctions set are not taken into account. Result is : all packages are exported, all packags are imported with optional resolution. Is this a bug or is there somthing wrong with my config.

ca.infodata:readhl7::custom:2.0.7-SNAPSHOT true false true * ca.infodata.readhl7

Thanks

Trouble bundling fontawesomefx...

Hello,

The first dependancy I imported (controlsFX 8.0.6) worked as a charm, but the second one (fontawesomeFX 8.0.10) gives me the following message :

image

The jar is available in my local repository and shows up in my p2 localhost server, but I can't make it available : when trying to pick up the jar in my target definition, the plugin doesn't seem to be there :

image

Restarting Luna or the Jetty Server, reloading the site, nothing helps...

Any ideas on how to fix this ... ?

Thanks in advance, regards,

Thomas

Add bundles with the same artifactId and versionId (but not thr same groupId)

Hi,

I'm trying to build a p2 site with the following configuration :

com.company.resources.xxXX:dictionary:0.0.2 com.company.resources.yyYY:dictionary:0.0.2 com.company.resources.zzZZ:dictionary:0.0.1

There is no issue with the "com.company.resources.zzZZ:dictionary" (because the version is 0.0.1). But the "com.company.resources.xxXXdictionary" is ignored by the "com.company.resources.yyYY:dictionary" (because the same version)

Thanks
Anthony

Missing classes in released tags

Hi,

I just cloned the project, and I have some compilation failures. In HEAD, as in 1.1.1, there are missing classes :
import org.reficio.p2.resolver.eclipse.impl.DefaultEclipseResolver;
import org.reficio.p2.resolver.maven.impl.AetherResolver;

are required by the P2Mojo class, but are not present in the code base.

Change Felix default instructions globally

It would be helpful if the default instructions for Felix could be overwritten globally.

E.g. instead of having to include the following for each artifact, it would just need to be specified once.

<transitive>false</transitive>
<instructions>
  <DynamicImport-Package>*</DynamicImport-Package>
  <Import-Package>;</Import-Package>
</instructions>

Unable to parse configuration of mojo org.reficio:p2-maven-plugin:1.0.3-SNAPSHOT:site: Error loading class 'org.reficio.p2.Artifact'

Hi,

First, thank you for this great project.
Second,

I tried the quickstart pom that i modified to fit my needs. I all went fine on my local computer. But it fail if i run it inside bamboo on another computer. It maybe my maven version or something else.

Fai

Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse configuration of mojo org.reficio:p2-maven-plugin:1.0.3-SNAPSHOT:site: Error loading class 'org.reficio.p2.Artifact'
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Error loading class 'org.reficio.p2.Artifact'
Caused by: java.lang.ClassNotFoundException: org.reficio.p2.Artifact

with this configuration

        <plugin>
            <groupId>org.reficio</groupId>
            <artifactId>p2-maven-plugin</artifactId>
            <version>1.0.3-SNAPSHOT</version>
            <executions>
                <execution>
                    <id>default-cli</id>
                    <configuration>
                        <artifacts>
                            <!-- specify your depencies here -->
                            <!-- groupId:artifactId:version -->
                            <artifact>
                                <id>ca.infodata:util1.restful:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>ca.infodata:util1.common:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>ca.infodata:util1.group:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>ca.infodata:util1.encryption:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>ca.infodata:apple.finder.search:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>ca.infodata:ofys.data.middle.dataobjects_client:0.0.1-SNAPSHOT</id>
                            </artifact>
                            <artifact>
                                <id>com.sun.jersey:jersey-client:1.17.1</id>
                                <transitive>true</transitive>
                            </artifact>
                            <artifact>
                                <id>net.java.dev.jna:jna:3.3.0</id>
                            </artifact>
                            <artifact>
                                <id>net.java.dev.jna:jna::platform:3.3.0</id>
                            </artifact>
                            <artifact>
                                <id>org.mb.listeners:listeners:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>ca.infodata:stats2.minimalog.client:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>jfree:jfreechart:1.0.13</id>
                            </artifact>
                            <artifact>
                                <id>jfree:jfreechart-swt:1.0.9</id>
                            </artifact>
                            <artifact>
                                <id>org.glassfish:javax.jms:3.1.1</id>
                            </artifact>

                            <artifact>
                                <id>com.miglayout:miglayout-swt:4.2</id>
                            </artifact>
                            <artifact>
                                <id>commons-collections:commons-collections:3.2.1</id>
                            </artifact>
                            <artifact>
                                <id>commons-codec:commons-codec:1.6</id>
                            </artifact>
                            <artifact>
                                <id>commons-io:commons-io:2.3</id>
                            </artifact>
                            <artifact>
                                <id>commons-lang:commons-lang:2.5</id>
                            </artifact>
                            <artifact>
                                <id>org.apache.commons:commons-lang3:3.1</id>
                            </artifact>

                            <artifact>
                                <id>ca.infodata:readhl7:1.0.0</id>
                            </artifact>
                            <artifact>
                                <id>com.google.code.gson:gson:2.2.4</id>
                            </artifact>
                            <artifact>
                                <id>javassist:javassist:3.12.1.GA</id>
                            </artifact>
                            <artifact>
                                <id>org.bouncycastle:bcmail-jdk16:1.46</id>
                            </artifact>
                            <artifact>
                                <id>org.bouncycastle:bcprov-jdk16:1.46</id>
                            </artifact>
                            <artifact>
                                <id>log4j:log4j:1.2.17</id>
                            </artifact>
                            <artifact>
                                <id>org.swinglabs:pdf-renderer:1.0.5</id>
                            </artifact>
                            <artifact>
                                <id>com.googlecode.jatl:jatl:0.2.2</id>
                            </artifact>
                            <artifact>
                                <id>xmlrpc:xmlrpc:2.0.1</id>
                            </artifact>
                            <artifact>
                                <id>com.lowagie:itext:2.1.7</id>
                            </artifact>
                            <artifact>
                                <id>org.apache.pdfbox:pdfbox:1.8.2</id>
                            </artifact>
                        </artifacts>
                    </configuration>
                </execution>
            </executions>
        </plugin>

Is this configuration ok ?
Is the problem elsewhere ?
Is is a bug ?

Plugin repository problem - docs & artifact

Hi,

I just tried my setup on a freshly baked virtual machine and I found two problems:

  1. I guess in the docs it should be
        <pluginRepositories>
        <pluginRepository>
            <id>reficio</id>
            <url>http://repo.reficio.org/maven/</url>
        </pluginRepository>
    </pluginRepositories>

rather than just a repository, no?

  1. If I build the plugin myself - all works just fine, but if I use the one from the repository:

[krikava@kathmandu:test]$ mvn p2:site
[INFO] Scanning for projects...
Downloading: http://repo.reficio.org/maven/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/maven-metadata.xml
Downloaded: http://repo.reficio.org/maven/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/maven-metadata.xml (2 KB at 0.5 KB/sec)
Downloading: http://repo.reficio.org/maven/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/p2-maven-plugin-1.0.0-20120914.112142-15.pom
Downloaded: http://repo.reficio.org/maven/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/p2-maven-plugin-1.0.0-20120914.112142-15.pom (20 KB at 26.3 KB/sec)
Downloading: http://repo.reficio.org/maven/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/p2-maven-plugin-1.0.0-20120914.112142-15.jar
Downloaded: http://repo.reficio.org/maven/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/p2-maven-plugin-1.0.0-20120914.112142-15.jar (48 KB at 76.9 KB/sec)
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building example-p2-site 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- p2-maven-plugin:1.0.0-SNAPSHOT:site (default-cli) @ example-p2-site ---
[CLOVER] FATAL ERROR: Clover could not be initialised. Are you sure you have Clover in the runtime classpath? (class java.lang.NoClassDefFoundError:com_cenqua_clover/CloverVersionInfo)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.873s
[INFO] Finished at: Thu Sep 27 15:03:52 CEST 2012
[INFO] Final Memory: 5M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.0.0-SNAPSHOT:site (default-cli) on project example-p2-site: A required class was missing during configuration of mojo org.reficio:p2-maven-plugin:1.0.0-SNAPSHOT:site: com_cenqua_clover/CoverageRecorder
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.reficio:p2-maven-plugin:1.0.0-SNAPSHOT
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/krikava/.m2/repository/org/reficio/p2-maven-plugin/1.0.0-SNAPSHOT/p2-maven-plugin-1.0.0-SNAPSHOT.jar
[ERROR] urls[1] = file:/Users/krikava/.m2/repository/commons-io/commons-io/2.1/commons-io-2.1.jar
[ERROR] urls[2] = file:/Users/krikava/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[3] = file:/Users/krikava/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[4] = file:/Users/krikava/.m2/repository/biz/aQute/bnd/0.0.384/bnd-0.0.384.jar
[ERROR] urls[5] = file:/Users/krikava/.m2/repository/org/apache/commons/commons-exec/1.1/commons-exec-1.1.jar
[ERROR] urls[6] = file:/Users/krikava/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
[ERROR] urls[7] = file:/Users/krikava/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[8] = file:/Users/krikava/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[9] = file:/Users/krikava/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[10] = file:/Users/krikava/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[11] = file:/Users/krikava/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[12] = file:/Users/krikava/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[13] = file:/Users/krikava/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[14] = file:/Users/krikava/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[15] = file:/Users/krikava/.m2/repository/org/apache/felix/maven-bundle-plugin/2.3.6/maven-bundle-plugin-2.3.6.jar
[ERROR] urls[16] = file:/Users/krikava/.m2/repository/biz/aQute/bndlib/1.50.0/bndlib-1.50.0.jar
[ERROR] urls[17] = file:/Users/krikava/.m2/repository/org/apache/felix/org.apache.felix.bundlerepository/1.6.6/org.apache.felix.bundlerepository-1.6.6.jar
[ERROR] urls[18] = file:/Users/krikava/.m2/repository/org/easymock/easymock/2.4/easymock-2.4.jar
[ERROR] urls[19] = file:/Users/krikava/.m2/repository/org/apache/maven/maven-archiver/2.4.1/maven-archiver-2.4.1.jar
[ERROR] urls[20] = file:/Users/krikava/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0/plexus-archiver-1.0.jar
[ERROR] urls[21] = file:/Users/krikava/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[22] = file:/Users/krikava/.m2/repository/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar
[ERROR] urls[23] = file:/Users/krikava/.m2/repository/org/apache/maven/shared/maven-dependency-tree/1.2/maven-dependency-tree-1.2.jar
[ERROR] urls[24] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/extras/tycho-p2-extras-plugin/0.14.0/tycho-p2-extras-plugin-0.14.0.jar
[ERROR] urls[25] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/tycho-p2-facade/0.14.0/tycho-p2-facade-0.14.0.jar
[ERROR] urls[26] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/org.eclipse.osgi/3.8.0.v20120123-1419/org.eclipse.osgi-3.8.0.v20120123-1419.jar
[ERROR] urls[27] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/tycho-core/0.14.0/tycho-core-0.14.0.jar
[ERROR] urls[28] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/tycho-metadata-model/0.14.0/tycho-metadata-model-0.14.0.jar
[ERROR] urls[29] = file:/Users/krikava/.m2/repository/de/pdark/decentxml/1.3/decentxml-1.3.jar
[ERROR] urls[30] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/tycho-embedder-api/0.14.0/tycho-embedder-api-0.14.0.jar
[ERROR] urls[31] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/org.eclipse.tycho.embedder.shared/0.14.0/org.eclipse.tycho.embedder.shared-0.14.0.jar
[ERROR] urls[32] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/org.eclipse.tycho.core.shared/0.14.0/org.eclipse.tycho.core.shared-0.14.0.jar
[ERROR] urls[33] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/sisu-equinox-embedder/0.14.0/sisu-equinox-embedder-0.14.0.jar
[ERROR] urls[34] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/org.eclipse.tycho.p2.resolver.shared/0.14.0/org.eclipse.tycho.p2.resolver.shared-0.14.0.jar
[ERROR] urls[35] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/org.eclipse.tycho.p2.tools.shared/0.14.0/org.eclipse.tycho.p2.tools.shared-0.14.0.jar
[ERROR] urls[36] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/sisu-equinox-launching/0.14.0/sisu-equinox-launching-0.14.0.jar
[ERROR] urls[37] = file:/Users/krikava/.m2/repository/org/eclipse/tycho/sisu-equinox-api/0.14.0/sisu-equinox-api-0.14.0.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException

with following pom:

<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.reficio.rcp</groupId>
  <artifactId>example-p2-site</artifactId>
  <packaging>pom</packaging>
  <version>1.0.0</version>

  <build>
    <plugins>
      <plugin>
        <groupId>org.reficio</groupId>
        <artifactId>p2-maven-plugin</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <executions>
          <execution>
            <id>default-cli</id>
            <configuration>
              <artifacts>
                <!-- specify your depencies here -->
                <!-- groupId:artifactId:version -->
                <artifact><id>commons-io:commons-io:2.1</id></artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <pluginRepositories>
    <pluginRepository>
      <id>reficio</id>
      <url>http://repo.reficio.org/maven/</url>
    </pluginRepository>
  </pluginRepositories>

</project>

I guess it has something to do with you latest clover configuration no?

Thanks
Filip

Eclipse source bundle manifest does not reference original bundle

Eclipse source bundle does not reference original bundle. Instead it references the source bundle as original bundle.

Current

 Eclipse-SourceBundle: my.custom.bundle.source 

Expected

 Eclipse-SourceBundle: my.custom.bundle

According to eclipse documentation http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_individual_source.htm

Eclipse-SourceBundle: ;version=;roots:="root1, root2"
The bundle-id and version indicate the bundle that the included source code corresponds to

Support source bundles

Hi,

I was wondering if you plan to include source bundle support [1] any time soon? I think your plugin complements quite well tycho (for the non M2E users like me), however without source bundles I cannot use it and I have to fallback to quite obscure [2] way of defining target platform.

/cheers
Filip

[1] http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Ftasks%2Fpde_individual_source.htm
[2] http://dev.eclipse.org/mhonarc/lists/tycho-user/msg03080.html

Plugin not compatible with maven 3.1

Explanation: https://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound

Log from Jenkins:

[WARNING] Error injecting: org.reficio.p2.P2Mojo
java.lang.NoClassDefFoundError: Lorg/sonatype/aether/RepositorySystem;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2387)
at java.lang.Class.getDeclaredFields(Class.java:1796)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:661)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:366)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:165)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:609)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:565)
at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:551)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:865)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
at org.eclipse.sisu.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:44)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
at org.eclipse.sisu.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:134)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.eclipse.sisu.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
at org.eclipse.sisu.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:52)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:259)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:251)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:459)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystem
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 57 more

having a dependency to spring-data-neo4j seems to fail

I've added org.springframework.data:spring-data-neo4j:2.3.2.RELEASE as a dependency, created the p2 site and added all the items into the target.

I get the error below:
image

Though aop allience seems to be in the repository:
image

NPE while building the site

I'm getting a NPE sometimes when building my site. It only happens when certain combinations of artifacts are included in the site.

Execution default-cli of goal org.reficio:p2-maven-plugin:1.0.0:site failed: java.lang.NullPointerException
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.reficio:p2-maven-plugin:1.0.0:site failed: java.lang.NullPointerException
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at org.reficio.p2.P2Mojo.execute(P2Mojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Caused by: java.lang.NullPointerException
at org.reficio.p2.utils.BundleWrapper.unsignJar(BundleWrapper.java:157)
at org.reficio.p2.utils.BundleWrapper.handleVanillaJarWrap(BundleWrapper.java:122)
at org.reficio.p2.utils.BundleWrapper.doWrap(BundleWrapper.java:103)
at org.reficio.p2.utils.BundleWrapper.wrap(BundleWrapper.java:96)
at org.reficio.p2.utils.BundleWrapper.wrapArtifacts(BundleWrapper.java:76)
at org.reficio.p2.utils.BundleWrapper.execute(BundleWrapper.java:68)
at org.reficio.p2.P2Mojo.executeBndWrapper(P2Mojo.java:244)
at org.reficio.p2.P2Mojo.execute(P2Mojo.java:197)
... 21 more

No "root" for artifacts with meta versions

If you have an artifact with a meta version like 0.0.1-SNAPSHOT the artifact's version depends on the state of the artifact and will have the meta version expanded e.g. 0.0.1-20130314.094238-17.

Therefore "id.equals(resolvedId)" (P2Artifact.java, line 91) is false although the given artifact is root. During the further procedure this leads to the problem that the instructions are not set (BundleWrapper.java, line 223).

From my point of view "id.equals(resolvedId)" is not correct, there should be some kind of matching.

Adding Bundle Symbolic Name instruction doesn't change Source bundle name

If you do something like the following:

<artifact>
        <id>rhino:js:1.7R2</id>
        <source>true</source>
        <transitive>false</transitive>
        <instructions>
             <Bundle-SymbolicName>org.mozilla.javascript</Bundle-SymbolicName>
             <Bundle-Version>1.7.2</Bundle-Version>
         </instructions>
  </artifact> 

The bundle is updated appropriately, but the source bundle that is created, still has the old name. it gets generated as:

rhino.js.source_1.0.0.7R2

Ideally these should be generated as:
org.mozilla.javascript.source_1.7.2.jar

Build failed after upgrading tycho from 0.18.1 to 0.21.0

[ERROR] Failed to execute goal org.reficio:p2-maven-plugin:1.1.1:site (default-cli) on project egbdp.client.target.platform: Execution default-cli of goal org.reficio:p2-maven-plugin:1.1.1:site failed: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo: Execution null of goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1:publish-features-and-bundles failed: A required class was missing while executing org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1:publish-features-and-bundles: org/eclipse/tycho/core/osgitools/targetplatform/DefaultTargetPlatform
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.eclipse.tycho.extras:tycho-p2-extras-plugin:0.18.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

Closing in on the ultimate Eclipse/Maven integration.

Hi Reficio,

I tried out your plugin just now and worked great.

(The need in my case, which is probably what many people run into: My non-OSGI, JAR is not in orbit p2 repo! Aaaaaaaaagh what now? )

  • So, after doing self-management. (Yes, import a jar in a bundle etc..) ... and hating it.
  • Reading about POM first dependencies. (I didn't even try this ....).
  • Contemplating an own Nexus server, which I understand can serv P2 and non P2. (Which would go hand-in-hand with the previous bullet).

So my question is this, now I have a local repo, but it's not in my tp. I can of course upload it, but
that's a manual action...So I wonder, what's the end game. Would tycho evolve in a direction where some how regular maven jars can be added to a TP ? I should ask on the tycho list though....

Thanks for this plugin!

Support jar/war packages

It would be great to bundle dependencies which are defined with classes to include the [...]-classes.jar from a war dependency.

Feature based Ordering

Is there a way to organzie the dependencies into Features?
So you can use this plugin to build feature-based p2-site with third party-bundles.
This would solve every of my problems managing depencies for my developer-team.

Just a big THX (no Issue)

Hello, just a quick thank you! This Plugin is the answer to all my Problems (well not all, but work related :o). Also the Documentation reads amazing! Carry on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.