Giter VIP home page Giter VIP logo

m2eclipse-tycho's People

Contributors

bentmann avatar fbricon avatar gamerson avatar ifedorenko avatar jvanzyl avatar kwin avatar vladt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

m2eclipse-tycho's Issues

Please add README.md

Would be nice to have a small readme which describes the purpose of this plug-in (I did not find out yet).

Error log fails to show exception

org.sonatype.tycho.m2e/src/org/sonatype/tycho/m2e/internal/OsgiBundleProjectConfigurator.java line 161:

log.warn( "Count not read generated bundle manifest of project {}", facade.getProject().getName(), e );

The "e" part of this error is not showing in eclipse when I load an (obviously) problematic project.

Maven Dependencies classpath container for plain Tycho projects

As far as I can see the classpath container for "Maven Dependencies" is only populated for projects build with the maven-bundle-plugin with "Embedded-Artifacts".
I think it should also be populated for real Tycho projects to handle embedded dependencies there.

Our current approach is to add a normal Maven dependency to a Tycho project. Then we use the maven-dependency-plugin to copy the dependencies into a lib/ folder during the validate phase and finally we add them manually to MANIFEST.MF and the build path. This works pretty good. The downside is that neither the sources nor the Javadoc of the JAR files are accessible within Eclipse.

If this plugin would also populate the "Maven Dependencies" for Tycho projects (as for Embedded-Artifacts) then sources and Javadoc would be available and one then can use the maven-dependency-plugin to unpack the dependencies into the target/classes folder during the Maven package phase. Finally we would have a JAR file with embedded dependencies in the same way as we had used the maven-bundle-plugin with its Embed-Dependency functionality.

What do you think?

Mark Bundle-SymbolicName/artifactId mismatches as errors

This is an enhancement request: as Tycho will fail the build if the Bundle-SymbolicName doesn’t match the artifactId, it would be great if the m2e/Tycho integration could mark this as an error in the IDE already. Discovering this kind of trivial problem only after a mvn clean install is just frustrating…

If it is appropriate for a m2e connector to add error markers (not sure) I’d be willing to give this a try and provide a patch (any pointers are still greatly appreciated).

Count not read generated bundle manifest message with no description

I have a some projects in the reactor which use the felix-bundle-plugin and for which I have logged warning in the error log and the maven console: 1/23/12 11:10:27 AM GMT+02:00: [WARN] Count not read generated bundle manifest of project bla-bla-bla . Even with debug logging enabled, neither the Error Log view nor the Maven Console ( in the Console view ) show the root cause, so I'm unable to find the root cause.

Please allow for the root cause to propagate so that I know if I need to fix my POMs or report a proper bug.

Take “JRE System Library” selected by target platform

Hi,

I hope this is the correct issue tracker for m2eclipse-tycho as found at http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.9.0/N/LATEST/.

I have an eclipse-plugin project, whose Bundle-RequiredExecutionEnvironment is JavaSE-1.7. This project is supposed to build one of two eclipse-target-definition target platforms. One target platform (mars) has an execution environment of JavaSE-1.7 and the other (neon) has an execution environment of JavaSE-1.8. Also, the mars target platform contains a library that requires JavaSE-1.7, whereas the neon target platform contains a newer version of said library that requires JavaSE-1.8.

The problem occurs if I Import > Maven > Exisiting Maven Project my eclipse-plugin project with the neon target platform selected in its POM.

The Tycho m2e connector configures a project-specific compiler compliance level of 1.7 (good), but also a JavaSE-1.7 “JRE System Library” based on the project's Bundle-RequiredExecutionEnvironment (bad).

This is a problem because I now get compilation errors:

The type java.util.function.Supplier cannot be resolved. It is indirectly referenced from required .class files

The project’s code itself does not use any Java 8 feature, but the newer version of the library does. IMHO, the JRE System Library” selected should be taken from the target platform rather than the Bundle-RequiredExecutionEnvironment header. Or am I mistaken?

Regression: IllegalArgumentException configuring project that uses tycho and bundle plugins

The pom below can be imported and used with m2e-tycho 0.5.0.201108311102.
However, m2e-tycho 0.6.0.201110151902 fails to import the project with the following error.

An internal error occurred during: "Importing Maven projects".
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:180)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:128)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:72)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:302)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.configureNewMavenProject(ProjectConfigurationManager.java:234)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:150)
    at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard$1.doCreateMavenProjects(MavenImportWizard.java:164)
    at org.eclipse.m2e.core.ui.internal.wizards.AbstractCreateMavenProjectsOperation.run(AbstractCreateMavenProjectsOperation.java:73)
    at org.eclipse.m2e.core.ui.internal.wizards.MavenImportWizard$3.runInWorkspace(MavenImportWizard.java:249)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
<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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>test</groupId>
  <artifactId>test</artifactId>
  <version>1-SNAPSHOT</version>
  <packaging>bundle</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.report.outputEncoding>UTF-8</project.report.outputEncoding>
  </properties>

  <build>
    <plugins>

      <plugin>
        <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-packaging-plugin</artifactId>
        <version>0.13.0</version>
        <executions>
          <execution>
            <id>timestamp</id>
            <phase>validate</phase>
            <goals>
              <goal>build-qualifier</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.5</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <goals>
              <goal>manifest</goal>
            </goals>
            <configuration>
              <instructions>
                <Bundle-Version>${unqualifiedVersion}.${buildQualifier}</Bundle-Version>
              </instructions>
              <manifestLocation>META-INF</manifestLocation>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>

  </build>
</project>

Furthermore, it fails to interpolate the Bundle-Version correctly:
After running process-classes through Eclipse, the manifest looks like this:

Manifest-Version: 1.0
Built-By: martin
Build-Jdk: 1.6.0_24
Bundle-Version: ${unqualifiedVersion}.${buildQualifier}
Tool: Bnd-1.43.0
Bundle-Name: test
Bnd-LastModified: 1319476527351
Created-By: Apache Maven Bundle Plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: test

Using m2e-tycho 0.5, the version is correctly interpolated:

Manifest-Version: 1.0
Built-By: martin
Build-Jdk: 1.6.0_24
Bundle-Version: 1.201110241723
Tool: Bnd-1.43.0
Bundle-Name: test
Bnd-LastModified: 1319477010015
Created-By: Apache Maven Bundle Plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: test

Deploy m2e 1.2.0 compatible version

Please consider deploying a m2e 1.2.0 compatible version to the extension catalog. Right now importing of 'bundle' project fails with an out-of-the-box setup of Eclipse Juno SR1.

Support for Maven dependencies and test source directory

Hi,

Is it possible to modify importing project by this plugin in such a way that Maven classpath container will be available in the eclipse project? If this would be supported maven test dependencies may be available (maybe only when pomDependencies=consider is set - I'm not sure here),

Second interesting option might be configuring test source directories based on configuration in pom.xml (project -> build -> testSourceDirectory). Then, unit test sources may be placed in the same project as source code.

project
|- src - source code
|- src-test - unit test code
pom.xml

build.properties
source.. = src/

As I see project source directory is configured from build.properties options. What about source directories settings in pom.xml, currently they seem to be ignored.

Support for extraClasspathElements

Hi,

It seems that the Tycho connector doesn't support compile-time extra classpath elements.
I'm working with iPOJO annotations in my projects, which are defined in a simple JAR file, not in a bundle, as they are stored in the .class files and are not visible at runtime.
I declared these annotations in a parent pom file, using the extraClasspathElements configuration property of the tycho-compiler-plugin.
This property allows to use a Maven dependency in the compilation class path, and avoids to use the "jar.extra.classpath" property in the build.properties files and to have to store the JAR file somewhere during the compilation.

I have no public sample of this problem yet, I'll prepare a dummy sample workspace later this week, if necessary.

Here is a the plugin configuration :

<plugin>
   <groupId>org.eclipse.tycho</groupId>
   <artifactId>tycho-compiler-plugin</artifactId>
   <version>${tycho-version}</version>
   <configuration>
      <source>1.6</source>
      <target>1.6</target>
      <extraClasspathElements>
         <extraClasspathElement>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.ipojo.annotations</artifactId>
            <version>1.11.0</version>
         </extraClasspathElement>
      </extraClasspathElements>
   </configuration>
</plugin>

Cheers,
Thomas

Using Scala in eclipse-test-plugin

I have developed an Eclipse plugin with separate test plugin in the usual way for Tycho. What I'd like to do is write the tests in Scala (using ScalaTest). However, when I try to import the tests plugin pom with:

<packaging>eclipse-test-plugin</packaging>

then none of the specified Scala source folders are recognized (even the default ones).
If I change the packaging to jar, then the import works correctly. However of course the main plugin is not on the classpath so this is not usable as such.

I can do a mvn clean package from the parent command line and all is fine, including compiling and running ScalaTests.

I am using https://github.com/sonatype/m2eclipse-scala as usual for a Scala project.

Any clues on what to do?

Contribute to some Eclipse.org project to include it in Eclipse packages

Currently, someone doing some Tycho stuff (which is most of plugins developers nowadays) has to install m2e-tycho by themselves. Figuring out that one need to install something is not trivial, the quick-fix on pom editor help a little, but that's still an additional step to get ready.
It would be more convenient to add m2e-tycho to some Eclipse project so that it could be included in the packages targeting Eclipse development (Committers, RCP/RAP, XText...).

Eclipse Mars support

Project configurators are not working on Mars Release Candidate 3 (4.5.0RC3), m2e 1.6.0.20150526.

I can confirm the plugin has been installed. I've tried 0.8 and building master(0.9):
image

I see no errors in Eclipse log and the m2e log. The plugin doesn't seem to be picked up (Full Update Project log output):

...
20/06/2015 9:36:08 am AEST: [DEBUG] datanucleus-core is configured by :
20/06/2015 9:36:08 am AEST: [DEBUG]     - org.eclipse.m2e.jdt.javaConfigurator
20/06/2015 9:36:08 am AEST: [DEBUG]     - org.maven.ide.eclipse.configuration.wtp.java.unsupportedDependencyTypeConfigurator
20/06/2015 9:36:08 am AEST: [DEBUG]     - org.eclipse.m2e.wtp.jpa.configurator.jdt
20/06/2015 9:36:08 am AEST: [DEBUG]     - org.maven.ide.eclipse.configuration.wtp.utility.configurator
20/06/2015 9:36:08 am AEST: [DEBUG]     - org.sonatype.m2e.mavenarchiver.jararchiverconfigurator
20/06/2015 9:36:08 am AEST: [DEBUG]     - org.maven.ide.eclipse.configuration.wtp.webfragment.configurator
20/06/2015 9:36:08 am AEST: [DEBUG] Created marker 'Plugin execution not covered by lifecycle configuration: org.apache.felix:maven-bundle-plugin:2.4.0:manifest (execution: default, phase: process-classes)' on resource '/datanucleus-core/pom.xml'.
...

This same project is working on Luna Luna Service Release 2 (4.4.2)/m2e 1.5.2.20150413-2215 and m2e 1.6.0.20150526 as well.

...
20/06/2015 10:25:38 am AEST: [DEBUG] datanucleus-core is configured by :
20/06/2015 10:25:38 am AEST: [DEBUG]    - org.eclipse.m2e.jdt.javaConfigurator
20/06/2015 10:25:38 am AEST: [DEBUG]    - org.maven.ide.eclipse.configuration.wtp.java.unsupportedDependencyTypeConfigurator
20/06/2015 10:25:38 am AEST: [DEBUG]    - org.eclipse.m2e.wtp.jpa.configurator.jdt
20/06/2015 10:25:38 am AEST: [DEBUG]    - org.maven.ide.eclipse.configuration.wtp.utility.configurator
20/06/2015 10:25:38 am AEST: [DEBUG]    - maven-bundle-plugin
20/06/2015 10:25:38 am AEST: [DEBUG]    - pde-maven-bundle-plugin
20/06/2015 10:25:38 am AEST: [DEBUG]    - org.maven.ide.eclipse.configuration.wtp.webfragment.configurator
...

Not sure if this is relevant but:
Luna - org.sonatype.m2e.mavenarchiver.feature (0.16.0.201401211452-signed-20140310144306)
Mars - org.sonatype.m2e.mavenarchiver.feature (0.17.0.201502101659-signed-20150525172209)

Tycho connector throws IllegalArgumentException for non-tycho projects during Updating Maven Project

This appears to be a similar issue to: https://github.com/sonatype/m2eclipse-tycho/issues/4 but since that was posted about a year ago, and since my situation and error are slightly different, I thought it would be best to report a new issue. I hope this wasn't a mistake :).

I have a number of projects packaged as 'bundle' which don't use any tycho related maven plugins, and when the tycho m2e connector isn't installed they all compile / run / install etc just fine. When the tycho connector (0.6.0.201210231015) is installed, though, I get the following error when trying to update the projects from the POMs:

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:171)
    at org.eclipse.m2e.jdt.internal.AbstractJavaProjectConfigurator.configure(AbstractJavaProjectConfigurator.java:127)
    at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:109)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:457)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$3.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:450)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:388)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:316)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$2.call(ProjectConfigurationManager.java:1)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
    at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1301)
    at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:313)
    at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:77)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

These are all the plugin entries of the POM which I think may be relevant, sorry if this is too much/too little, I wasn't sure what would be important:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>2.3.7</version>
    <extensions>true</extensions>
    <configuration>
        <archive>
            <addMavenDescriptor>true</addMavenDescriptor>
        </archive>
        <instructions>
            <Service-Component>*</Service-Component>
        </instructions>
    </configuration>
    <executions>
        <execution>
            <id>bundle</id>
            <goals>
                <goal>manifest</goal>
            </goals>
            <phase>prepare-package</phase>
            <inherited>true</inherited>
        </execution>
    </executions>
</plugin>

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-scr-plugin</artifactId>
    <version>1.10.0</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.ds-annotations</artifactId>
            <version>1.2.2</version>
        </dependency>

        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.enterprise</artifactId>
            <version>5.0.0</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <id>generate-scr-scrdescriptor</id>
            <goals>
                <goal>scr</goal>
            </goals>
        </execution>
    </executions>
</plugin>

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.4</version>
    <configuration>
        <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
        </archive>
    </configuration>
</plugin>

Now AFAIU this method of annotation/POM first configuration is not compatible with the tycho m2e connector, so I have no idea why it is trying to interfere with this build, and as soon as I uninstall the tycho connector everything works fine again.

(FWIW I have another project in the workspace configured to actually use tycho with 'eclipse-plugin' packaging, and I don't get this error with that.)

Cheers,

Eli

Version-specific p2 repository URLs make "Check for updates" fail

The m2e connectors catalogue currently seems to contain the source URL http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.6.0/N/0.6.0.201207302152/ for the Tycho connector.

This URL seems to be specific to exactly one version of the Tycho connector.

When a new m2e version requiring an updated Tycho connector is published, "Check for updates" in Eclipse would fail. This is because p2 would find the updates for m2e but not the updates for the Tycho connector.

I think that the connectors catalogue should contain a stable URL that contains all versions of the Tycho connector.

Extract ProjectConfigurator from TychoLifecycleMapping

I want to implement a custom project configurator that should participate in the configuration of the Eclipse project being currently built. My configurator should work with the maven-compiler-plugin and the tycho-compiler-plugin.
This works fine for the plain maven case because I can run after the org.eclipse.m2e.jdt.javaConfigurator from m2e.jdt. For tycho, this is not possible because the project configuration is woven into the TychoLifecycleMapping. I'd like to create a PR and extract the configuration into a default project configurator. This would avoid conflicting registrations of plugin execution handlers and also allow to handle the order of applied configurations correctly.

bundle manifest generation does not consider generated sources

Consider a project that uses modello (or any other source code generation
plugin). Here is rough sequence of builder actions that occur during full
and incremental workspace builds. Note that code generation and compilation
of the generated code are performed by two different workspace builders,
MavenBuilder and JavaBuilder respectively.

  1. clean build
    • m2e/modello deletes generated sources, as expected, this is necessary to
      remove any stale generated sources
    • jdt builder removes generated .class files
  2. full workspace build (JavaBuilder)
    • there are no generated sources to compile at this point
  3. full workspace build (MavenBuilder)
    • m2e/modello is executed during 'generate-sources' phase, generated sources
      folder is added to MavenProject model but the sources compilation is
      deferred to JavaBuilder execution
    • m2e/tycho is executed but does not consider generated classes because they
      have not been compiled yet
  4. incremental build (JavaBuilder)
    • newly generated sources are compiled
  5. incremental build (MavenBuilder)
    • m2e/tycho does not run during incremental build, it'd be prohibitively
      expensive.

The short-term workaround is to change maven-bundle-plugin configuration to
NOT rely on presence of compiled generated sources classes.

The only solution I can think of is to invoke java compiler from MavenBuilder,
which will require non-trivial changes to JDT API.

Does not support Embed-Dependency

When I set Embed-Dependency in pom.xml, "An internal error occurred null" is shown in Console View.
Unfortunately, there is no log about the error.
Please check the issue.

Generate a PDE .target definition from a pom.xml

In order to improve the ability for end-users to set up the right target-platform in their IDE when none is provided by the project, it would be nice to have the ability to generate a .target definition from a pom.xml. As I imagine it, it would run regular Maven dependency resolution -a bit like m2e does it for regular Maven projects- and create a .target file with the resolved content. Users could then have a working TP for any Tycho project by:

  1. Right click on pom.xml => Generate PDE target platform
  2. Open .target file => Set as target platform.

Jdt debugger does not find sources when Tycho Project Configurators is installed

If you have PDE projects with Maven nature (configured with Tycho), and you try to debug, e.g. a JUnit Test Case in a .tests project that tests a Java class in another project, then JDT debugger cannot find the sources of the classes of other projects (nor sources of possible dependencies used by the classes under test) if you have "Tycho Project Configurators" installed in your Eclipse.

For example, take the projects found here: https://github.com/LorenzoBettini/tycho-simple-example

  • if you do NOT have Tycho Project Configurators installed, then you can set a break point in MyClass(in project example.plugin) and you can debug such class running the JUnit test MyClassTest in the project example.tests: the debugger can seamlessly find the sources of MyClass.
  • If you install Tycho Project Configurators installed, then, during debugging the JUnit Test Case, the source of MyClass cannot be found.

Note that if this happens, and you uninstall the Tycho Project Configurators, debugger will work again (it will find the sources) ONLY if you use another fresh workspace or if you first remove a few folders in the .metadata directory (I did some tests and I had to remove .jdt., .debug. and .m2e.). Since I found no file left from the Tycho Project Configurators in the .metadata directory, can it be that m2eclipse-tycho interferes with some JDT indexes?

I'm using Eclipse Neon 2 and the Tycho Project Configurators taken from http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.9.0/N/LATEST

Rebuild manifest when bnd instructions change in the pom (or in included bnd files)

Originally opened as https://bugs.eclipse.org/bugs/show_bug.cgi?id=360875

Currently when you edit bnd instructions inside the pom.xml of a project with
bundle packaging you get an error marker telling you the Maven project
configuration is out-of-date and needs an update. It would be useful if instead
it could regenerate the manifest with the new instructions.

Some bundle projects also include external bnd files using
<_include>something.bnd</_include> (these files may themselves include other
bnd files). So we might also want to consider regenerating the manifest when
any included bnd files change.

Tycho dependency problem

I am new to tycho. I have created a eclipse plugin and was in need of converting it into maven project so i used Tycho but i am struck with an issue. when i execute the plugin it works fine but when i maven clean it ,It shows the following error.

Software being installed: xxx 1.0.0.qualifier
[ERROR] Missing requirement: xxx 1.0.0.qualifier requires 'bundle org.eclipse.ui 0.0.0' but it could not be found
[ERROR]
[ERROR] Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.ui 0.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.runtime 0.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.jdt.core 3.9.2.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.resources 3.8.101.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.jdt.ui 3.9.2.; Unable to satisfy dependency fromxxx1.0.0.qualifier to bundle org.eclipse.ui.console 3.5.200.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.ui.editors 3.8.100.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle com.test.dependency.bundles 1.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to package org.eclipse.jface.text 0.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to package org.eclipse.jface.text.presentation 0.0.0.; Unable to satisfy dependency from xxx1.0.0.qualifier to package org.eclipse.jface.text.rules 0.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to package org.eclipse.jface.text.source 0.0.0.; No solution found because the problem is unsatisfiable.] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from txxx 1.0.0.qualifier to bundle org.eclipse.ui 0.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.runtime 0.0.0.; Unable to satisfy dependency from xxx1.0.0.qualifier to bundle org.eclipse.jdt.core 3.9.2.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.resources 3.8.101.; Unable to satisfy dependency fromxxx 1.0.0.qualifier to bundle org.eclipse.jdt.ui 3.9.2.; Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.ui.console 3.5.200.; Unable to satisfy dependency from xxx1.0.0.qualifier to bundle org.eclipse.ui.editors 3.8.100.; Unable to satisfy dependency fromxxx1.0.0.qualifier to bundle com.nuwaza.aqua.plugin.dependency.bundles 1.0.0.; Unable to satisfy dependency from xxx 1.0.0.qualifier to package org.eclipse.jface.text 0.0.0.; Unable to satisfy dependency fromxxx 1.0.0.qualifier to package org.eclipse.jface.text.presentation 0.0.0.; Unable to satisfy dependency fromxxx 1.0.0.qualifier to package org.eclipse.jface.text.rules 0.0.0.; Unable to satisfy dependency fromxxx 1.0.0.qualifier to package org.eclipse.jface.text.source 0.0.0.; No solution found because the problem is unsatisfiable.]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
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(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)

please help me!! i am very much in need of this.

Remove MavenBundlePluginConfigurator as this conflicts with incremental support added in maven-bundle-plugin 3.2.0

Since version 3.2.0 the maven-bundle-plugin comes with native support of m2e (https://issues.apache.org/jira/browse/FELIX-4009). This conflicts with this extension`s configurator (see http://dev.eclipse.org/mhonarc/lists/m2e-users/msg05446.html) and leads to the error messages

Duplicate bundle executions found. Please remove any explicitly defined bundle executions in your pom.xml

and

Duplicate manifest executions found. Please remove any explicitly defined manifest executions in your pom.xml.`

Therefore please remove the configurator from this extension and also do no longer propose to automatically install this extension for packaging "bundle".

ConcurrentModificationException at (...) org.sonatype.tycho.m2e.internal.PDEClasspathContributor

Hello good people of Tesla (Ceki?!),

Thank you for much for your work on m2eclipse-tycho!

I just wanted to let you know that when using https://github.com/vorburger/opendaylight-eclipse-setup I'm occasionally (as in not for the first time, but as things things go unfortunately not reproducible) seeing the following ConcurrentModificationException:

java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
    at java.util.HashMap$EntryIterator.next(HashMap.java:1463)
    at java.util.HashMap$EntryIterator.next(HashMap.java:1461)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:2865)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2885)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1965)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3424)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getMavenClasspath(PDEClasspathContributor.java:129)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getEntriesForDependency(PDEClasspathContributor.java:89)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.java:278)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:247)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:231)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:125)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:76)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2699)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
    at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
    at org.eclipse.jdt.internal.core.ProjectReferenceChange.updateProjectReferencesIfNecessary(ProjectReferenceChange.java:47)
    at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:59)
    at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
    at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:795)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:2869)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2885)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1965)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3424)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getMavenClasspath(PDEClasspathContributor.java:129)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getEntriesForDependency(PDEClasspathContributor.java:89)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.java:278)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:247)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:231)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:125)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:76)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2699)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
    at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
    at org.eclipse.jdt.internal.core.ProjectReferenceChange.updateProjectReferencesIfNecessary(ProjectReferenceChange.java:47)
    at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:59)
    at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
    at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:795)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:2869)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2885)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1965)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3424)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getMavenClasspath(PDEClasspathContributor.java:129)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getEntriesForDependency(PDEClasspathContributor.java:89)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.java:278)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:247)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:231)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:125)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:76)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2699)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
    at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
    at org.eclipse.jdt.internal.core.ProjectReferenceChange.updateProjectReferencesIfNecessary(ProjectReferenceChange.java:47)
    at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:59)
    at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
    at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:795)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:2869)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2885)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1965)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3424)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getMavenClasspath(PDEClasspathContributor.java:129)
    at org.sonatype.tycho.m2e.internal.PDEClasspathContributor.getEntriesForDependency(PDEClasspathContributor.java:89)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addPlugin(RequiredPluginsClasspathContainer.java:278)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:247)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.addDependency(RequiredPluginsClasspathContainer.java:231)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.computePluginEntries(RequiredPluginsClasspathContainer.java:125)
    at org.eclipse.pde.internal.core.RequiredPluginsClasspathContainer.getClasspathEntries(RequiredPluginsClasspathContainer.java:76)
    at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspathEntry(ClasspathEntry.java:2090)
    at org.eclipse.jdt.internal.core.ClasspathEntry.validateClasspathEntry(ClasspathEntry.java:2031)
    at org.eclipse.jdt.internal.core.ClasspathValidation.validate(ClasspathValidation.java:72)
    at org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged(ChangeClasspathOperation.java:51)
    at org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation(SetContainerOperation.java:110)
    at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:724)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:795)
    at org.eclipse.jdt.internal.core.JavaModelManager$10.run(JavaModelManager.java:2869)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeAllContainers(JavaModelManager.java:2885)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1965)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:3424)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2693)
    at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2857)
    at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1962)
    at org.eclipse.jdt.internal.core.JavaProject.getClasspathEntryFor(JavaProject.java:1441)
    at org.eclipse.jdt.internal.core.PackageFragmentRoot.validateOnClasspath(PackageFragmentRoot.java:750)
    at org.eclipse.jdt.internal.core.PackageFragmentRoot.validateExistence(PackageFragmentRoot.java:800)
    at org.eclipse.jdt.internal.core.Openable.exists(Openable.java:207)
    at org.eclipse.jdt.internal.ui.JarEntryEditorInputFactory.createElement(JarEntryEditorInputFactory.java:64)
    at net.sf.eclipsecs.ui.properties.filter.CheckFileOnOpenPartListener.getRestoredInput(CheckFileOnOpenPartListener.java:269)
    at net.sf.eclipsecs.ui.properties.filter.CheckFileOnOpenPartListener.getEditorFile(CheckFileOnOpenPartListener.java:231)
    at net.sf.eclipsecs.ui.properties.filter.CheckFileOnOpenPartListener.access$0(CheckFileOnOpenPartListener.java:209)
    at net.sf.eclipsecs.ui.properties.filter.CheckFileOnOpenPartListener$PartsOpenedJob.runInWorkspace(CheckFileOnOpenPartListener.java:111)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

[Maven-Bundle-Plugin]Generate Manifest when a maven project is added

currently it is generated when a dependency is modified:

if ( MavenProjectChangedEvent.KIND_CHANGED == event.getKind()
&& MavenProjectChangedEvent.FLAG_DEPENDENCIES == event.getFlags() )

In case of import of a pre-configured Maven project in a new workspace (with .project), we need to listen to MavenProjectChangedEvent.KIND_ADDED too

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.