Skip to content

Commit d9a5baf

Browse files
committed
Removed GMD from dependency.
1 parent bc12511 commit d9a5baf

File tree

17 files changed

+251
-64
lines changed

17 files changed

+251
-64
lines changed

pom.xml

Lines changed: 210 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,53 @@
33
xmlns="http://maven.apache.org/POM/4.0.0"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55

6-
<parent>
7-
<groupId>com.github.gwtmaterialdesign</groupId>
8-
<artifactId>gwt-material-parent</artifactId>
9-
<version>2.2-SNAPSHOT</version>
10-
</parent>
11-
126
<modelVersion>4.0.0</modelVersion>
137

148
<groupId>com.github.gwtmaterialdesign</groupId>
15-
<artifactId>gwt-material-am4charts</artifactId>
16-
<version>1.0</version>
9+
<artifactId>gwt-material-amcharts</artifactId>
10+
<version>1.0-rc1</version>
1711
<packaging>gwt-lib</packaging>
1812

1913
<name>Gwt Material Am4charts</name>
2014

15+
<properties>
16+
<!-- Project properties -->
17+
<maven.compiler.source>1.8</maven.compiler.source>
18+
<maven.compiler.target>1.8</maven.compiler.target>
19+
<project.encoding>UTF-8</project.encoding>
20+
<tbroyer.version>1.0-rc-9</tbroyer.version>
21+
<gwt.version>2.8.2</gwt.version>
22+
<gmd.jquery.version>2.1.1</gmd.jquery.version>
23+
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
24+
</properties>
25+
26+
<scm>
27+
<connection>scm:git:[email protected]:GwtMaterialDesign/gwt-material.git</connection>
28+
<developerConnection>scm:git:[email protected]:GwtMaterialDesign/gwt-material.git</developerConnection>
29+
<url>http://github.com/GwtMaterialDesign/gwt-material</url>
30+
<tag>v2.1.1-SNAPSHOT</tag>
31+
</scm>
32+
33+
<licenses>
34+
<license>
35+
<name>Apache License Version 2</name>
36+
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
37+
</license>
38+
</licenses>
39+
40+
<distributionManagement>
41+
<snapshotRepository>
42+
<id>ossrh</id>
43+
<name>Sonatype Nexus snapshot repository</name>
44+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
45+
</snapshotRepository>
46+
<repository>
47+
<id>sonatype-nexus-staging</id>
48+
<name>Sonatype Nexus release repository</name>
49+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
50+
</repository>
51+
</distributionManagement>
52+
2153
<repositories>
2254
<repository>
2355
<id>central</id>
@@ -45,44 +77,36 @@
4577
</pluginRepository>
4678
</pluginRepositories>
4779

48-
<properties>
49-
<!-- Project properties -->
50-
<maven.compiler.source>1.8</maven.compiler.source>
51-
<maven.compiler.target>1.8</maven.compiler.target>
52-
<project.encoding>UTF-8</project.encoding>
53-
<tbroyer.version>1.0-rc-9</tbroyer.version>
54-
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
55-
</properties>
56-
57-
<distributionManagement>
58-
<snapshotRepository>
59-
<id>ossrh</id>
60-
<name>Sonatype Nexus snapshot repository</name>
61-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
62-
</snapshotRepository>
63-
<repository>
64-
<id>sonatype-nexus-staging</id>
65-
<name>Sonatype Nexus release repository</name>
66-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
67-
</repository>
68-
</distributionManagement>
80+
<dependencyManagement>
81+
<dependencies>
82+
<dependency>
83+
<groupId>com.google.gwt</groupId>
84+
<artifactId>gwt</artifactId>
85+
<version>${gwt.version}</version>
86+
<type>pom</type>
87+
<scope>import</scope>
88+
</dependency>
89+
</dependencies>
90+
</dependencyManagement>
6991

7092
<dependencies>
7193
<!-- GWT -->
7294
<dependency>
7395
<groupId>com.google.gwt</groupId>
7496
<artifactId>gwt-user</artifactId>
97+
<version>${gwt.version}</version>
7598
</dependency>
7699
<dependency>
77100
<groupId>com.google.gwt</groupId>
78101
<artifactId>gwt-dev</artifactId>
102+
<version>${gwt.version}</version>
79103
</dependency>
80104

81-
<!-- GwtMaterial -->
105+
<!-- GwtMaterial JQuery -->
82106
<dependency>
83107
<groupId>com.github.gwtmaterialdesign</groupId>
84-
<artifactId>gwt-material</artifactId>
85-
<version>${parent.version}</version>
108+
<artifactId>gwt-material-jquery</artifactId>
109+
<version>${gmd.jquery.version}</version>
86110
</dependency>
87111

88112
<!-- Testing -->
@@ -106,6 +130,35 @@
106130
</resources>
107131

108132
<plugins>
133+
<!-- License -->
134+
<plugin>
135+
<groupId>org.codehaus.mojo</groupId>
136+
<artifactId>license-maven-plugin</artifactId>
137+
<version>1.5</version>
138+
<configuration>
139+
<licenseName>apache_v2</licenseName>
140+
<inceptionYear>2015</inceptionYear>
141+
<organizationName>GwtMaterialDesign</organizationName>
142+
<projectName>GwtMaterial</projectName>
143+
<lineLength>19</lineLength>
144+
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
145+
<includes>
146+
<include>**/*.java</include>
147+
<include>**/*.xml</include>
148+
</includes>
149+
</configuration>
150+
<executions>
151+
<execution>
152+
<id>license</id>
153+
<phase>process-sources</phase>
154+
<goals>
155+
<goal>update-file-header</goal>
156+
</goals>
157+
</execution>
158+
</executions>
159+
</plugin>
160+
161+
<!-- Test - Surefire -->
109162
<plugin>
110163
<artifactId>maven-surefire-plugin</artifactId>
111164
<version>2.6</version>
@@ -122,6 +175,47 @@
122175
</configuration>
123176
</plugin>
124177

178+
<!-- Jar -->
179+
<plugin>
180+
<groupId>org.apache.maven.plugins</groupId>
181+
<artifactId>maven-jar-plugin</artifactId>
182+
<version>2.6</version>
183+
<executions>
184+
<execution>
185+
<id>Jar Package</id>
186+
<phase>package</phase>
187+
<goals>
188+
<goal>jar</goal>
189+
</goals>
190+
</execution>
191+
<execution>
192+
<id>Jar Tests Package</id>
193+
<phase>package</phase>
194+
<goals>
195+
<goal>test-jar</goal>
196+
</goals>
197+
</execution>
198+
</executions>
199+
</plugin>
200+
201+
<!-- Release -->
202+
<plugin>
203+
<groupId>org.apache.maven.plugins</groupId>
204+
<artifactId>maven-release-plugin</artifactId>
205+
<version>2.5.3</version>
206+
<configuration>
207+
<tagNameFormat>v@{project.version}</tagNameFormat>
208+
</configuration>
209+
</plugin>
210+
211+
<!-- GPG -->
212+
<plugin>
213+
<groupId>org.apache.maven.plugins</groupId>
214+
<artifactId>maven-gpg-plugin</artifactId>
215+
<version>1.6</version>
216+
</plugin>
217+
218+
<!-- GWT -->
125219
<plugin>
126220
<groupId>net.ltgt.gwt.maven</groupId>
127221
<artifactId>gwt-maven-plugin</artifactId>
@@ -171,5 +265,89 @@
171265
<artifactId>maven-source-plugin</artifactId>
172266
</plugin>
173267
</plugins>
268+
269+
<pluginManagement>
270+
<plugins>
271+
<plugin>
272+
<groupId>org.apache.maven.plugins</groupId>
273+
<artifactId>maven-source-plugin</artifactId>
274+
<version>2.3</version>
275+
<executions>
276+
<execution>
277+
<id>attach-sources</id>
278+
<goals>
279+
<goal>jar</goal>
280+
</goals>
281+
</execution>
282+
<execution>
283+
<id>attach-test-jar</id>
284+
<goals>
285+
<goal>test-jar</goal>
286+
</goals>
287+
</execution>
288+
</executions>
289+
</plugin>
290+
291+
<plugin>
292+
<groupId>org.apache.maven.plugins</groupId>
293+
<artifactId>maven-compiler-plugin</artifactId>
294+
<version>3.1</version>
295+
</plugin>
296+
297+
<plugin>
298+
<groupId>net.ltgt.gwt.maven</groupId>
299+
<artifactId>gwt-maven-plugin</artifactId>
300+
<version>${tbroyer.version}</version>
301+
<extensions>true</extensions>
302+
<inherited>false</inherited>
303+
</plugin>
304+
305+
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
306+
<plugin>
307+
<groupId>org.eclipse.m2e</groupId>
308+
<artifactId>lifecycle-mapping</artifactId>
309+
<version>1.0.0</version>
310+
<configuration>
311+
<lifecycleMappingMetadata>
312+
<pluginExecutions>
313+
<pluginExecution>
314+
<pluginExecutionFilter>
315+
<groupId>org.codehaus.mojo</groupId>
316+
<artifactId>
317+
gwt-maven-plugin
318+
</artifactId>
319+
<versionRange>
320+
[2.7.0,)
321+
</versionRange>
322+
<goals>
323+
<goal>resources</goal>
324+
<goal>compile</goal>
325+
</goals>
326+
</pluginExecutionFilter>
327+
<action>
328+
<ignore/>
329+
</action>
330+
</pluginExecution>
331+
<pluginExecution>
332+
<pluginExecutionFilter>
333+
<groupId>org.codehaus.mojo</groupId>
334+
<artifactId>
335+
license-maven-plugin
336+
</artifactId>
337+
<versionRange>[1.5,)</versionRange>
338+
<goals>
339+
<goal>update-file-header</goal>
340+
</goals>
341+
</pluginExecutionFilter>
342+
<action>
343+
<ignore/>
344+
</action>
345+
</pluginExecution>
346+
</pluginExecutions>
347+
</lifecycleMappingMetadata>
348+
</configuration>
349+
</plugin>
350+
</plugins>
351+
</pluginManagement>
174352
</build>
175353
</project>

src/main/java/gwt/material/design/amcharts/client/GwtMaterialAmCharts.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
import com.google.gwt.core.client.EntryPoint;
2323
import gwt.material.design.amcharts.client.resources.ChartClientBundle;
24-
import gwt.material.design.client.MaterialDesignBase;
24+
import gwt.material.design.amcore.client.GwtMaterialAmCore;
2525

2626
public class GwtMaterialAmCharts implements EntryPoint {
2727

2828
@Override
2929
public void onModuleLoad() {
3030
// Inject Am4chart resources
31-
MaterialDesignBase.injectJs(ChartClientBundle.INSTANCE.chartsJs());
31+
GwtMaterialAmCore.injectJs(ChartClientBundle.INSTANCE.chartsJs());
3232
}
3333
}

src/main/java/gwt/material/design/amcore/client/Am4Core.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import gwt.material.design.amcore.client.properties.Ease;
2929
import gwt.material.design.amcore.client.theme.ChartTheme;
3030
import gwt.material.design.amcore.client.ui.*;
31-
import gwt.material.design.client.MaterialDesign;
3231
import jsinterop.annotations.*;
3332

3433
@JsType(isNative = true, name = "am4core", namespace = JsPackage.GLOBAL)
@@ -101,6 +100,6 @@ public final static void unuseTheme(ChartTheme theme) {
101100

102101
@JsOverlay
103102
public final static void addLanguage(Locale locale) {
104-
MaterialDesign.injectJs(locale.getResource());
103+
GwtMaterialAmCore.injectJs(locale.getResource());
105104
}
106105
}

src/main/java/gwt/material/design/amcore/client/GwtMaterialAmCore.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,30 @@
2020
package gwt.material.design.amcore.client;
2121

2222
import com.google.gwt.core.client.EntryPoint;
23+
import com.google.gwt.core.client.ScriptInjector;
24+
import com.google.gwt.resources.client.TextResource;
2325
import gwt.material.design.amcore.client.resources.CoreClientBundle;
24-
import gwt.material.design.client.MaterialDesignBase;
2526

2627
public class GwtMaterialAmCore implements EntryPoint {
2728

2829
@Override
2930
public void onModuleLoad() {
3031
// Inject Am4chart resources
31-
MaterialDesignBase.injectJs(CoreClientBundle.INSTANCE.coreJs());
32+
injectJs(CoreClientBundle.INSTANCE.coreJs());
33+
}
34+
35+
public static void injectJs(TextResource resource) {
36+
directInjectJs(resource, true, false);
37+
}
38+
39+
protected static void directInjectJs(TextResource resource, boolean removeTag, boolean sourceUrl) {
40+
String text = resource.getText() + (sourceUrl ?
41+
"//# sourceURL=" + resource.getName() + ".js" : "");
42+
43+
// Inject the script resource
44+
ScriptInjector.fromString(text)
45+
.setWindow(ScriptInjector.TOP_WINDOW)
46+
.setRemoveTag(removeTag)
47+
.inject();
3248
}
3349
}

src/main/java/gwt/material/design/amcore/client/theme/AnimatedTheme.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
*/
2020
package gwt.material.design.amcore.client.theme;
2121

22-
import gwt.material.design.amcore.client.resources.CoreClientBundle;
22+
import gwt.material.design.amcore.client.GwtMaterialAmCore;
2323
import gwt.material.design.amcore.client.resources.ThemeClientBundle;
24-
import gwt.material.design.client.MaterialDesignBase;
2524

2625
import static gwt.material.design.jquery.client.api.JQuery.window;
2726

2827
public class AnimatedTheme implements ChartTheme {
2928

3029
@Override
3130
public void loadResource() {
32-
MaterialDesignBase.injectJs(ThemeClientBundle.INSTANCE.animatedJs());
31+
GwtMaterialAmCore.injectJs(ThemeClientBundle.INSTANCE.animatedJs());
3332
}
3433

3534
public Object get() {

0 commit comments

Comments
 (0)