Advertisement
Guest User

Untitled

a guest
Aug 21st, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 12.06 KB | None | 0 0
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2.         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3.     <modelVersion>4.0.0</modelVersion>
  4.  
  5.     <groupId>ihtika2</groupId>
  6.     <artifactId>I_MainForm</artifactId>
  7.     <version>1.0-SNAPSHOT</version>
  8.     <packaging>bundle</packaging>
  9.  
  10.     <name>I_MainForm OSGi Bundle</name>
  11.  
  12.     <properties>
  13.         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14.     </properties>
  15.  
  16.     <dependencies>
  17.         <dependency>
  18.             <groupId>org.apache.felix</groupId>
  19.             <artifactId>org.osgi.core</artifactId>
  20.             <version>1.4.0</version>
  21.             <scope>provided</scope>
  22.             <type>tar.gz</type>
  23.             <classifier>bin</classifier>
  24.         </dependency>
  25.         <dependency>
  26.             <groupId>${project.groupId}</groupId>
  27.             <artifactId>I_AppVars</artifactId>
  28.             <version>${project.version}</version>
  29.         </dependency>
  30.         <dependency>
  31.             <groupId>${project.groupId}</groupId>
  32.             <artifactId>I_AboutForm</artifactId>
  33.             <version>${project.version}</version>
  34.             <exclusions>
  35.                 <exclusion>
  36.                     <artifactId>org.apache.felix.main</artifactId>
  37.                     <groupId>org.apache.felix</groupId>
  38.                 </exclusion>
  39.             </exclusions>
  40.         </dependency>
  41.         <dependency>
  42.             <groupId>${project.groupId}</groupId>
  43.             <artifactId>I_InternalFunctions</artifactId>
  44.             <version>${project.version}</version>
  45.         </dependency>
  46.         <dependency>
  47.             <groupId>${project.groupId}</groupId>
  48.             <artifactId>I_LuceneIndexHandler</artifactId>
  49.             <version>${project.version}</version>
  50.         </dependency>
  51.         <dependency>
  52.             <groupId>khartn</groupId>
  53.             <artifactId>JerichoBundle</artifactId>
  54.             <version>3.2-SNAPSHOT</version>
  55.             <exclusions>
  56.                 <exclusion>
  57.                     <artifactId>org.apache.felix.main</artifactId>
  58.                     <groupId>org.apache.felix</groupId>
  59.                 </exclusion>
  60.             </exclusions>
  61.         </dependency>
  62.         <dependency>
  63.             <groupId>khartn</groupId>
  64.             <artifactId>KhArtNOSGiWrapper</artifactId>
  65.             <version>1.0-SNAPSHOT</version>
  66.             <exclusions>
  67.                 <exclusion>
  68.                     <artifactId>org.apache.felix.framework</artifactId>
  69.                     <groupId>org.apache.felix</groupId>
  70.                 </exclusion>
  71.                 <exclusion>
  72.                     <artifactId>org.apache.felix.main</artifactId>
  73.                     <groupId>org.apache.felix</groupId>
  74.                 </exclusion>
  75.             </exclusions>
  76.         </dependency>
  77.         <dependency>
  78.             <groupId>org.apache.felix</groupId>
  79.             <artifactId>org.apache.felix.main</artifactId>
  80.             <version>4.0.3</version>
  81.         </dependency>
  82.     </dependencies>
  83.  
  84.     <build>
  85.         <plugins>
  86.             <plugin>
  87.                 <groupId>org.apache.felix</groupId>
  88.                 <artifactId>maven-bundle-plugin</artifactId>
  89.                 <version>2.2.0</version>
  90.                 <extensions>true</extensions>
  91.                 <configuration>
  92.                     <instructions>
  93.                         <Bundle-Activator>ihtika2.mainform.Activator</Bundle-Activator>
  94.                         <Export-Package>ihtika2.mainform</Export-Package>
  95.                         <!--<Import-Package>com.google.code.ihtika</Import-Package>-->
  96.                         <Private-Package>ihtika2.mainform.*</Private-Package>
  97.                     </instructions>
  98.                 </configuration>
  99.             </plugin>
  100.            
  101.             <plugin>
  102.                 <groupId>org.apache.maven.plugins</groupId>
  103.                 <artifactId>maven-antrun-plugin</artifactId>
  104.                 <version>1.6</version>
  105.                 <executions>
  106.                     <execution>
  107.                         <id>compile</id>
  108.                         <phase>package</phase>
  109.                         <goals>
  110.                             <goal>run</goal>
  111.                         </goals>
  112.                         <configuration>
  113.                             <target>
  114.                                 <copy file="target/I_MainForm-1.0-SNAPSHOT.jar" tofile="../../MainApplication/I_Bundles/Stage_500/I_MainForm-1.0-SNAPSHOT.jar"/>
  115.                             </target>
  116.                         </configuration>
  117.                     </execution>
  118.                 </executions>
  119.             </plugin>            
  120.            
  121.             <plugin>
  122.                 <groupId>org.apache.maven.plugins</groupId>
  123.                 <artifactId>maven-compiler-plugin</artifactId>
  124.                 <version>2.3.2</version>
  125.                 <configuration>
  126.                     <source>1.7</source>
  127.                     <target>1.7</target>
  128.                 </configuration>
  129.             </plugin>
  130.         </plugins>
  131.     </build>
  132.  
  133.     <profiles>
  134.         <profile>
  135.             <id>build-for-felix</id>
  136.             <dependencies>
  137.                 <dependency>
  138.                     <groupId>org.apache.felix</groupId>
  139.                     <artifactId>org.apache.felix.main</artifactId>
  140.                     <version>3.0.7</version>
  141.                     <scope>provided</scope>
  142.                 </dependency>
  143.                 <!-- To include a shell:
  144.                <dependency>
  145.                    <groupId>org.apache.felix</groupId>
  146.                    <artifactId>org.apache.felix.gogo.shell</artifactId>
  147.                    <version>0.6.1</version>
  148.                </dependency>
  149.                -->
  150.             </dependencies>
  151.             <build>
  152.                 <plugins>
  153.                     <plugin>
  154.                         <groupId>org.apache.maven.plugins</groupId>
  155.                         <artifactId>maven-antrun-plugin</artifactId>
  156.                         <version>1.6</version>
  157.                         <executions>
  158.                             <execution>
  159.                                 <id>compile</id>
  160.                                 <phase>package</phase>
  161.                                 <goals>
  162.                                     <goal>run</goal>
  163.                                 </goals>
  164.                                 <configuration>
  165.                                     <target>
  166.                                         <pathconvert property="plugins.jars" pathsep="${path.separator}">
  167.                                             <path refid="maven.runtime.classpath"/>
  168.                                             <map from="${project.build.directory}${file.separator}classes" to=""/>
  169.                                         </pathconvert>
  170.                                         <pathconvert pathsep=" " property="bundles">
  171.                                             <path path="${plugins.jars}"/>
  172.                                             <mapper>
  173.                                                 <chainedmapper>
  174.                                                     <flattenmapper/>
  175.                                                     <globmapper from="*" to="file:modules/*" casesensitive="no"/>
  176.                                                 </chainedmapper>
  177.                                             </mapper>
  178.                                         </pathconvert>
  179.                                         <propertyfile file="${project.build.directory}/config.properties">
  180.                                             <entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalName}.jar"/>
  181.                                             <entry key="org.osgi.framework.bootdelegation" value="*"/>
  182.                                         </propertyfile>
  183.                                         <copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar"/>
  184.                                     </target>
  185.                                 </configuration>
  186.                             </execution>
  187.                         </executions>
  188.                     </plugin>
  189.                     <plugin>
  190.                         <groupId>org.apache.maven.plugins</groupId>
  191.                         <artifactId>maven-assembly-plugin</artifactId>
  192.                         <version>2.2</version>
  193.                         <executions>
  194.                             <execution>
  195.                                 <id>create-executable-jar</id>
  196.                                 <phase>package</phase>
  197.                                 <goals>
  198.                                     <goal>single</goal>
  199.                                 </goals>
  200.                                 <configuration>
  201.                                     <descriptors>
  202.                                         <descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
  203.                                     </descriptors>
  204.                                     <finalName>${project.build.finalName}</finalName>
  205.                                 </configuration>
  206.                             </execution>
  207.                         </executions>
  208.                     </plugin>
  209.                 </plugins>
  210.             </build>
  211.         </profile>
  212.         <profile>
  213.             <id>run-on-felix</id>
  214.             <dependencies>
  215.                 <dependency>
  216.                     <groupId>org.apache.felix</groupId>
  217.                     <artifactId>org.apache.felix.main</artifactId>
  218.                     <version>3.0.7</version>
  219.                     <scope>provided</scope>
  220.                 </dependency>
  221.                 <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed -->
  222.             </dependencies>
  223.             <build>
  224.                 <plugins>
  225.                     <plugin>
  226.                         <groupId>org.apache.maven.plugins</groupId>
  227.                         <artifactId>maven-antrun-plugin</artifactId>
  228.                         <version>1.6</version>
  229.                         <configuration>
  230.                             <target>
  231.                                 <property name="vm.args" value=""/>
  232.                                 <pathconvert property="plugins.jars" pathsep="${path.separator}">
  233.                                     <path refid="maven.runtime.classpath"/>
  234.                                     <map from="${project.build.directory}${file.separator}classes" to=""/>
  235.                                 </pathconvert>
  236.                                 <makeurl property="urls" separator=" ">
  237.                                     <path path="${plugins.jars}"/>
  238.                                     <path location="${project.build.directory}/${project.build.finalName}.jar"/>
  239.                                 </makeurl>
  240.                                 <propertyfile file="${project.build.directory}/run.properties">
  241.                                     <entry key="felix.auto.start" value="${urls}"/>
  242.                                     <entry key="felix.auto.deploy.action" value="uninstall,install,update,start"/>
  243.                                     <entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache"/>
  244.                                     <entry key="org.osgi.framework.bootdelegation" value="*"/>
  245.                                 </propertyfile>
  246.                                 <makeurl property="run.properties.url" file="${project.build.directory}/run.properties"/>
  247.                                 <java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
  248.                                     <sysproperty key="felix.config.properties" value="${run.properties.url}"/>
  249.                                     <jvmarg line="${vm.args}"/>
  250.                                 </java>
  251.                             </target>
  252.                         </configuration>
  253.                     </plugin>
  254.                 </plugins>
  255.             </build>
  256.         </profile>
  257.     </profiles>
  258. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement