JaroslavTulach at 18:30, 26 March 2016 - 2016-03-26 18:30:56

←Older revision Revision as of 18:30, 26 March 2016
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 -->

JaroslavTulach at 20:39, 30 December 2014 - 2014-12-30 20:39:29

←Older revision Revision as of 20:39, 30 December 2014
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>

JaroslavTulach: 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... - 2014-12-07 05:19:53

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

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 control its pom.xml, you can just include:

<source lang="xml">
<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>
</source>

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:

<source lang="xml">
<dependency>
<groupId>your.library.group</groupId>
<artifactId>your.library.name</artifactId>
<classifier>bck2brwsr</classifier>org.apidesign.bck2brwsr
<scope>provided</scope>
<type>jar</type>
<dependency>
</source>

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

<source lang="xml">
<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>
<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>
</source>

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