Skip to content

Commit edc85c1

Browse files
Pawel Kruszewskiktor
authored andcommitted
* updated some javadoc
* upped project libs and plugins * fixed few code smells
1 parent 60a1bb0 commit edc85c1

26 files changed

+324
-275
lines changed

db-setup-core/pom.xml

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55

66
<groupId>com.mimacom.liferay</groupId>
7-
<version>1.0.0</version>
7+
<version>1.0.1</version>
88
<artifactId>db-setup-core</artifactId>
99
<name>Liferay Portal DB Setup core</name>
1010
<description>Library that allows to declare a set of Liferay data to be created and create them using the API.
@@ -13,12 +13,21 @@
1313

1414
<packaging>jar</packaging>
1515

16+
<properties>
17+
<jaxb2.plugin.version>2.2</jaxb2.plugin.version>
18+
<java.version>1.7</java.version>
19+
<license.plugin.version>1.13</license.plugin.version>
20+
<resource.plugin.version>3.0.2</resource.plugin.version>
21+
<liferay.ce.version>6.2.5</liferay.ce.version>
22+
<source.plugin.version>3.0.1</source.plugin.version>
23+
<javadoc.plugin.version>2.10.4</javadoc.plugin.version>
24+
</properties>
1625
<build>
1726
<plugins>
1827
<plugin>
1928
<groupId>org.codehaus.mojo</groupId>
2029
<artifactId>jaxb2-maven-plugin</artifactId>
21-
<version>1.5</version>
30+
<version>${jaxb2.plugin.version}</version>
2231
<executions>
2332
<execution>
2433
<id>xjc</id>
@@ -29,7 +38,9 @@
2938
</executions>
3039
<configuration>
3140
<outputDirectory>${project.build.directory}/generated-sources/sources</outputDirectory>
32-
<schemaDirectory>${basedir}/src/main/resources</schemaDirectory>
41+
<sources>
42+
<source>${basedir}/src/main/resources/setup_definition-1.0.xsd</source>
43+
</sources>
3344
<packageName>com.mimacom.liferay.portal.setup.domain</packageName>
3445
<clearOutputDir>false</clearOutputDir>
3546
</configuration>
@@ -40,19 +51,20 @@
4051
<version>2.5</version>
4152
<configuration>
4253
<encoding>UTF-8</encoding>
43-
<source>1.7</source>
44-
<target>1.7</target>
54+
<source>${java.version}</source>
55+
<target>${java.version}</target>
4556
</configuration>
4657
</plugin>
4758

4859
<plugin>
4960
<groupId>org.codehaus.mojo</groupId>
5061
<artifactId>license-maven-plugin</artifactId>
51-
<version>1.8</version>
62+
<version>${license.plugin.version}</version>
5263
<configuration>
5364
<outputDirectory>${project.build.directory}/generated-sources/license</outputDirectory>
5465
<thirdPartyFilename>THIRD-PARTY.txt</thirdPartyFilename>
5566
<licenseName>mit</licenseName>
67+
<encoding>UTF-8</encoding>
5668
<excludes>
5769
<exclude>**/package-info.java</exclude>
5870
</excludes>
@@ -74,19 +86,40 @@
7486
<plugin>
7587
<groupId>org.apache.maven.plugins</groupId>
7688
<artifactId>maven-resources-plugin</artifactId>
77-
<version>2.6</version>
89+
<version>${resource.plugin.version}</version>
7890
<configuration>
7991
<encoding>UTF-8</encoding>
8092
</configuration>
8193
</plugin>
8294
<plugin>
8395
<groupId>org.apache.maven.plugins</groupId>
8496
<artifactId>maven-javadoc-plugin</artifactId>
85-
<version>2.9.1</version>
97+
<version>${javadoc.plugin.version}</version>
8698
<configuration>
8799
<charset>UTF-8</charset>
88100
<encoding>UTF-8</encoding>
89101
</configuration>
102+
<executions>
103+
<execution>
104+
<id>attach-javadocs</id>
105+
<goals>
106+
<goal>jar</goal>
107+
</goals>
108+
</execution>
109+
</executions>
110+
</plugin>
111+
<plugin>
112+
<groupId>org.apache.maven.plugins</groupId>
113+
<artifactId>maven-source-plugin</artifactId>
114+
<version>${source.plugin.version}</version>
115+
<executions>
116+
<execution>
117+
<id>attach-sources</id>
118+
<goals>
119+
<goal>jar</goal>
120+
</goals>
121+
</execution>
122+
</executions>
90123
</plugin>
91124
</plugins>
92125
</build>
@@ -95,7 +128,7 @@
95128
<dependency>
96129
<groupId>com.liferay.portal</groupId>
97130
<artifactId>portal-service</artifactId>
98-
<version>6.2.5</version>
131+
<version>${liferay.ce.version}</version>
99132
<scope>provided</scope>
100133
</dependency>
101134
<dependency>
@@ -124,7 +157,9 @@
124157
</dependency>
125158
</dependencies>
126159
<scm>
127-
<url>https://github.com/mimacom/liferay-db-setup-core</url>
160+
<connection>scm:git:git://github.com/mimacom/liferay-db-setup-core.git</connection>
161+
<developerConnection>scm:git:ssh://github.com:mimacom/liferay-db-setup-core.git</developerConnection>
162+
<url>https://github.com/mimacom/liferay-db-setup-core/tree/1.x</url>
128163
</scm>
129164
<organization>
130165
<name>mimacom ag</name>
@@ -139,4 +174,12 @@
139174
<comments>A business-friendly OSS license</comments>
140175
</license>
141176
</licenses>
177+
<developers>
178+
<developer>
179+
<name>Pawel Kruszewski</name>
180+
<email>pawel.kruszewski@mimacom.com</email>
181+
<organization>mimacom</organization>
182+
<organizationUrl>http://www.mimacom.com</organizationUrl>
183+
</developer>
184+
</developers>
142185
</project>

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/BasicSetupUpgradeProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/LiferaySetup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/MarshallUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/SetupUpgradeProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/core/SetupArticles.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal
@@ -517,7 +517,7 @@ public static void processRelatedAssets(final Article article, final JournalArti
517517
try {
518518
id = Long.parseLong(clazzPrimKey);
519519
} catch (Exception ex) {
520-
ex.printStackTrace();
520+
LOG.error(ex);
521521
}
522522

523523
try {

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/core/SetupCategorization.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* #%L
33
* Liferay Portal DB Setup core
44
* %%
5-
* Copyright (C) 2016 mimacom ag
5+
* Copyright (C) 2016 - 2017 mimacom ag
66
* %%
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -50,7 +50,7 @@
5050
* Setup module for creating / updating the categorization. So far it creates
5151
* tree of categories. In the future also AssetTag creation feature should be
5252
* here.
53-
* <p/>
53+
* <p>
5454
* Created by guno on 8. 6. 2015.
5555
*/
5656
public final class SetupCategorization {

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/core/SetupCustomFields.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/core/SetupDocumentFolders.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal

db-setup-core/src/main/java/com/mimacom/liferay/portal/setup/core/SetupDocuments.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* #%L
55
* Liferay Portal DB Setup core
66
* %%
7-
* Copyright (C) 2016 mimacom ag
7+
* Copyright (C) 2016 - 2017 mimacom ag
88
* %%
99
* Permission is hereby granted, free of charge, to any person obtaining a copy
1010
* of this software and associated documentation files (the "Software"), to deal
@@ -129,12 +129,12 @@ public static byte[] getDocumentContent(final String filesystemPath) {
129129
}
130130
content = baos.toByteArray();
131131
} catch (IOException e) {
132-
e.printStackTrace();
132+
LOG.error(e);
133133
} finally {
134134
try {
135135
is.close();
136136
} catch (IOException e) {
137-
e.printStackTrace();
137+
LOG.error(e);
138138
}
139139
}
140140
} else {

0 commit comments

Comments
 (0)