Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] Tycho Project Configurators

Hi guys,
I'm using m2e with maven-bundle-plugin to bundlize my artifacts in a POM-first approach. However, i want to run the bundles in eclipse so i attached a bundle:manifest goal to my lifecycle like this

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<executions>
<execution>
<id>create-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>

I learned that the m2e "Tycho Project Configurators" connector would handle the goal correctly, otherwise m2e would not know how to map it to the lifecycle; however, when I try to import the project i get

An internal error occurred during: "Updating Maven Project".
java.lang.IllegalArgumentException
at org.sonatype.tycho.m2e.internal.OsgiBundleProjectConfigurator.generateBundleManifest(OsgiBundleProjectConfigurator.java:76)
at org.sonatype.tycho.m2e.internal.OsgiBundleProjectConfigurator.configureRawClasspath(OsgiBundleProjectConfigurator.java:178)
at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.invokeJavaProjectConfigurators(AbstractJavaProjectConfigurator.java:168)
at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:128)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:414)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:351)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:74)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

I checked the code at OsgiBundleProjectConfigurator.java:76  and i noticed that the error is because i created an extra execution. If i remove it, sure enough, it works; however, the goal is now mapped to the package phase, which is the default. Because i need to run this in eclipse/pde before the bundle has been packaged, i need to generate the manifests earlier, at process-classes.

Is there a way to accomplish this?

The only reference i found about this problem was https://github.com/sonatype/m2eclipse-tycho/issues/4  but the thread got side-tracked to a different problem

I'm using eclipse 4.2.1, m2e 1.2.0 and Tycho Project Configurators 0.6.0

I hope this is the right list, but let me know if this question is more relevant in the m2e list

Thanks

DISCLAIMER: Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.


Back to the top