The Unified and Autonomous Development Platform
Make GitPlex able to compile via Maven
robin shinebcd4a16ae4fe
diff --git a/commons.jsw/wrapper/wrapper-delta-pack-st.zip b/commons.jsw/wrapper/wrapper-delta-pack-st.zipindex cce86e5bbb..2256aea6d5 100644Binary files a/commons.jsw/wrapper/wrapper-delta-pack-st.zip and b/commons.jsw/wrapper/wrapper-delta-pack-st.zip differdiff --git a/gitplex.core/src/main/java/com/pmease/gitplex/core/CoreModule.java b/gitplex.core/src/main/java/com/pmease/gitplex/core/CoreModule.javaindex ea7c214ab2..322c44df6f 100644--- a/gitplex.core/src/main/java/com/pmease/gitplex/core/CoreModule.java+++ b/gitplex.core/src/main/java/com/pmease/gitplex/core/CoreModule.java@@ -37,9 +37,11 @@ import com.pmease.gitplex.core.manager.DataManager;import com.pmease.gitplex.core.manager.DepotManager;import com.pmease.gitplex.core.manager.MailManager;import com.pmease.gitplex.core.manager.OrganizationMembershipManager;+import com.pmease.gitplex.core.manager.PullRequestActivityManager;import com.pmease.gitplex.core.manager.NotificationManager;import com.pmease.gitplex.core.manager.PullRequestManager;import com.pmease.gitplex.core.manager.PullRequestUpdateManager;+import com.pmease.gitplex.core.manager.PullRequestVisitManager;import com.pmease.gitplex.core.manager.PullRequestWatchManager;import com.pmease.gitplex.core.manager.ReviewInvitationManager;import com.pmease.gitplex.core.manager.ReviewManager;@@ -61,9 +63,11 @@ import com.pmease.gitplex.core.manager.impl.DefaultDataManager;import com.pmease.gitplex.core.manager.impl.DefaultDepotManager;import com.pmease.gitplex.core.manager.impl.DefaultMailManager;import com.pmease.gitplex.core.manager.impl.DefaultOrganizationMembershipManager;+import com.pmease.gitplex.core.manager.impl.DefaultPullRequestActivityManager;import com.pmease.gitplex.core.manager.impl.DefaultNotificationManager;import com.pmease.gitplex.core.manager.impl.DefaultPullRequestManager;import com.pmease.gitplex.core.manager.impl.DefaultPullRequestUpdateManager;+import com.pmease.gitplex.core.manager.impl.DefaultPullRequestVisitManager;import com.pmease.gitplex.core.manager.impl.DefaultPullRequestWatchManager;import com.pmease.gitplex.core.manager.impl.DefaultReviewInvitationManager;import com.pmease.gitplex.core.manager.impl.DefaultReviewManager;@@ -174,6 +178,8 @@ public class CoreModule extends AbstractPluginModule {bind(TeamMembershipManager.class).to(DefaultTeamMembershipManager.class);bind(TeamAuthorizationManager.class).to(DefaultTeamAuthorizationManager.class);bind(UserAuthorizationManager.class).to(DefaultUserAuthorizationManager.class);+ bind(PullRequestActivityManager.class).to(DefaultPullRequestActivityManager.class);+ bind(PullRequestVisitManager.class).to(DefaultPullRequestVisitManager.class);bind(AbstractRealm.class).to(SecurityRealm.class);diff --git a/gitplex.core/src/test/java/com/pmease/gitplex/core/model/PullRequestTest.java b/gitplex.core/src/test/java/com/pmease/gitplex/core/model/PullRequestTest.javaindex 513de3ff0a..6c4ab180c1 100644--- a/gitplex.core/src/test/java/com/pmease/gitplex/core/model/PullRequestTest.java+++ b/gitplex.core/src/test/java/com/pmease/gitplex/core/model/PullRequestTest.java@@ -1,6 +1,12 @@package com.pmease.gitplex.core.model;+import java.io.IOException;+import org.eclipse.jgit.lib.ObjectId;+import org.eclipse.jgit.lib.Repository;+import org.eclipse.jgit.lib.RepositoryCache;+import org.eclipse.jgit.lib.RepositoryCache.FileKey;+import org.eclipse.jgit.util.FS;import org.junit.Assert;import org.junit.Test;@@ -26,6 +32,15 @@ public class PullRequestTest extends AbstractGitTest {public Git git() {return git;}++ @Override+ public Repository getRepository() {+ try {+ return RepositoryCache.open(FileKey.lenient(git.depotDir(), FS.DETECTED));+ } catch (IOException e) {+ throw new RuntimeException(e);+ }+ }};}diff --git a/gitplex.product/src/test/java/gitplex/product/Test.java b/gitplex.product/src/test/java/gitplex/product/Test.javaindex 0ecd7167e2..9a8cb04e3b 100644--- a/gitplex.product/src/test/java/gitplex/product/Test.java+++ b/gitplex.product/src/test/java/gitplex/product/Test.java@@ -1,12 +1,8 @@package gitplex.product;-import java.util.concurrent.SynchronousQueue;-public class Test {@org.junit.Testpublic void test() throws InterruptedException {- SynchronousQueue<String> queue = new SynchronousQueue<>();- queue.take();}}\ No newline at end of filediff --git a/gitplex.product/system/conf/wrapper-license.conf b/gitplex.product/system/conf/wrapper-license.confindex e552b352b7..156b02cfae 100644--- a/gitplex.product/system/conf/wrapper-license.conf+++ b/gitplex.product/system/conf/wrapper-license.conf@@ -1,12 +1,13 @@#encoding=UTF-8wrapper.license.type=DEV-wrapper.license.id=201203210024+wrapper.license.id=201605010000004wrapper.license.licensee=PMEase Inc.-wrapper.license.dev_application=PMEase Product+wrapper.license.group=PMEase+wrapper.license.dev_application=GitPlexwrapper.license.features=64bitwrapper.license.upgrade_term.begin_date=2009-04-26-wrapper.license.upgrade_term.end_date=2013-04-26-wrapper.license.key.1=f5d4-c513-5191-7543-wrapper.license.key.2=132a-97be-3406-1ba8-wrapper.license.key.3=bb44-384e-3349-4bb6-wrapper.license.key.4=a55b-790c-fb5a-1c2b\ No newline at end of file+wrapper.license.upgrade_term.end_date=2017-04-26+wrapper.license.key.1=df3a-619f-7b1c-c40b+wrapper.license.key.2=3545-97b7-fea2-db0c+wrapper.license.key.3=f564-b571-fb0c-db7b+wrapper.license.key.4=fa44-5100-8ae5-9e8f\ No newline at end of filediff --git a/parent.general/pom.xml b/parent.general/pom.xmlindex e042b882c0..33e356b90d 100644--- a/parent.general/pom.xml+++ b/parent.general/pom.xml@@ -77,6 +77,7 @@<goal>generate-plugin-resources</goal><goal>generate-product-resources</goal><goal>create-product-sandbox</goal>+ <goal>copy-antlr-tokens</goal><goal>run-ant</goal></goals></pluginExecutionFilter>@@ -178,6 +179,13 @@<goal>check-project-dependencies</goal></goals></execution>+ <execution>+ <id>copy-antlr-tokens</id>+ <phase>compile</phase>+ <goals>+ <goal>copy-antlr-tokens</goal>+ </goals>+ </execution><execution><id>generate-artifact-descriptor</id><phase>compile</phase>diff --git a/plugin.maven/src/main/java/com/pmease/plugin/maven/CopyAntlrTokensMojo.java b/plugin.maven/src/main/java/com/pmease/plugin/maven/CopyAntlrTokensMojo.javanew file mode 100644index 0000000000..91dcb2ccc0--- /dev/null+++ b/plugin.maven/src/main/java/com/pmease/plugin/maven/CopyAntlrTokensMojo.java@@ -0,0 +1,47 @@+package com.pmease.plugin.maven;++import java.io.File;+import java.io.IOException;++import org.apache.maven.plugin.AbstractMojo;+import org.apache.maven.plugin.MojoExecutionException;+import org.apache.maven.plugin.MojoFailureException;+import org.apache.maven.project.MavenProject;+import org.codehaus.plexus.util.FileUtils;++/**+ * @goal copy-antlr-tokens+ * @requiresDependencyResolution compile+runtime+ */+public class CopyAntlrTokensMojo extends AbstractMojo {++ /**+ * @parameter default-value="${project}"+ * @required+ * @readonly+ */+ private MavenProject project;++ public void execute() throws MojoExecutionException, MojoFailureException {+ PluginUtils.checkResolvedArtifacts(project, true);++ File outputDir = new File(project.getBuild().getOutputDirectory());++ if (!outputDir.exists())+ outputDir.mkdirs();++ File antlr4Dir = new File(project.getBasedir(), "target/generated-sources/antlr4");+ if (antlr4Dir.exists()) {+ for (File file: antlr4Dir.listFiles()) {+ if (file.getName().endsWith(".tokens")) {+ try {+ FileUtils.copyFileToDirectory(file, outputDir);+ } catch (IOException e) {+ throw new RuntimeException(e);+ }+ }+ }+ }+ }++}