Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continue development of Plugin

There is an Eclipse Plugin managed by Maven containing this configuration:

<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>

In console I run

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 the workspace there is no project.

like image 896
Grim Avatar asked Nov 03 '15 07:11

Grim


People also ask

What is a plugin development?

Plugins are packages of code that extend the core functionality of WordPress. WordPress plugins are made up of PHP code and can include other assets such as images, CSS, and JavaScript. By making your own plugin you are extending WordPress, i.e. building additional functionality on top of what WordPress already offers.

What is the importance of plugin?

plug-in, also called add-on or extension, computer software that adds new functions to a host program without altering the host program itself. Widely used in digital audio, video, and Web browsing, plug-ins enable programmers to update a host program while keeping the user within the program's environment.


2 Answers

First of all, you have to understand that the purpose of the maven-eclipse-plugin is, quoting its documentation:

to generate Eclipse IDE files (*.classpath, *.project, *.wtpmodules and the .settings folder) for use with a project.

Its goal is not to create an entire project but the building Eclipse blocks from an existing project.

This is also true for PDE support. Quoting its documentation:

Note that the scope of the maven-eclipse-plugin is to synchronise the Eclipse .project and .classpath files with the configuration found in the pom file. Once you have finished configuring the Eclipse plugin as below, and once you have run the eclipse:eclipse goal, you will be in a position to build your plugin code with the Eclipse IDE, or the Eclipse headless PDE build. The Eclipse headless PDE build can be triggered from within Maven using the pde-maven-plugin.

As such, the configuration you have simply enables the creation of correct .project and .classpath files for an existing project, nothing more. Once this configuration has been made and eclipse:eclipse goal was run, you will need to follow these steps:

  • Open Eclipse and import the existing project, by going to "File > Import... > Existing Projects into Workspace".
  • Right-click the new project and select "Configure > Convert to Plugins Projects...". Confirm this choice.

You will then be able to build your Eclipse plugin directly in the IDE.

Note that I do not recommend using this solution and I would suggest you use Tycho instead, this might be an improvement you could make to this plugin (refer to this question).

like image 121
Tunaki Avatar answered Sep 22 '22 15:09

Tunaki


Make sure you have update your project before you run the maven install Try to click on your project with the right mouse button and go to maven-->update project

For a different clause You can use export and import with archive (.zip) that you can manage Plugin and simply transfert your project in different workspaces

like image 39
evalboy Avatar answered Sep 20 '22 15:09

evalboy