Eclipse: What is the minimum Eclipse installation needed for a headless PDE build?

前端 未结 2 385

I am currently using PDE build in headless mode to build my OSGI Bundle project. The PDE Antrunner task uses an Eclipse installation and I am just pointing it to my local E

2条回答
  •  甜味超标
    2021-01-01 23:57

    I finally needed to do this myself today (to address a problem I was having where directories with spaces in their names weren't being included in the bundle PDE Build produced). I eventually got something that could build my collection of (Java-based) plug-ins. I don't know whether it's "minimal", but it's Java PDE Build-focused and much smaller than a full Eclipse IDE install.

    I took rough notes; there could be a few omissions or superfluous steps here, but in the main it should guide.

    I:

    1. Fired up a recent Eclipse IDE (in my case, the 3.5 instance I use at the moment).
    2. Used a scratch workspace, so changes to the target platform wouldn’t mess up my “real” projects.
    3. Made sure the target platform was set to the place I wanted to draw my PDE builder's plug-ins from (in my case, just my running Eclipse). (Window | Preferences... | Plug-in Development | Target Platform)
    4. Created a new empty project.
    5. Created a new Product Configuration within that project (using the "basic settings").
    6. On the new product configuration's "Overview" page, unchecked “The product includes native launcher artifacts.”
    7. On Dependencies, specified the following plug-ins as constituting the product:
      • org.eclipse.pde.build
      • org.apache.ant
      • org.eclipse.jdt.core
    8. Checked “Include optional dependencies . . .”
    9. Clicked “Add Required Plug-ins”.
    10. Right-clicked product definition in Package Explorer and picked “Export… | Eclipse product”.
    11. Told it where I wanted my PDE builder instance to go.
    12. Unchecked “Synchronize before exporting”.
    13. Unchecked “Generate metadata repository”.
    14. Clicked "Finish".

    Now I can (continue to) launch a PDE Build from my normal Ant build by invoking a macro like the following (is there a better way?):

    
        
        
            
            
                
                
    
                
                
    
                
    
                
            
        
    
    

提交回复
热议问题