'. '

Bck2BrwsrLibraries

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: If your Bck2Brwsr application uses some popular library you may decide to pre-compile it, rather than spend time compiling it everytime. If you are building your library and co...)
Current revision (18:30, 26 March 2016) (edit) (undo)
 
(One intermediate revision not shown.)
Line 22: Line 22:
<groupId>your.library.group</groupId>
<groupId>your.library.group</groupId>
<artifactId>your.library.name</artifactId>
<artifactId>your.library.name</artifactId>
-
<classifier>bck2brwsr</classifier>org.apidesign.bck2brwsr
+
<classifier>bck2brwsr</classifier>
<scope>provided</scope>
<scope>provided</scope>
<type>jar</type>
<type>jar</type>
Line 43: Line 43:
</executions>
</executions>
<configuration>
<configuration>
 +
<ignoreBootClassPath>false</ignoreBootClassPath>
<aotDeps>
<aotDeps>
<!-- compiles whole group HTML/Java libraries from NetBeans -->
<!-- compiles whole group HTML/Java libraries from NetBeans -->

Current revision

If your Bck2Brwsr application uses some popular library you may decide to pre-compile it, rather than spend time compiling it everytime. If you are building your library and control its pom.xml, you can just include:

<plugin>
  <groupId>org.apidesign.bck2brwsr</groupId>
  <artifactId>bck2brwsr-maven-plugin</artifactId>
  <version>${bck2brwsr.version}</version>
  <executions>
    <execution>
      <goals>
        <goal>library</goal>
      </goals>
    </execution>
  </executions>
</plugin>

in your pom.xml and additional artifact with classifier bck2brwsr will be generated for you. In other pom.xml where, you compile your final application, you just reference this new artifact and pre-compiled JavaScript file with Bck2Brwsr library will be used:

<dependency>
  <groupId>your.library.group</groupId>
  <artifactId>your.library.name</artifactId>
  <classifier>bck2brwsr</classifier>
  <scope>provided</scope>
  <type>jar</type>
<dependency>

Of course, sometimes people don't control their library's pom.xml and want to do additional modifications to it (like adding OSGi headers). Even with such libraries one can use ahead-of-time compilation. Just use aotDeps element and pre-compile your dependencies too:

<plugin>
  <groupId>org.apidesign.bck2brwsr</groupId>
  <artifactId>bck2brwsr-maven-plugin</artifactId>
  <version>${bck2brwsr.version}</version>
  <executions>
    <execution>
      <goals>
        <goal>library</goal>
      </goals>
    </execution>
  </executions>
  <configuration>
    <ignoreBootClassPath>false</ignoreBootClassPath>
    <aotDeps>
       <!-- compiles whole group HTML/Java libraries from NetBeans --> 
       <aotDep>org.netbeans.html:*</aotDep>
    </aotDeps>
    <!-- does not compile the main project artifact -->
    <minified>false</minified>
    <debug>false</debug>
  </configuration>
</plugin>

With support like that you can significantly speed up compilation of your Bck2Brwsr projects.

Personal tools
buy