[英]How to setup development environment for Google Appengine Java Managed VM using Eclipse and Maven
[英]How to setup bundle development environment (Eclipse Equinox Maven)
我正在嘗試設置eclipse環境以開發捆綁包(使用maven-bundle-plugin-bnd)並運行和調試從Eclipse捆綁春分點
我使用org.apache.felix maven-bundle-plugin創建了示例捆綁包,可以從Eclipse春分點安裝和啟動該捆綁包,
但是每次我需要運行“安裝文件:C:\\ path \\ bundle1.jar”,“安裝文件:C:\\ path \\ bundle2.jar”時,都會引起痛苦。 我搜索了運行配置,但它僅安裝並啟動(插入)項目,而不是Maven項目。
我所做的是創建maven項目並添加依賴項(bundle1,bundle2等。)並添加了maven-dependency-plugin以將所有依賴的包復制到一個文件夾中(另一個問題是春分使用“ _”定界符確定包的版本,但是maven使用“-”作為分隔符)如果我不剝離獨立的春分應用程序中的版本,我需要在config.ini文件中提供捆綁軟件的版本,但我不想要,解決此問題的正確方法是嗎?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${bundleDirectory}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
總結一下,我在org.apache.felix maven-bundle-plugin創建的文件夾中有捆綁包,如何從Eclipse中運行和調試它們?
我不會說這是一個“適當的”解決方案,但它可能對您有用。
antrun插件可用於修改依賴項,以用下划線替換最終的連字符,因此,依賴項插件無需剝離版本。
我的正則表達式很生銹,但是經過一點測試,下面的配置似乎將所需的名稱更改應用於bundleDependency目錄中的文件。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${bundleDirectory}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<tasks>
<!-- move within same directory is preferred method for a rename-->
<move todir="${bundleDirectory}">
<fileset dir="${bundleDirectory}"/>
<mapper type="regexp" from="([a-zA-Z0-9\.-]+)(-)([0-9\.]+.jar)"
to="\1_\3"/>
</move>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-nodeps</artifactId>
<version>1.6.5</version>
</dependency>
</dependencies>
</plugin>
我編寫了一個名為auto-builder的工具( http://code.google.com/p/auto-builder )。 它會檢查基於PDE的項目並生成Ant構建文件。 它支持對依賴項和所有爵士樂的傳遞閉包。
我張貼了一篇文章: http : //empty-set.net/?p=9 。 我之所以寫它是因為與PDE集成時,我玩過的Maven工具不能“正常工作”。基本上,我想在PDE中進行編碼,並且希望擁有一個基於Hudson的CI,而不會在此之間大驚小怪。
生成Ant文件很不錯,因為它為您提供了聲明式構建工具的所有優點,但它為您提供了有關其工作的過程說明。
我正在尋找更多基於PDE的項目對其進行測試。 周圍有幾個RFC-0112捆綁存儲庫,我有一些用於下載依賴項的代碼。 如果有人感興趣,那么我可以將依賴項下載與自動構建器集成在一起。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.