diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2017-02-09 11:17:35 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-02-09 11:17:35 +0200 |
commit | 96a63f93abb4afee36c149974128390b13f62d4c (patch) | |
tree | afc82be2ffff19aafb452469a030a7e0d3190d8a | |
parent | 322ba2ab9d7a6af8a8e68c063da7480e08843118 (diff) | |
download | vaadin-framework-96a63f93abb4afee36c149974128390b13f62d4c.tar.gz vaadin-framework-96a63f93abb4afee36c149974128390b13f62d4c.zip |
Include Vaadin-Icons into the project, (#8485)
Include Vaadin-Icons into the valo theme in the project,
make vaadin-icons dependency 'provided'
Fixes #8471
-rw-r--r-- | pom.xml | 1 | ||||
-rw-r--r-- | server/pom.xml | 47 | ||||
-rw-r--r-- | test/servlet-containers/generic/ivy.xml | 4 | ||||
-rw-r--r-- | test/servlet-containers/generic/ivysettings.xml | 2 | ||||
-rw-r--r-- | themes/pom.xml | 22 | ||||
-rw-r--r-- | themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss | 2 | ||||
-rw-r--r-- | themes/src/main/themes/VAADIN/themes/valo/fonts/vaadin-icons/vaadin-icons.scss | 20 |
7 files changed, 89 insertions, 9 deletions
@@ -285,6 +285,7 @@ <groupId>com.vaadin</groupId> <artifactId>vaadin-icons</artifactId> <version>${vaadin.icons.version}</version> + <scope>provided</scope> </dependency> </dependencies> </dependencyManagement> diff --git a/server/pom.xml b/server/pom.xml index a29c9d7c2c..b8566f2b39 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -116,6 +116,49 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>copy-font-icons</id> + <phase>generate-sources</phase> + <goals> + <goal>unpack-dependencies</goal> + </goals> + <!-- VaadinIcons.java file --> + <configuration> + <includeGroupIds>com.vaadin</includeGroupIds> + <includeArtifactIds>vaadin-icons</includeArtifactIds> + <excludeTransitive>true</excludeTransitive> + <includes>com/vaadin/icons/VaadinIcons.java</includes> + <overWrite>true</overWrite> + <outputDirectory>${project.build.directory}/vaadin-icons</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>add-source</id> + <phase>generate-sources</phase> + <goals> + <goal>add-source</goal> + </goals> + <configuration> + <sources> + <source>${project.build.directory}/vaadin-icons</source> + </sources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> <executions> <!-- Copy .java files to package --> @@ -137,6 +180,10 @@ <directory>src/main/java</directory> <filtering>false</filtering> </resource> + <resource> + <directory>${project.build.directory}/vaadin-icons</directory> + <filtering>false</filtering> + </resource> </resources> </configuration> </execution> diff --git a/test/servlet-containers/generic/ivy.xml b/test/servlet-containers/generic/ivy.xml index 6046e60620..33ac7c7c04 100644 --- a/test/servlet-containers/generic/ivy.xml +++ b/test/servlet-containers/generic/ivy.xml @@ -68,10 +68,6 @@ <exclude org="javax.servlet"></exclude> <exclude type="pom" /> </dependency> - <dependency org="com.vaadin" name="vaadin-icons" rev="3.0.0" - conf="build->default"> - <exclude type="pom" /> - </dependency> <!-- For compiling TestingWidgetSet --> <dependency org="com.vaadin" name="vaadin-client-compiler" diff --git a/test/servlet-containers/generic/ivysettings.xml b/test/servlet-containers/generic/ivysettings.xml index 07f22ee125..f28250c3c1 100644 --- a/test/servlet-containers/generic/ivysettings.xml +++ b/test/servlet-containers/generic/ivysettings.xml @@ -71,8 +71,6 @@ resolver="vaadin-maven" /> <module organisation="com.vaadin" name="vaadin-uitest-common" resolver="vaadin-maven" /> - <module organisation="com.vaadin" name="vaadin-icons" - resolver="vaadin-maven" /> </modules> diff --git a/themes/pom.xml b/themes/pom.xml index 9181af2e21..93f0117869 100644 --- a/themes/pom.xml +++ b/themes/pom.xml @@ -72,9 +72,8 @@ <includeGroupIds>com.vaadin</includeGroupIds> <includeArtifactIds>vaadin-icons</includeArtifactIds> <excludeTransitive>true</excludeTransitive> - <includes>VAADIN\/addons\/vaadin-icons\/**</includes> + <includes>VAADIN/addons/vaadin-icons/fonts/*</includes> <overWrite>true</overWrite> - <outputDirectory>${project.basedir}/src/main/themes/</outputDirectory> </configuration> </execution> </executions> @@ -108,6 +107,25 @@ </resources> </configuration> </execution> + <execution> + <id>copy-font-files</id> + <phase>prepare-package</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${project.build.outputDirectory}/VAADIN/themes/valo/fonts/vaadin-icons</outputDirectory> + <resources> + <resource> + <directory>${project.build.directory}/dependency-unpack/VAADIN/addons/vaadin-icons/fonts/</directory> + <filtering>false</filtering> + <includes> + <include>Vaadin-Icons.*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> </executions> </plugin> diff --git a/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss b/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss index 9c45d6deda..63e5f66892 100644 --- a/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss +++ b/themes/src/main/themes/VAADIN/themes/valo/fonts/_fonts.scss @@ -4,7 +4,7 @@ @import "roboto/roboto"; @import "lato/lato"; @import "lora/lora"; -@import "../../../VAADIN/addons/vaadin-icons/vaadin-icons.scss"; +@import "vaadin-icons/vaadin-icons.scss"; /// Include VaadinIcons. They are included in Valo /// since Vaadin Framework version 8.0 (#7979) diff --git a/themes/src/main/themes/VAADIN/themes/valo/fonts/vaadin-icons/vaadin-icons.scss b/themes/src/main/themes/VAADIN/themes/valo/fonts/vaadin-icons/vaadin-icons.scss new file mode 100644 index 0000000000..f99c8f3dce --- /dev/null +++ b/themes/src/main/themes/VAADIN/themes/valo/fonts/vaadin-icons/vaadin-icons.scss @@ -0,0 +1,20 @@ +$vaadin-icons-pathPrefix: null; + +@if $v-relative-paths == false { + $vaadin-icons-pathPrefix: "../valo/fonts/vaadin-icons/"; +} + +@font-face { + font-family: 'Vaadin-Icons'; + src: url('#{$vaadin-icons-pathPrefix}Vaadin-Icons.eot'); + src: url('#{$vaadin-icons-pathPrefix}Vaadin-Icons.eot?#iefix') format('embedded-opentype'), + url('#{$vaadin-icons-pathPrefix}Vaadin-Icons.woff') format('woff'), + url('#{$vaadin-icons-pathPrefix}Vaadin-Icons.ttf') format('truetype'), + url('#{$vaadin-icons-pathPrefix}Vaadin-Icons.svg#icomoon') format('svg'); +} +.Vaadin-Icons { + font-family: 'Vaadin-Icons'; +} + +@mixin vaadin-icons { +}
\ No newline at end of file |