Java – continue to develop plug-ins

There is an Eclipse Plug-in managed by maven, which contains the following configurations:

<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>wonttellya</groupId>
        <artifactId>wonttellya</artifactId>
        <version>1.0-SNAPSHOT</version>
        <packaging>jar</packaging>
        <dependencies>
            ...
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <pde>true</pde>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

I run on the console

C:\Users\user\git\wonttellya\mvn 
         eclipse:eclipse -Declipse.workspace=C:\Users\user\workspace2
...
Using Eclipse Workspace: C:\Users\user\workspace2    
...
BUILD SUCCESS

If I open eclipse in my workspace, there is no project

Solution

First, you must understand that the purpose of Maven eclipse plugin is to reference its documents:

The goal is not to create an entire project, but to build eclipse to block existing projects

The same is true for PDE support Quoting its documentation:

Therefore, you simply create the correct for an existing project Project and Classpath file Once this configuration is complete and the eclipse: Eclipse target runs, you will need to follow the following steps:

>Open eclipse and import the existing project, go to "File > Import... > existing project into the workspace" > Right click the new project and select Configure > Convert to plug in project Confirm this selection

You can then build eclipse plug - ins directly in the IDE

Please note that I don't recommend this solution. I suggest you use Tycho, which may be that you can improve this plug-in (see this question)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>