Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
April 2014
- 8 participants
- 31 discussions
05 May '14
See <http://ci.chorem.org/jenkins/job/pollen-nightly/14/changes>
Changes:
[Tony CHEMIT] pass ChoiceType to Choice, no more to Poll + add Rest Doc action + begin to add Rest API tests
[Tony CHEMIT] fix ui-angular war deploy
[Tony CHEMIT] make ui-angular war
[Tony CHEMIT] simplify rest-api starting + add some conf
[Tony CHEMIT] simplify rest-api starting + add some conf
[Tony CHEMIT] use specific configuration files (pollen-services.properties, pollen-rest-api.properties to avoid any collision with existing config)
------------------------------------------
[...truncated 2060 lines...]
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[INFO] Load missing file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] Missing file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…> is up-to-date.
[INFO] Writing third-party file to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] Will attach third party file from <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ pollen-rest-api ---
[WARNING] Invalid POM for org.antlr:stringtemplate:jar:3.2.1, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] collected 2 i18n artifacts for locale fr_FR stored in <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] collected 2 i18n artifacts for locale en_GB stored in <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api ---
[WARNING] bundle fr_FR contains 11/51 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 11/51 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- license-maven-plugin:1.6:update-file-header (update-file-header) @ pollen-rest-api ---
[INFO] Will search files to update from root <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/src>
[INFO] Will search files to update from root <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] Scan 31 files header done in 307.893ms.
[INFO]
* uptodate header on 25 files.
* add header on 6 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pollen-rest-api ---
[INFO] Compiling 17 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>:[221,35] getNullValue(java.lang.Class<?>) in org.nuiton.util.ObjectUtil has been deprecated
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.10:check (default) @ pollen-rest-api ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.8.1:generate-changes (jredmine-generate-changes) @ pollen-rest-api ---
[INFO] Skipping goal (skipGenerateChanges flag is on).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ pollen-rest-api ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pollen-rest-api ---
[INFO] Compiling 5 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ pollen-rest-api ---
[INFO] Surefire report directory: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.chorem.pollen.rest.api.PollServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.017 sec - in org.chorem.pollen.rest.api.PollServiceTest
Running org.chorem.pollen.rest.api.PollenUserServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in org.chorem.pollen.rest.api.PollenUserServiceTest
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) @ pollen-rest-api ---
[INFO] Packaging webapp
[INFO] Assembling webapp [pollen-rest-api] in [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…]>
[INFO] Processing war project
[INFO] Copying webapp webResources [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…]> to [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…]>
[INFO] Copying webapp resources [<http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/sr…]>
[INFO] Webapp assembled in [173 msecs]
[INFO] Building war: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ pollen-rest-api ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/pollen-rest-api/ta…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ pollen-rest-api ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ pollen-rest-api ---
[INFO] Loaded <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect-art…>
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT.war to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO] Copying THIRD-PARTY.properties to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-sources.jar to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-javadoc.jar to <http://ci.chorem.org/jenkins/job/pollen-nightly/ws/trunk/target/collect/org…>
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ pollen-rest-api ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ pollen-rest-api ---
[INFO] Used declared dependencies found:
[INFO] org.chorem.pollen:pollen-persistence:jar:2.0-SNAPSHOT:compile
[INFO] org.chorem.pollen:pollen-services:jar:2.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.hibernate:hibernate-core:jar:4.3.5.Final:runtime
[INFO] org.debux.webmotion:webmotion:jar:2.4:compile
[INFO] org.debux.webmotion:webmotion-unittest:jar:2.4:test
[INFO] org.nuiton.web:nuiton-web:jar:1.16:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] javax:javaee-api:jar:7.0:provided
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] commons-beanutils:commons-beanutils:jar:1.9.1:compile
[INFO] org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] org.apache.httpcomponents:fluent-hc:jar:4.2.3:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] com.google.code.gson:gson:jar:2.2.4:compile
[INFO] junit:junit:jar:4.11:test
[INFO] org.nuiton:nuiton-utils:jar:2.7.1:compile
[INFO] com.h2database:h2:jar:1.3.173:runtime
[INFO] log4j:log4j:jar:1.2.17:compile
[WARNING] Used undeclared dependencies found:
[WARNING] commons-io:commons-io:jar:2.4:compile
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Pollen ............................................ SUCCESS [ 31.464 s]
[INFO] Pollen :: VoteCounting (Api) ...................... SUCCESS [ 14.422 s]
[INFO] Pollen :: VoteCounting :: Normal .................. SUCCESS [ 4.297 s]
[INFO] Pollen :: VoteCounting :: Percentage .............. SUCCESS [ 4.422 s]
[INFO] Pollen :: VoteCounting :: Condorcet ............... SUCCESS [ 4.401 s]
[INFO] Pollen :: VoteCounting :: Number .................. SUCCESS [ 4.010 s]
[INFO] Pollen :: VoteCounting :: Borda ................... SUCCESS [ 4.042 s]
[INFO] Pollen :: VoteCounting :: Instant Runoff .......... SUCCESS [ 3.991 s]
[INFO] Pollen :: VoteCounting :: Coombs .................. SUCCESS [ 3.981 s]
[INFO] Pollen :: VoteCounting (Aggregator) ............... SUCCESS [ 1.449 s]
[INFO] Pollen :: Persistence ............................. SUCCESS [ 22.241 s]
[INFO] Pollen :: Service ................................. SUCCESS [ 16.597 s]
[INFO] Pollen :: Rest Api ................................ FAILURE [ 13.179 s]
[INFO] Pollen :: UI (CanJS) .............................. SKIPPED
[INFO] Pollen :: UI (Angular) ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:12 min
[INFO] Finished at: 2014-04-30T01:03:08+01:00
[INFO] Final Memory: 88M/294M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze-only (analyze) on project pollen-rest-api: Dependency problems found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze-only (analyze) on project pollen-rest-api: Dependency problems found
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems found
at org.apache.maven.plugin.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:188)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :pollen-rest-api
Sending e-mails to: pollen-commits(a)list.chorem.org chemit+chorem-ci(a)codelutin.com
channel stopped
Skipping sonar analysis due to bad build status FAILURE
1
4
See <http://ci.chorem.org/jenkins/job/pollen-ci/22/changes>
Changes:
[Tony CHEMIT] debug poll create + fix voteCounting id
------------------------------------------
[...truncated 953 lines...]
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:05 INFO (FixturesService.java:72) will restore database with fixture set
06:23:05 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:05 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:05 INFO (FixturesService.java:72) will restore database with fixture set
06:23:05 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:05 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:06 INFO (FixturesService.java:72) will restore database with fixture set
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.106 sec - in org.chorem.pollen.service.PollServiceTest
Running org.chorem.pollen.service.PollenUserServiceTest
06:23:06 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:06 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:06 INFO (FixturesService.java:72) will restore database with fixture set
06:23:06 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:06 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:06 INFO (FixturesService.java:72) will restore database with fixture set
06:23:06 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:06 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:07 INFO (FixturesService.java:72) will restore database with fixture set
06:23:07 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:07 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:07 INFO (FixturesService.java:72) will restore database with fixture set
06:23:07 DEBUG (PollenApplication.java:85) testBasedir: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
06:23:07 INFO (PollenServiceConfig.java:87) Pollen configuration:
Filename: pollen-services.properties
pollen.data.directory = <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
pollen.default.pollType = FREE
pollen.default.voteCountingType = 1
pollen.default.pollVoteVisibility = EVERYBODY
pollen.default.pollCommentVisibility = EVERYBODY
pollen.smtp.host =
pollen.smtp.port = 25
pollen.smtp.from =
pollen.devMode = true
logConfigurationFile = null
06:23:07 INFO (FixturesService.java:72) will restore database with fixture set
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.78 sec - in org.chorem.pollen.service.PollenUserServiceTest
Results :
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ pollen-services ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-ci/ws/trunk/pollen-services/target/…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-services ---
[JENKINS] Archiving disabled
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Pollen :: Rest Api 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[WARNING] The POM for org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT is missing, no dependency information available
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[WARNING] The POM for org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT is missing, no dependency information available
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Pollen ............................................ SUCCESS [ 1.557 s]
[INFO] Pollen :: VoteCounting (Api) ...................... SUCCESS [ 5.567 s]
[INFO] Pollen :: VoteCounting :: Normal .................. SUCCESS [ 1.364 s]
[INFO] Pollen :: VoteCounting :: Percentage .............. SUCCESS [ 1.257 s]
[INFO] Pollen :: VoteCounting :: Condorcet ............... SUCCESS [ 1.247 s]
[INFO] Pollen :: VoteCounting :: Number .................. SUCCESS [ 1.127 s]
[INFO] Pollen :: VoteCounting :: Borda ................... SUCCESS [ 1.198 s]
[INFO] Pollen :: VoteCounting :: Instant Runoff .......... SUCCESS [ 1.163 s]
[INFO] Pollen :: VoteCounting :: Coombs .................. SUCCESS [ 1.137 s]
[INFO] Pollen :: VoteCounting (Aggregator) ............... SUCCESS [ 0.239 s]
[INFO] Pollen :: Persistence ............................. SUCCESS [ 6.313 s]
[INFO] Pollen :: Service ................................. SUCCESS [ 6.898 s]
[INFO] Pollen :: Rest Api ................................ FAILURE [ 2.177 s]
[INFO] Pollen :: UI (CanJS) .............................. SKIPPED
[INFO] Pollen :: UI (Angular) ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 33.798 s
[INFO] Finished at: 2014-04-30T18:23:11+01:00
[INFO] Final Memory: 53M/407M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project pollen-rest-api: Could not resolve dependencies for project org.chorem.pollen:pollen-rest-api:war:2.0-SNAPSHOT: The following artifacts could not be resolved: org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT, org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT: Could not find artifact org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project pollen-rest-api: Could not resolve dependencies for project org.chorem.pollen:pollen-rest-api:war:2.0-SNAPSHOT: The following artifacts could not be resolved: org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT, org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT: Could not find artifact org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project org.chorem.pollen:pollen-rest-api:war:2.0-SNAPSHOT: The following artifacts could not be resolved: org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT, org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT: Could not find artifact org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 33 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT, org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT: Could not find artifact org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:192)
... 34 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT, org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT: Could not find artifact org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 35 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT in snapshots (http://nexus.nuiton.org/nexus/content/repositories/snapshots)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1012)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$6.wrap(WagonRepositoryConnector.java:1004)
at org.eclipse.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:725)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
... 3 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExcept…
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :pollen-rest-api
Sending e-mails to: pollen-commits(a)list.chorem.org chemit+chorem-ci(a)codelutin.com
channel stopped
1
1
Build failed in Jenkins: pollen-ci » Pollen :: Rest Api #22
by admin+ci-chorem.org@codelutin.com 02 May '14
by admin+ci-chorem.org@codelutin.com 02 May '14
02 May '14
See <http://ci.chorem.org/jenkins/job/pollen-ci/org.chorem.pollen$pollen-rest-ap…>
Changes:
[Tony CHEMIT] debug poll create + fix voteCounting id
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Pollen :: Rest Api 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[WARNING] The POM for org.debux.webmotion:webmotion:jar:2.5-SNAPSHOT is missing, no dependency information available
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[WARNING] The POM for org.debux.webmotion:webmotion-unittest:jar:2.5-SNAPSHOT is missing, no dependency information available
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/repositories/snapshots/org/debux/webm…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[INFO] Downloading: http://nexus.nuiton.org/nexus/content/groups/pollen-group/org/debux/webmoti…
[JENKINS] Archiving disabled
1
1
Build failed in Jenkins: pollen-nightly » Pollen :: Rest Api #14
by admin+ci-chorem.org@codelutin.com 30 Apr '14
by admin+ci-chorem.org@codelutin.com 30 Apr '14
30 Apr '14
See <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
Changes:
[Tony CHEMIT] pass ChoiceType to Choice, no more to Poll + add Rest Doc action + begin to add Rest API tests
[Tony CHEMIT] fix ui-angular war deploy
[Tony CHEMIT] simplify rest-api starting + add some conf
[Tony CHEMIT] simplify rest-api starting + add some conf
[Tony CHEMIT] use specific configuration files (pollen-services.properties, pollen-rest-api.properties to avoid any collision with existing config)
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Pollen :: Rest Api 2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.antlr:stringtemplate:jar:3.2.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ pollen-rest-api ---
[INFO] Deleting <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ pollen-rest-api ---
[INFO] Exporting server [redmine-forge.chorem.org] privateKey in ${redmine.apiKey}
[INFO]
[INFO] --- license-maven-plugin:1.6:update-project-license (attach-licenses) @ pollen-rest-api ---
[INFO] Will create or update license file [agpl_v3] to <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- license-maven-plugin:1.6:add-third-party (attach-licenses) @ pollen-rest-api ---
[WARNING] Unable to obtain POM for artifact : org.antlr:stringtemplate:jar:3.2.1:compile
org.apache.maven.project.InvalidProjectModelException: 1 problem was encountered while building the effective model
[FATAL] Non-readable POM /var/local/forge/data/chorem.org/maven/repository/org/antlr/stringtemplate/3.2.1/stringtemplate-3.2.1.pom: input contained no data @
for project for project
at org.apache.maven.project.DefaultMavenProjectBuilder.transformError(DefaultMavenProjectBuilder.java:193)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:240)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.codehaus.mojo.license.api.DefaultDependenciesTool.loadProjectDependencies(DefaultDependenciesTool.java:206)
at org.codehaus.mojo.license.api.DefaultThirdPartyHelper.loadDependencies(DefaultThirdPartyHelper.java:152)
at org.codehaus.mojo.license.AddThirdPartyMojo.loadDependencies(AddThirdPartyMojo.java:288)
at org.codehaus.mojo.license.AbstractAddThirdPartyMojo.init(AbstractAddThirdPartyMojo.java:386)
at org.codehaus.mojo.license.AbstractLicenseMojo.execute(AbstractLicenseMojo.java:174)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
[INFO] Load missing file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] Missing file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…> is up-to-date.
[INFO] Writing third-party file to <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] Will attach third party file from <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:collect-i18n-artifacts (collect-i18n-artifacts) @ pollen-rest-api ---
[WARNING] Invalid POM for org.antlr:stringtemplate:jar:3.2.1, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] collected 2 i18n artifacts for locale fr_FR stored in <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] collected 2 i18n artifacts for locale en_GB stored in <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:bundle (default) @ pollen-rest-api ---
[WARNING] bundle fr_FR contains 11/51 empty entries! (use -Di18n.showEmpty to see these entries)
[WARNING] bundle en_GB contains 11/51 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Copying 2 resources
[INFO] Copying 3 resources
[INFO]
[INFO] --- license-maven-plugin:1.6:update-file-header (update-file-header) @ pollen-rest-api ---
[INFO] Will search files to update from root <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] Will search files to update from root <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] - adding license header on file <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] Scan 31 files header done in 307.893ms.
[INFO]
* uptodate header on 25 files.
* add header on 6 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ pollen-rest-api ---
[INFO] Compiling 17 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>:[221,35] getNullValue(java.lang.Class<?>) in org.nuiton.util.ObjectUtil has been deprecated
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.10:check (default) @ pollen-rest-api ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.8.1:generate-changes (jredmine-generate-changes) @ pollen-rest-api ---
[INFO] Skipping goal (skipGenerateChanges flag is on).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ pollen-rest-api ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ pollen-rest-api ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ pollen-rest-api ---
[INFO] Compiling 5 source files to <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ pollen-rest-api ---
[INFO] Surefire report directory: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.chorem.pollen.rest.api.PollServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.017 sec - in org.chorem.pollen.rest.api.PollServiceTest
Running org.chorem.pollen.rest.api.PollenUserServiceTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0 sec - in org.chorem.pollen.rest.api.PollenUserServiceTest
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 2
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) @ pollen-rest-api ---
[INFO] Packaging webapp
[INFO] Assembling webapp [pollen-rest-api] in [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]>
[INFO] Processing war project
[INFO] Copying webapp webResources [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]> to [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]>
[INFO] Copying webapp resources [<http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…]>
[INFO] Webapp assembled in [173 msecs]
[INFO] Building war: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ pollen-rest-api ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ pollen-rest-api ---
[INFO] Building jar: <http://ci.chorem.org/jenkins/job/pollen-nightly/org.chorem.pollen$pollen-re…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ pollen-rest-api ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ pollen-rest-api ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ pollen-rest-api ---
[INFO] Loaded /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect-artifacts.txt
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT.war to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/pollen-rest-api-2.0-SNAPSHOT.war
[INFO] Copying THIRD-PARTY.properties to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/THIRD-PARTY.properties
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-sources.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/pollen-rest-api-2.0-SNAPSHOT-sources.jar
[INFO] Copying pollen-rest-api-2.0-SNAPSHOT-javadoc.jar to /var/local/forge/data/chorem.org/jenkins/workspace/pollen-nightly/trunk/target/collect/org.chorem.pollen--pollen-rest-api/pollen-rest-api-2.0-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ pollen-rest-api ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ pollen-rest-api ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ pollen-rest-api ---
[INFO] Used declared dependencies found:
[INFO] org.chorem.pollen:pollen-persistence:jar:2.0-SNAPSHOT:compile
[INFO] org.chorem.pollen:pollen-services:jar:2.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.hibernate:hibernate-core:jar:4.3.5.Final:runtime
[INFO] org.debux.webmotion:webmotion:jar:2.4:compile
[INFO] org.debux.webmotion:webmotion-unittest:jar:2.4:test
[INFO] org.nuiton.web:nuiton-web:jar:1.16:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] javax:javaee-api:jar:7.0:provided
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] commons-beanutils:commons-beanutils:jar:1.9.1:compile
[INFO] org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] org.apache.httpcomponents:fluent-hc:jar:4.2.3:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] com.google.code.gson:gson:jar:2.2.4:compile
[INFO] junit:junit:jar:4.11:test
[INFO] org.nuiton:nuiton-utils:jar:2.7.1:compile
[INFO] com.h2database:h2:jar:1.3.173:runtime
[INFO] log4j:log4j:jar:1.2.17:compile
[WARNING] Used undeclared dependencies found:
[WARNING] commons-io:commons-io:jar:2.4:compile
[JENKINS] Archiving disabled
1
1
Author: tchemit
Date: 2014-04-30 18:17:52 +0200 (Wed, 30 Apr 2014)
New Revision: 3893
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3893
Log:
debug poll create + fix voteCounting id
Modified:
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenFixtures.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfigOption.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java
trunk/pollen-services/src/main/resources/fixtures.yaml
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java
trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java
trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java
trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java
trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java
trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java
trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java
trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java
trunk/pom.xml
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -1,6 +1,7 @@
package org.chorem.pollen.rest.api;
import org.apache.http.client.fluent.Request;
+import org.chorem.pollen.persistence.entity.Poll;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -67,7 +68,8 @@
@Test
public void getPoll() throws URISyntaxException, IOException {
- String pollId = "iioi";
+ Poll poll = fixture("poll_simplePoll");
+ String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId).Get();
String content = request.execute().returnContent().asString();
saveTestResult(content);
@@ -86,7 +88,8 @@
@Ignore
@Test
public void putPoll() throws URISyntaxException, IOException {
- String pollId = "";
+ Poll poll = fixture("poll_simplePoll");
+ String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId).Put();
String content = request.execute().returnContent().asString();
saveTestResult(content);
@@ -96,7 +99,8 @@
@Ignore
@Test
public void deletePoll() throws URISyntaxException, IOException {
- String pollId = "";
+ Poll poll = fixture("poll_simplePoll");
+ String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId).Delete();
String content = request.execute().returnContent().asString();
saveTestResult(content);
@@ -106,7 +110,8 @@
@Ignore
@Test
public void clonePoll() throws URISyntaxException, IOException {
- String pollId = "";
+ Poll poll = fixture("poll_simplePoll");
+ String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId).Post();
String content = request.execute().returnContent().asString();
saveTestResult(content);
@@ -116,7 +121,8 @@
@Ignore
@Test
public void exportPoll() throws URISyntaxException, IOException {
- String pollId = "";
+ Poll poll = fixture("poll_simplePoll");
+ String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId + "/export").Get();
String content = request.execute().returnContent().asString();
saveTestResult(content);
@@ -126,7 +132,8 @@
@Ignore
@Test
public void closePoll() throws URISyntaxException, IOException {
- String pollId = "";
+ Poll poll = fixture("poll_simplePoll");
+ String pollId = poll.getTopiaId();
Request request = createRequest("/v1/polls/" + pollId + "/close").Post();
String content = request.execute().returnContent().asString();
saveTestResult(content);
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenFixtures.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenFixtures.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/PollenFixtures.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -32,8 +32,10 @@
import org.chorem.pollen.persistence.entity.FavoriteListImpl;
import org.chorem.pollen.persistence.entity.FavoriteListMemberImpl;
import org.chorem.pollen.persistence.entity.PollImpl;
+import org.chorem.pollen.persistence.entity.PollenPrincipalImpl;
import org.chorem.pollen.persistence.entity.PollenUserImpl;
import org.chorem.pollen.persistence.entity.VoteImpl;
+import org.chorem.pollen.persistence.entity.VoteToChoiceImpl;
import org.chorem.pollen.persistence.entity.VoterListImpl;
import org.chorem.pollen.persistence.entity.VoterListMemberImpl;
@@ -61,9 +63,11 @@
reader.getConfig().setClassTag("favorite-list-member", FavoriteListMemberImpl.class);
reader.getConfig().setClassTag("comment", CommentImpl.class);
reader.getConfig().setClassTag("choice", ChoiceImpl.class);
+ reader.getConfig().setClassTag("vote-to-choice", VoteToChoiceImpl.class);
reader.getConfig().setClassTag("voter-list", VoterListImpl.class);
reader.getConfig().setClassTag("voter-list-member", VoterListMemberImpl.class);
reader.getConfig().setClassTag("vote", VoteImpl.class);
+ reader.getConfig().setClassTag("pollen-principal", PollenPrincipalImpl.class);
try {
fixtures = (Map<String, Object>) reader.read();
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfigOption.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfigOption.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfigOption.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -70,7 +70,7 @@
DEFAULT_VOTE_COUNTING_TYPE(
"pollen.default.voteCountingType",
n("pollen.configuration.defaultVoteCountingType"),
- "0",
+ "1",
Integer.class),
/**
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -146,11 +146,12 @@
principal.setEmail(creator.getEmail());
}
+ choiceToPersist.setChoiceType(choice.getChoiceType());
choiceToPersist.setCreator(principal);
poll.addChoice(choiceToPersist);
}
- switch (choice.getChoiceType()) {
+ switch (choiceToPersist.getChoiceType()) {
case TEXT:
choiceToPersist.setName(choice.getName());
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -221,15 +221,18 @@
toSave.getCreator().setPollenUser(user);
}
- toSave.getCreator().setName(poll.getCreator().getName());
- toSave.getCreator().setEmail(poll.getCreator().getEmail());
+ PollenPrincipal creator = poll.getCreator();
+ if (creator != null) {
+ toSave.getCreator().setName(creator.getName());
+ toSave.getCreator().setEmail(creator.getEmail());
+ }
// -- simple properties -- //
toSave.setVoteCountingType(poll.getVoteCountingType());
toSave.setVoteVisibility(poll.getVoteVisibility());
toSave.setCommentVisibility(poll.getCommentVisibility());
-// toSave.setChoiceType(poll.getChoiceType());
+ toSave.setResultVisibility(poll.getResultVisibility());
toSave.setAnonymousVoteAllowed(poll.isAnonymousVoteAllowed());
toSave.setChoiceAddAllowed(poll.isChoiceAddAllowed());
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -100,17 +100,17 @@
@Override
public void finished(Description description) {
- for (PollenTopiaPersistenceContext openedTransaction : openedTransactions) {
+ if (applicationContext != null && !applicationContext.isClosed()) {
- if (log.isTraceEnabled()) {
- log.trace("closing transaction " + openedTransaction);
- }
+ for (PollenTopiaPersistenceContext openedTransaction : openedTransactions) {
- openedTransaction.closeContext();
+ if (log.isTraceEnabled()) {
+ log.trace("closing transaction " + openedTransaction);
+ }
- }
+ openedTransaction.closeContext();
- if (applicationContext != null && !applicationContext.isClosed()) {
+ }
if (log.isTraceEnabled()) {
log.trace("closing transaction " + applicationContext);
Modified: trunk/pollen-services/src/main/resources/fixtures.yaml
===================================================================
--- trunk/pollen-services/src/main/resources/fixtures.yaml 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/main/resources/fixtures.yaml 2014-04-30 16:17:52 UTC (rev 3893)
@@ -22,7 +22,64 @@
email: julien(a)pollen.fake
administrator: true
+poll_normal:
+ &normal !poll
+ title: Sondage normal
+ description: Sondage de type 'normal'
+ beginDate: 1/1/2014
+ endDate: 1/2/2014
+ maxChoiceNumber: 2
+ closed: true
+ choiceAddAllowed: false
+ anonymousVoteAllowed: false
+ continuousResults: false
+ voteCountingType: 1
+ pollType: FREE
+ voteVisibility: EVERYBODY
+ commentVisibility: EVERYBODY
+ resultVisibility: EVERYBODY
+# creator: !pollen-principal
+# name: poll creator
+# email: poll_creator(a)pollen.chorem.org
+ choice:
+ - &normal_choixA !choice
+ name: choixA
+ description: choixA description
+ choiceType: TEXT
+ - &normal_choixB !choice
+ name: choixB
+ description: choixB description
+ choiceType: TEXT
+ - &normal_choixC !choice
+ name: choixC
+ description: choixC description
+ choiceType: TEXT
+ vote:
+ - &normal_vote1 !vote
+ weight: 1.0
+ anonymous: false
+ voteToChoice: !java.util.LinkedList
+ - &normal_voteToChoice11 !vote-to-choice
+ choice: *normal_choixA
+ voteValue: 1
+ - &normal_voteToChoice12 !vote-to-choice
+ choice: *normal_choixC
+ voteValue: 1
+ - &normal_vote2 !vote
+ weight: 1.0
+ anonymous: false
+ voteToChoice: !java.util.LinkedList
+ - &normal_voteToChoice21 !vote-to-choice
+ choice: *normal_choixA
+ voteValue: 2
+ - &normal_voteToChoice22 !vote-to-choice
+ choice: *normal_choixB
+ voteValue: 2
+
users:
- *tony
- *jean
- - *julien
\ No newline at end of file
+ - *julien
+
+polls:
+ - *normal
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -24,14 +24,11 @@
*/
import org.chorem.pollen.persistence.entity.Choice;
-import org.chorem.pollen.persistence.entity.ChoiceImpl;
import org.chorem.pollen.persistence.entity.ChoiceType;
import org.chorem.pollen.persistence.entity.Poll;
import org.chorem.pollen.persistence.entity.PollType;
import org.chorem.pollen.persistence.entity.VoterList;
-import org.chorem.pollen.persistence.entity.VoterListImpl;
import org.chorem.pollen.persistence.entity.VoterListMember;
-import org.chorem.pollen.persistence.entity.VoterListMemberImpl;
import org.chorem.pollen.services.PollenSecurityContext;
import org.chorem.pollen.services.exception.EntityNotFoundException;
import org.chorem.pollen.services.exception.InvalidPollFormException;
@@ -69,6 +66,14 @@
}
@Test
+ public void createPoll() throws InvalidPollFormException, EntityNotFoundException {
+ Poll poll = fixture("poll_normal");
+
+ Poll createdPoll = service.createPoll(null, poll);
+ Assert.assertNotNull(createdPoll);
+ }
+
+ @Test
public void testCreateFreePoll() throws EntityNotFoundException, InvalidPollFormException {
Poll poll = service.getNewPoll(null);
@@ -85,7 +90,7 @@
poll.setTitle("poll1");
- Choice choice1 = new ChoiceImpl();
+ Choice choice1 = getServiceContext().getPersistenceContext().getChoiceDao().newInstance();
poll.addChoice(choice1);
try {
@@ -107,7 +112,7 @@
choice1.setDescription("Choice A");
- Choice choice2 = new ChoiceImpl();
+ Choice choice2 = getServiceContext().getPersistenceContext().getChoiceDao().newInstance();
choice2.setChoiceType(ChoiceType.TEXT);
choice2.setName("A");
choice2.setDescription("Choice B");
@@ -179,14 +184,14 @@
poll.setTitle("poll1");
- Choice choice1 = new ChoiceImpl();
+ Choice choice1 = getServiceContext().getPersistenceContext().getChoiceDao().newInstance();
choice1.setChoiceType(ChoiceType.TEXT);
choice1.setName("A");
choice1.setDescription("Choice A");
poll.addChoice(choice1);
- Choice choice2 = new ChoiceImpl();
+ Choice choice2 = getServiceContext().getPersistenceContext().getChoiceDao().newInstance();
choice2.setChoiceType(ChoiceType.TEXT);
choice2.setName("B");
choice2.setDescription("Choice B");
@@ -201,7 +206,7 @@
}
// add voter list
- VoterList voterList = new VoterListImpl();
+ VoterList voterList = getServiceContext().getPersistenceContext().getVoterListDao().newInstance();
poll.addVoterList(voterList);
@@ -217,7 +222,7 @@
voterList.setName("voterList1");
voterList.setWeight(1);
- VoterListMember voterListMember1 = new VoterListMemberImpl();
+ VoterListMember voterListMember1 = getServiceContext().getPersistenceContext().getVoterListMemberDao().newInstance();
voterList.addVoterListMember(voterListMember1);
try {
@@ -241,7 +246,7 @@
voterListMember1.setEmail("voter1(a)pollen.org");
- VoterListMember voterListMember2 = new VoterListMemberImpl();
+ VoterListMember voterListMember2 = getServiceContext().getPersistenceContext().getVoterListMemberDao().newInstance();
voterListMember2.setName("voter1");
voterListMember2.setWeight(0.7);
voterListMember2.setEmail("voter1(a)pollen.org");
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -25,7 +25,6 @@
import org.apache.commons.collections.CollectionUtils;
import org.chorem.pollen.persistence.entity.PollenUser;
-import org.chorem.pollen.persistence.entity.PollenUserImpl;
import org.chorem.pollen.persistence.entity.PollenUsers;
import org.chorem.pollen.services.exception.EntityNotFoundException;
import org.chorem.pollen.services.exception.InvalidPollenUserFormException;
@@ -99,7 +98,7 @@
Assert.assertTrue(true);
}
- PollenUser newUser = new PollenUserImpl();
+ PollenUser newUser = getServiceContext().getPersistenceContext().getPollenUserDao().newInstance();
newUser.setLogin("pollen");
newUser.setEmail("pollen(a)pollen.org");
@@ -107,7 +106,7 @@
Assert.assertNotNull(savedUser);
Assert.assertNotNull(savedUser.getTopiaId());
- PollenUser newUser2 = new PollenUserImpl();
+ PollenUser newUser2 = getServiceContext().getPersistenceContext().getPollenUserDao().newInstance();
newUser2.setLogin("pollen");
newUser2.setEmail("pollen(a)pollen.org");
Modified: trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-borda/src/main/java/org/chorem/pollen/votecounting/BordaVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -38,7 +38,7 @@
*/
public class BordaVoteCounting extends AbstractVoteCounting<BordaVoteCountingStrategy> {
- public static final int ID = 4;
+ public static final int ID = 5;
public BordaVoteCounting() {
super(ID,
Modified: trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-condorcet/src/main/java/org/chorem/pollen/votecounting/CondorcetVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -31,14 +31,14 @@
import static org.nuiton.i18n.I18n.n;
/**
- * Coombs vote counting entry point.
+ * Condorcet vote counting entry point.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 1.6
*/
public class CondorcetVoteCounting extends AbstractVoteCounting<CondorcetVoteCountingStrategy> {
- public static final int ID = 2;
+ public static final int ID = 3;
public CondorcetVoteCounting() {
super(ID,
Modified: trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-coombs/src/main/java/org/chorem/pollen/votecounting/CoombsVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -38,7 +38,7 @@
*/
public class CoombsVoteCounting extends AbstractVoteCounting<CoombsVoteCountingStrategy> {
- public static final int ID = 6;
+ public static final int ID = 7;
public CoombsVoteCounting() {
super(ID,
Modified: trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -31,14 +31,14 @@
import static org.nuiton.i18n.I18n.n;
/**
- * Coombs vote counting entry point.
+ * Instant Runoff vote counting entry point.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 1.6
*/
public class InstantRunoffVoteCounting extends AbstractVoteCounting<InstantRunoffVoteCountingStrategy> {
- public static final int ID = 5;
+ public static final int ID = 6;
public InstantRunoffVoteCounting() {
super(ID,
Modified: trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-normal/src/main/java/org/chorem/pollen/votecounting/NormalVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -30,14 +30,14 @@
import static org.nuiton.i18n.I18n.n;
/**
- * Coombs vote counting entry point.
+ * Normal vote counting entry point.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 1.6
*/
public class NormalVoteCounting extends AbstractVoteCounting<NormalVoteCountingStrategy> {
- public static final int ID = 0;
+ public static final int ID = 1;
public NormalVoteCounting() {
super(ID,
Modified: trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-number/src/main/java/org/chorem/pollen/votecounting/NumberVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -30,14 +30,14 @@
import static org.nuiton.i18n.I18n.n;
/**
- * Coombs vote counting entry point.
+ * Number vote counting entry point.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 1.6
*/
public class NumberVoteCounting extends AbstractVoteCounting<NumberVoteCountingStrategy> {
- public static final int ID = 3;
+ public static final int ID = 4;
public NumberVoteCounting() {
super(ID,
Modified: trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java
===================================================================
--- trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pollen-votecounting-percentage/src/main/java/org/chorem/pollen/votecounting/PercentageVoteCounting.java 2014-04-30 16:17:52 UTC (rev 3893)
@@ -31,14 +31,14 @@
import static org.nuiton.i18n.I18n.n;
/**
- * Coombs vote counting entry point.
+ * Percentage vote counting entry point.
*
* @author tchemit <chemit(a)codelutin.com>
* @since 1.6
*/
public class PercentageVoteCounting extends AbstractVoteCounting<PercentageVoteCountingStrategy> {
- public static final int ID = 1;
+ public static final int ID = 2;
public PercentageVoteCounting() {
super(ID,
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-04-30 14:52:28 UTC (rev 3892)
+++ trunk/pom.xml 2014-04-30 16:17:52 UTC (rev 3893)
@@ -160,8 +160,7 @@
<projectId>pollen</projectId>
<!-- customized versions -->
- <nuitonJpaVersion>1.0-rc-1</nuitonJpaVersion>
- <webmotionVersion>2.4</webmotionVersion>
+ <webmotionVersion>2.5-SNAPSHOT</webmotionVersion>
<nuitonI18nVersion>3.0</nuitonI18nVersion>
<eugenePluginVersion>2.9-SNAPSHOT</eugenePluginVersion>
@@ -587,18 +586,6 @@
<groupId>org.nuiton.eugene</groupId>
<artifactId>eugene-maven-plugin</artifactId>
<version>${eugenePluginVersion}</version>
- <configuration>
- <!--<inputs>zargo</inputs>-->
- <inputs>yamlmodel</inputs>
- <resolver>org.nuiton.util.FasterCachedResourceResolver</resolver>
- </configuration>
- <dependencies>
- <dependency>
- <groupId>org.nuiton.jpa</groupId>
- <artifactId>nuiton-jpa-templates</artifactId>
- <version>${nuitonJpaVersion}</version>
- </dependency>
- </dependencies>
</plugin>
<plugin>
1
0
r3892 - in trunk/pollen-ui-angular/src/main/webapp: css js js/controllers partials
by garandel@users.chorem.org 30 Apr '14
by garandel@users.chorem.org 30 Apr '14
30 Apr '14
Author: garandel
Date: 2014-04-30 16:52:28 +0200 (Wed, 30 Apr 2014)
New Revision: 3892
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3892
Log:
fix vote in big poll template
Modified:
trunk/pollen-ui-angular/src/main/webapp/css/style.css
trunk/pollen-ui-angular/src/main/webapp/js/app.js
trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html
trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
Modified: trunk/pollen-ui-angular/src/main/webapp/css/style.css
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/css/style.css 2014-04-30 11:26:00 UTC (rev 3891)
+++ trunk/pollen-ui-angular/src/main/webapp/css/style.css 2014-04-30 14:52:28 UTC (rev 3892)
@@ -172,6 +172,7 @@
}
.pollBigChoice p {
text-align:justify;
+ white-space:pre-line;
}
.pollBigChoice textarea {
width:99%;
Modified: trunk/pollen-ui-angular/src/main/webapp/js/app.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-04-30 11:26:00 UTC (rev 3891)
+++ trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-04-30 14:52:28 UTC (rev 3892)
@@ -83,7 +83,7 @@
.directive('ngExit', function ($timeout) {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
- if(event.which === 13 || event.which === 27) {
+ if(event.which === 27) {
scope.$apply(function (){
scope.$eval(attrs.ngExit);
});
Modified: trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-04-30 11:26:00 UTC (rev 3891)
+++ trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-04-30 14:52:28 UTC (rev 3892)
@@ -95,7 +95,8 @@
if (!angular.isDefined($scope.poll.choices)) {
$scope.poll = initPoll();
}
- $scope.voteChoices = $scope.poll.choices;
+ $scope.vote = {};
+ $scope.vote.choices = $scope.poll.choices;
$scope.addChoice = function () {
var index = $scope.poll.choices.push(initChoice());
@@ -181,31 +182,32 @@
$controller('PollCtrl', {$scope:$scope});
$scope.globalVariables.editMode = false;
- $scope.$watch('voteName', function (newVal) {
+ $scope.$watch('vote.ame', function (newVal) {
if (newVal != '') {
$scope.globalVariables.errorForm = false;
}
});
var initVote = function () {
- $scope.voteName = "";
- $scope.voteChoices = [];
+ $scope.vote = {};
+ $scope.vote.name = "";
+ $scope.vote.choices = [];
for (var i = 0; i < $scope.poll.choices.length; ++i) {
if ($scope.poll.choices[i].type == 'text') {
- $scope.voteChoices.push({name:$scope.poll.choices[i].name, value:false});
+ $scope.vote.choices.push({name:$scope.poll.choices[i].name, value:false});
}
else if ($scope.poll.choices[i].type == 'date') {
- $scope.voteChoices.push({name: $scope.poll.choices[i].date , value:false});
+ $scope.vote.choices.push({name: $scope.poll.choices[i].date , value:false});
}
}
}
initVote();
- $scope.vote = function () {
- if ($scope.voteName != '') {
+ $scope.voter = function () {
+ if ($scope.vote.name != '') {
var data = {};
- data.name = $scope.voteName;
- data.choices = angular.copy($scope.voteChoices);
+ data.name = $scope.vote.name;
+ data.choices = angular.copy($scope.vote.choices);
if (!angular.isDefined($scope.poll.votants)) {
$scope.poll.votants = [];
}
Modified: trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html 2014-04-30 11:26:00 UTC (rev 3891)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html 2014-04-30 14:52:28 UTC (rev 3892)
@@ -24,7 +24,7 @@
<div ng-repeat="choice in poll.choices" class="row pollBigChoice">
<div class="col-sm-10">
- <div ng-click="showDesc = !showDesc" >
+ <div ng-click="showChoiceDesc = !showChoiceDesc" >
<div ng-if="choice.type == 'text'">
<h3 edit-me="showEdit" ng-hide="showEdit" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
<button class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)">...</button>
@@ -45,11 +45,11 @@
</h3>
</div>
</div>
- <p collapse="!globalVariables.editMode && !showDesc" edit-me="showEditDesc" ng-hide="showEditDesc">{{choice.description}}</p>
- <p ng-show="globalVariables.editMode && showEditDesc"><textarea ng-model="choice.description" focus-me="showEditDesc" ng-exit="showEditDesc = false" cols="80" rows="8"></textarea></p>
+ <p collapse="!globalVariables.editMode && !showChoiceDesc" edit-me="showEditChoiceDesc" ng-hide="showEditChoiceDesc">{{choice.description}}</p>
+ <p ng-show="globalVariables.editMode && showEditChoiceDesc"><textarea ng-model="choice.description" focus-me="showEditChoiceDesc" ng-exit="showEditChoiceDesc = false" cols="80" rows="8"></textarea></p>
</div>
<div class="col-sm-2 pollChoiceInput">
- <input type="checkbox" ng-model="choice.value"/>
+ <input type="checkbox" ng-model="vote.choices[$index].value"/>
</div>
</div>
<div class="row pollBigChoice" ng-if="globalVariables.editMode">
@@ -62,6 +62,6 @@
</div>
<div style="float:right; margin-top:5px;">
- <input type="text" placeholder="Votre Nom" ng-model="voteName"/>
- <button class="btn btn-primary" >Voter</button>
+ <input type="text" placeholder="Votre Nom" ng-model="vote.name"/>
+ <button class="btn btn-primary" ng-click="voter()">Voter</button>
</div>
\ No newline at end of file
Modified: trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-04-30 11:26:00 UTC (rev 3891)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-04-30 14:52:28 UTC (rev 3892)
@@ -44,12 +44,12 @@
</tr>
<tr>
- <td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="voteName" /> </td>
- <td ng-repeat="choice in voteChoices" class="pollChoice">
+ <td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="vote.name" /> </td>
+ <td ng-repeat="choice in vote.choices" class="pollChoice">
<input type="checkbox" name="{{choice.name}}" ng-model="choice.value"/>
</td>
<td>
- <input class="btn btn-primary btn-large" type="button" value="Vote" ng-click="vote()" />
+ <input class="btn btn-primary btn-large" type="button" value="Vote" ng-click="voter()" />
</td>
</tr>
Modified: trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-04-30 11:26:00 UTC (rev 3891)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-04-30 14:52:28 UTC (rev 3892)
@@ -12,7 +12,7 @@
<h1 ng-show="showEditTitle"><input type="text" class="form-control" focus-me="showEditTitle" ng-model="poll.title" ng-exit="showEditTitle = false" required/></h1>
</div>
- <div ng-hide="showEditDesc" class="pollDesc" edit-me="showEditDesc">
+ <div ng-hide="showEditDesc || !globalVariables.editMode && !poll.description " class="pollDesc" edit-me="showEditDesc">
<div ng-bind-html="toHTML(poll.description || 'Description (Facultatif). Ce cadre disparait si aucune description n\'est mise')"></div>
</div>
<div ng-show="showEditDesc" class="pollDesc " ng-exit="showEditDesc = false;">
1
0
Author: tchemit
Date: 2014-04-30 13:26:00 +0200 (Wed, 30 Apr 2014)
New Revision: 3891
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3891
Log:
improve tests
Added:
trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/
trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/FakePollenServiceContext.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java
trunk/pollen-services/src/test/resources/pollen-services.properties
Removed:
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenServiceContext.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java
Modified:
trunk/pollen-rest-api/pom.xml
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java
trunk/pollen-rest-api/src/test/resources/log4j.properties
trunk/pollen-services/pom.xml
trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfig.java
trunk/pollen-services/src/main/resources/fixtures.yaml
trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java
trunk/pom.xml
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/pom.xml 2014-04-30 11:26:00 UTC (rev 3891)
@@ -47,6 +47,20 @@
<dependency>
<groupId>org.debux.webmotion</groupId>
<artifactId>webmotion-unittest</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-juli</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-jasper</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse.jdt.core.compiler</groupId>
+ <artifactId>ecj</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -99,6 +113,21 @@
</dependency>
<dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-jasper</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-juli</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-log4j</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/AbstractPollenRestApiTest.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -23,16 +23,22 @@
* #L%
*/
+import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.persistence.PollenTopiaPersistenceContext;
-import org.chorem.pollen.services.PollenFixtures;
+import org.chorem.pollen.persistence.PollenPersistenceContext;
import org.chorem.pollen.services.PollenServiceContext;
-import org.chorem.pollen.services.service.FixturesService;
-import org.debux.webmotion.unittest.WebMotionJUnit;
+import org.chorem.pollen.services.config.PollenServiceConfig;
+import org.chorem.pollen.services.test.FakePollenServiceContext;
+import org.chorem.pollen.services.test.PollenApplication;
+import org.debux.webmotion.unittest.WebMotionTest;
import org.junit.After;
import org.junit.Before;
+import org.junit.Rule;
+import org.nuiton.util.DateUtil;
+import java.io.File;
+import java.io.IOException;
import java.util.Locale;
/**
@@ -41,25 +47,54 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 2.0
*/
-public class AbstractPollenRestApiTest extends WebMotionJUnit {
+public class AbstractPollenRestApiTest extends WebMotionTest {
/** Logger. */
private static final Log log = LogFactory.getLog(AbstractPollenRestApiTest.class);
- protected PollenFixtures fixtures;
+ @Rule
+ public final PollenApplication application = new PollenApplication("pollen-rest-api.properties");
+ protected void loadFixtures(String fixturesSetName) {
+
+ PollenRestApiApplicationContext applicationContext = PollenRestApiApplicationContext.getApplicationContext();
+
+ PollenServiceContext serviceContext = applicationContext.newServiceContext(applicationContext.newPersistenceContext(), Locale.FRANCE);
+
+ application.loadFixtures(serviceContext, fixturesSetName);
+ }
+
+ protected <E> E fixture(String id) {
+
+ return application.fixture(id);
+ }
+
@Before
- public void launchServer() throws Exception {
+ public void startServer() throws Exception {
- PollenRestApiApplicationContext applicationContext = FakePollenRestApiApplicationContext.newFakeApplicationContext();
+ PollenRestApiApplicationContext applicationContext =
+ new PollenRestApiApplicationContext(application.getConfiguration(),
+ application.getApplicationContext()) {
+ @Override
+ public PollenServiceContext newServiceContext(PollenPersistenceContext persistenceContext, Locale locale) {
+
+ FakePollenServiceContext serviceContext = FakePollenServiceContext.newServiceContext(
+ DateUtil.createDate(1, 1, 2014),
+ Locale.FRANCE,
+ application.getConfiguration(),
+ application.getApplicationContext(),
+ application.newPersistenceContext());
+ return serviceContext;
+ }
+ };
applicationContext.init();
PollenRestApiApplicationContext.setApplicationContext(applicationContext);
- super.launchServer();
+ super.startServer();
}
@After
- public void tearDown() {
+ public void stopServer() throws Exception {
PollenRestApiApplicationContext applicationContext = PollenRestApiApplicationContext.getApplicationContext();
@@ -70,23 +105,20 @@
}
applicationContext.close();
}
+ server.stop();
+ server.destroy();
}
- protected void loadFixtures(String fixturesSetName) {
+ protected void saveTestResult(String content) throws IOException {
+ String testName = application.getMethodName();
- PollenRestApiApplicationContext applicationContext = PollenRestApiApplicationContext.getApplicationContext();
- PollenTopiaPersistenceContext entityManager = applicationContext.newPersistenceContext();
- PollenServiceContext pollenServiceContext = applicationContext.newServiceContext(entityManager, Locale.FRANCE);
-
- FixturesService fixturesService = pollenServiceContext.newService(FixturesService.class);
- fixtures = fixturesService.loadFixtures(fixturesSetName);
-
+ PollenServiceConfig applicationConfig = PollenRestApiApplicationContext.getApplicationContext().getApplicationConfig();
+ File dataDirectory = applicationConfig.getDataDirectory();
+ File resultFile = new File(dataDirectory, testName);
+ FileUtils.write(resultFile, content);
+ if (log.isInfoEnabled()) {
+ log.info("ResultFile: " + resultFile);
+ }
}
- protected <E> E fixture(String id) {
-
- return fixtures.fixture(id);
-
- }
-
}
Deleted: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -1,146 +0,0 @@
-package org.chorem.pollen.rest.api;
-
-/*
- * #%L
- * Pollen :: Rest Api
- * %%
- * Copyright (C) 2009 - 2014 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import org.apache.commons.lang3.SystemUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.persistence.PollenPersistenceContext;
-import org.chorem.pollen.persistence.PollenTopiaApplicationContext;
-import org.chorem.pollen.persistence.PollenTopiaPersistenceContext;
-import org.chorem.pollen.services.PollenServiceContext;
-import org.chorem.pollen.services.config.PollenServiceConfig;
-import org.hibernate.cfg.Environment;
-import org.nuiton.util.DateUtil;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.UUID;
-
-/**
- * Created on 4/27/14.
- *
- * @author Tony Chemit <chemit(a)codelutin.com>
- * @since 2.0
- */
-public class FakePollenRestApiApplicationContext extends PollenRestApiApplicationContext {
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(FakePollenRestApiApplicationContext.class);
-
- protected List<PollenTopiaPersistenceContext> openedTransactions = new LinkedList<>();
-
- public static PollenRestApiApplicationContext newFakeApplicationContext() {
- PollenServiceConfig applicationConfig = new PollenServiceConfig("pollen-rest-api.properties");
- PollenTopiaApplicationContext pollenTopiaApplicationContext = newTopiaApplicationContext(applicationConfig, UUID.randomUUID().toString());
- PollenRestApiApplicationContext result = new FakePollenRestApiApplicationContext(applicationConfig, pollenTopiaApplicationContext);
- return result;
- }
-
- public FakePollenRestApiApplicationContext(PollenServiceConfig applicationConfig, PollenTopiaApplicationContext pollenTopiaApplicationContext) {
-
- super(applicationConfig, pollenTopiaApplicationContext);
- }
-
- @Override
- public PollenServiceContext newServiceContext(PollenPersistenceContext persistenceContext, Locale locale) {
-
- FakePollenServiceContext serviceContext = new FakePollenServiceContext();
- serviceContext.setPersistenceContext(persistenceContext);
- serviceContext.setPollenServiceConfig(getApplicationConfig());
- serviceContext.setTopiaApplicationContext(getTopiaApplicationContext());
- serviceContext.setLocale(locale);
- serviceContext.setDate(DateUtil.createDate(1, 1, 2014));
-
- return serviceContext;
- }
-
- @Override
- public PollenTopiaPersistenceContext newPersistenceContext() {
- PollenTopiaPersistenceContext pollenTopiaPersistenceContext = super.newPersistenceContext();
- openedTransactions.add(pollenTopiaPersistenceContext);
- return pollenTopiaPersistenceContext;
- }
-
- @Override
- public void close() {
- if (!closed.get()) {
-
- for (PollenTopiaPersistenceContext openedTransaction : openedTransactions) {
-
- if (log.isTraceEnabled()) {
- log.trace("closing transaction " + openedTransaction);
- }
-
- if (!openedTransaction.isClosed()) {
- openedTransaction.closeContext();
- }
- }
- openedTransactions.clear();
- }
- super.close();
- }
-
- protected static PollenTopiaApplicationContext newTopiaApplicationContext(PollenServiceConfig applicationConfig, String dataBase) {
-
- Map<String, String> hibernateH2Config = new HashMap<>();
-
- hibernateH2Config.putAll(applicationConfig.getTopiaProperties());
-
- hibernateH2Config.put(Environment.DRIVER, org.h2.Driver.class.getName());
- hibernateH2Config.put(Environment.DIALECT, org.hibernate.dialect.H2Dialect.class.getName());
- hibernateH2Config.put(Environment.USER, "sa");
- hibernateH2Config.put(Environment.PASS, "sa");
- hibernateH2Config.put(Environment.HBM2DDL_AUTO, "update");
-
- File tempDirFile = SystemUtils.getJavaIoTmpDir();
-
- File databaseFile = new File(tempDirFile, dataBase);
-
- String h2dataPath = databaseFile.getAbsolutePath() + File.separator + "h2data";
-
- String jdbcUrl = "jdbc:h2:file:" + h2dataPath;
-
- hibernateH2Config.put(Environment.URL, jdbcUrl);
-
- if (log.isTraceEnabled()) {
- log.trace("will store H2 data in " + h2dataPath);
- log.trace("allTopiaParameters = " + hibernateH2Config);
- }
-
- if (log.isDebugEnabled()) {
- log.debug("jdbc url is\n" + jdbcUrl);
- }
-
- PollenTopiaApplicationContext applicationContext = new PollenTopiaApplicationContext(hibernateH2Config);
-
- if (log.isTraceEnabled()) {
- log.trace("created root context " + applicationContext);
- }
-
- return applicationContext;
- }
-}
Deleted: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenServiceContext.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenServiceContext.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenServiceContext.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -1,53 +0,0 @@
-package org.chorem.pollen.rest.api;
-
-/*
- * #%L
- * Pollen :: Service
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2013 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import com.google.common.base.Preconditions;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.services.DefaultPollenServiceContext;
-
-import java.util.Date;
-
-public class FakePollenServiceContext extends DefaultPollenServiceContext {
-
- private static final Log log =
- LogFactory.getLog(FakePollenServiceContext.class);
-
- protected Date date;
-
- @Override
- public Date getNow() {
- Preconditions.checkState(date != null, "you must provide a date before running service test");
- if (log.isTraceEnabled()) {
- log.trace("injecting fake date in service: " + date);
- }
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
-}
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -1,6 +1,7 @@
package org.chorem.pollen.rest.api;
import org.apache.http.client.fluent.Request;
+import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -18,10 +19,17 @@
@Ignore
public class PollServiceTest extends AbstractPollenRestApiTest {
+ @Before
+ public void setUp() throws Exception {
+
+ loadFixtures("fixtures");
+ }
+
@Test
public void getPollsNew() throws URISyntaxException, IOException {
Request request = createRequest("/v1/polls/new").Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
@@ -29,6 +37,7 @@
public void getPolls() throws URISyntaxException, IOException {
Request request = createRequest("/v1/polls").Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
@@ -36,6 +45,7 @@
public void getPollsCreated() throws URISyntaxException, IOException {
Request request = createRequest("/v1/polls/created").Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
@@ -43,6 +53,7 @@
public void getPollsInvited() throws URISyntaxException, IOException {
Request request = createRequest("/v1/polls/invited").Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
@@ -50,61 +61,75 @@
public void getPollsParticipated() throws URISyntaxException, IOException {
Request request = createRequest("/v1/polls/participated").Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
@Test
public void getPoll() throws URISyntaxException, IOException {
- String pollId = "";
+ String pollId = "iioi";
Request request = createRequest("/v1/polls/" + pollId).Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
+ @Ignore
@Test
public void postPoll() throws URISyntaxException, IOException {
Request request = createRequest("/v1/polls").Post();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
+ @Ignore
@Test
public void putPoll() throws URISyntaxException, IOException {
String pollId = "";
Request request = createRequest("/v1/polls/" + pollId).Put();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
+ @Ignore
@Test
public void deletePoll() throws URISyntaxException, IOException {
String pollId = "";
Request request = createRequest("/v1/polls/" + pollId).Delete();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
+ @Ignore
@Test
public void clonePoll() throws URISyntaxException, IOException {
String pollId = "";
Request request = createRequest("/v1/polls/" + pollId).Post();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
+ @Ignore
@Test
public void exportPoll() throws URISyntaxException, IOException {
String pollId = "";
Request request = createRequest("/v1/polls/" + pollId + "/export").Get();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
+ @Ignore
@Test
public void closePoll() throws URISyntaxException, IOException {
String pollId = "";
Request request = createRequest("/v1/polls/" + pollId + "/close").Post();
String content = request.execute().returnContent().asString();
+ saveTestResult(content);
assertNotNull(content);
}
}
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -39,7 +39,6 @@
@Ignore
public class PollenUserServiceTest extends AbstractPollenRestApiTest {
-
@Before
public void setUp() throws Exception {
@@ -50,50 +49,57 @@
public void getUsers() throws Exception {
Request request = createRequest("/v1/users").Get();
- String result = request.execute().returnContent().asString();
-
- assertTrue(result.contains("email"));
+ String content = request.execute().returnContent().asString();
+ saveTestResult(content);
+ assertTrue(content.contains("email"));
}
@Test
public void getUser() throws Exception {
String userId = "";
Request request = createRequest("/v1/users/" + userId).Get();
- String result = request.execute().returnContent().asString();
-
- assertTrue(result.contains("email"));
+ String content = request.execute().returnContent().asString();
+ saveTestResult(content);
+ assertTrue(content.contains("email"));
}
+ @Ignore
@Test
public void postUser() throws Exception {
Request request = createRequest("/v1/users").Post();
- String result = request.execute().returnContent().asString();
-
- assertTrue(result.contains("email2"));
+ String content = request.execute().returnContent().asString();
+ saveTestResult(content);
+ assertTrue(content.contains("email2"));
}
+ @Ignore
@Test
public void putUser() throws Exception {
String userId = "";
Request request = createRequest("/v1/users/" + userId).Get();
- String result = request.execute().returnContent().asString();
- assertTrue(result.contains("email3"));
+ String content = request.execute().returnContent().asString();
+ saveTestResult(content);
+ assertTrue(content.contains("email3"));
}
+ @Ignore
@Test
public void deleteUser() throws Exception {
String userId = "";
Request request = createRequest("/v1/users/" + userId).Delete();
- String result = request.execute().returnContent().asString();
- assertTrue(result.contains("OK!"));
+ String content = request.execute().returnContent().asString();
+ saveTestResult(content);
+ assertTrue(content.contains("OK!"));
}
+ @Ignore
@Test
public void validateUserEmail() throws Exception {
String userId = "";
String token = "";
Request request = createRequest("/v1/users/" + userId + "?token=" + token).Put();
- String result = request.execute().returnContent().asString();
- assertTrue(result.contains("OK!"));
+ String content = request.execute().returnContent().asString();
+ saveTestResult(content);
+ assertTrue(content.contains("OK!"));
}
}
Modified: trunk/pollen-rest-api/src/test/resources/log4j.properties
===================================================================
--- trunk/pollen-rest-api/src/test/resources/log4j.properties 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-rest-api/src/test/resources/log4j.properties 2014-04-30 11:26:00 UTC (rev 3891)
@@ -26,7 +26,7 @@
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%d{hh:mm:ss} %5p (%F:%L) %m%n
-log4j.logger.org.chorem.pollen=TRACE
+log4j.logger.org.chorem.pollen=INFO
log4j.logger.org.debux=INFO
# log4j.logger.org.hibernate.tool.hbm2ddl.SchemaExport=FATAL
Modified: trunk/pollen-services/pom.xml
===================================================================
--- trunk/pollen-services/pom.xml 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/pom.xml 2014-04-30 11:26:00 UTC (rev 3891)
@@ -26,10 +26,10 @@
<groupId>org.nuiton.topia</groupId>
<artifactId>topia-persistence</artifactId>
</dependency>
- <!--dependency>
+ <dependency>
<groupId>org.nuiton.topia</groupId>
<artifactId>topia-junit</artifactId>
- </dependency-->
+ </dependency>
<dependency>
<groupId>org.hibernate</groupId>
@@ -88,6 +88,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfig.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfig.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/config/PollenServiceConfig.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -53,13 +53,23 @@
protected ApplicationConfig applicationConfig;
public PollenServiceConfig() {
- this("pollen.properties");
+ this("pollen.properties", null);
}
public PollenServiceConfig(String filename) {
+ this(filename, null);
+ }
+
+ public PollenServiceConfig(String filename, Properties defaultValues) {
applicationConfig = new ApplicationConfig();
applicationConfig.loadDefaultOptions(PollenServiceConfigOption.values());
applicationConfig.setConfigFileName(filename);
+ if (defaultValues != null) {
+ for (Map.Entry<Object, Object> entry : defaultValues.entrySet()) {
+
+ applicationConfig.setOption((String) entry.getKey(), (String) entry.getValue());
+ }
+ }
try {
applicationConfig.parse();
} catch (ArgumentsParserException e) {
@@ -74,7 +84,7 @@
option.getKey(),
applicationConfig.getOption(option)));
}
- log.info( builder.toString());
+ log.info(builder.toString());
}
}
Copied: trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/FakePollenServiceContext.java (from rev 3890, trunk/pollen-services/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java)
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/FakePollenServiceContext.java (rev 0)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/FakePollenServiceContext.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -0,0 +1,73 @@
+package org.chorem.pollen.services.test;
+
+/*
+ * #%L
+ * Pollen :: Service
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2009 - 2013 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * #L%
+ */
+
+import com.google.common.base.Preconditions;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.persistence.PollenTopiaApplicationContext;
+import org.chorem.pollen.persistence.PollenTopiaPersistenceContext;
+import org.chorem.pollen.services.DefaultPollenServiceContext;
+import org.chorem.pollen.services.config.PollenServiceConfig;
+
+import java.util.Date;
+import java.util.Locale;
+
+public class FakePollenServiceContext extends DefaultPollenServiceContext {
+
+ private static final Log log =
+ LogFactory.getLog(FakePollenServiceContext.class);
+
+ protected Date date;
+
+
+ public static FakePollenServiceContext newServiceContext(Date now,
+ Locale locale,
+ PollenServiceConfig serviceConfig,
+ PollenTopiaApplicationContext applicationcontext,
+ PollenTopiaPersistenceContext persistenceContext) {
+ FakePollenServiceContext serviceContext = new FakePollenServiceContext();
+ serviceContext.setPersistenceContext(persistenceContext);
+ serviceContext.setPollenServiceConfig(serviceConfig);
+ serviceContext.setTopiaApplicationContext(applicationcontext);
+ serviceContext.setLocale(locale);
+ serviceContext.setDate(now);
+ return serviceContext;
+ }
+
+ @Override
+ public Date getNow() {
+ Preconditions.checkState(date != null, "you must provide a date before running service test");
+ if (log.isTraceEnabled()) {
+ log.trace("injecting fake date in service: " + date);
+ }
+ return date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+
+}
Added: trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java (rev 0)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -0,0 +1,170 @@
+package org.chorem.pollen.services.test;
+
+/*
+ * #%L
+ * ToPIA :: JUnit
+ * $Id$
+ * $HeadURL: http://svn.nuiton.org/svn/topia/trunk/topia-junit/src/main/java/org/nuiton/… $
+ * %%
+ * Copyright (C) 2004 - 2014 CodeLutin
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU General Lesser Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/lgpl-3.0.html>.
+ * #L%
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.persistence.PollenTopiaApplicationContext;
+import org.chorem.pollen.persistence.PollenTopiaPersistenceContext;
+import org.chorem.pollen.services.PollenFixtures;
+import org.chorem.pollen.services.PollenServiceContext;
+import org.chorem.pollen.services.config.PollenServiceConfig;
+import org.chorem.pollen.services.config.PollenServiceConfigOption;
+import org.chorem.pollen.services.service.FixturesService;
+import org.junit.rules.TestWatcher;
+import org.junit.runner.Description;
+import org.nuiton.topia.junit.ConfigurationHelper;
+
+import java.io.File;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class PollenApplication extends TestWatcher {
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(PollenApplication.class);
+
+ private File testBasedir;
+
+ protected List<PollenTopiaPersistenceContext> openedTransactions = new LinkedList<>();
+
+ private PollenTopiaApplicationContext applicationContext;
+
+ private PollenServiceConfig configuration;
+
+ private final String configurationPath;
+
+
+ protected PollenFixtures fixtures;
+
+ protected String methodName;
+
+ public PollenApplication(String configurationPath) {
+ this.configurationPath = configurationPath;
+ }
+
+ @Override
+ protected void starting(Description description) {
+
+ methodName = description.getMethodName();
+
+ // get test directory
+ testBasedir = ConfigurationHelper.getTestSpecificDirectory(
+ description.getTestClass(),
+ description.getMethodName());
+
+ if (log.isDebugEnabled()) {
+ log.debug("testBasedir: " + testBasedir);
+ }
+
+ // create configuration
+
+ Properties defaultvalues = new Properties();
+ defaultvalues.put(PollenServiceConfigOption.DATA_DIRECTORY.getKey(), testBasedir.getAbsolutePath());
+
+ configuration = new PollenServiceConfig(configurationPath, defaultvalues);
+
+ Map<String, String> topiaProperties = configuration.getTopiaProperties();
+ applicationContext = new PollenTopiaApplicationContext(topiaProperties);
+
+ }
+
+ @Override
+ public void finished(Description description) {
+
+ for (PollenTopiaPersistenceContext openedTransaction : openedTransactions) {
+
+ if (log.isTraceEnabled()) {
+ log.trace("closing transaction " + openedTransaction);
+ }
+
+ openedTransaction.closeContext();
+
+ }
+
+ if (applicationContext != null && !applicationContext.isClosed()) {
+
+ if (log.isTraceEnabled()) {
+ log.trace("closing transaction " + applicationContext);
+ }
+
+ applicationContext.closeContext();
+
+ }
+ }
+
+ public File getTestBasedir() {
+ return testBasedir;
+ }
+
+ public PollenTopiaApplicationContext getApplicationContext() {
+ return applicationContext;
+ }
+
+ public PollenServiceConfig getConfiguration() {
+ return configuration;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public PollenTopiaPersistenceContext newPersistenceContext() {
+
+ PollenTopiaPersistenceContext persistenceContext;
+
+ persistenceContext = applicationContext.newPersistenceContext();
+
+ if (log.isTraceEnabled()) {
+ log.trace("opened transaction " + persistenceContext);
+ }
+
+ openedTransactions.add(persistenceContext);
+
+ return persistenceContext;
+
+ }
+
+ public void loadFixtures(PollenServiceContext serviceContext, String fixturesSetName) {
+
+ FixturesService fixturesService = serviceContext.newService(FixturesService.class);
+
+ fixtures = fixturesService.loadFixtures(fixturesSetName);
+
+ }
+
+ public <E> E fixture(String id) {
+
+ return fixtures.fixture(id);
+
+ }
+
+}
Property changes on: trunk/pollen-services/src/main/java/org/chorem/pollen/services/test/PollenApplication.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-services/src/main/resources/fixtures.yaml
===================================================================
--- trunk/pollen-services/src/main/resources/fixtures.yaml 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/src/main/resources/fixtures.yaml 2014-04-30 11:26:00 UTC (rev 3891)
@@ -1,4 +1,4 @@
-tony:
+user_tony:
&tony !user
login: tony
password: fake
@@ -6,7 +6,7 @@
email: tony(a)pollen.fake
administrator: false
-jean:
+user_jean:
&jean !user
login: jean
password: fake
@@ -14,7 +14,7 @@
email: jean(a)pollen.fake
administrator: true
-julien:
+user_julien:
&julien !user
login: julien
password: fake
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/AbstractPollenServiceTest.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -24,173 +24,49 @@
*/
import com.google.common.collect.Multimap;
-import org.apache.commons.lang3.SystemUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.persistence.PollenTopiaApplicationContext;
-import org.chorem.pollen.persistence.PollenTopiaPersistenceContext;
-import org.chorem.pollen.services.PollenFixtures;
import org.chorem.pollen.services.PollenService;
-import org.chorem.pollen.services.config.PollenServiceConfig;
import org.chorem.pollen.services.exception.AbstractInvalidFormException;
-import org.chorem.pollen.services.service.FixturesService;
-import org.hibernate.cfg.Environment;
-import org.junit.After;
+import org.chorem.pollen.services.test.FakePollenServiceContext;
+import org.chorem.pollen.services.test.PollenApplication;
import org.junit.Assert;
+import org.junit.Rule;
import org.nuiton.util.DateUtil;
-import java.io.File;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
+import java.util.Locale;
public abstract class AbstractPollenServiceTest {
- private static final Log log = LogFactory.getLog(AbstractPollenServiceTest.class);
-
protected static final double DELTA = 0.0001;
- protected static PollenServiceConfig applicationConfig;
+ @Rule
+ public final PollenApplication application = new PollenApplication("pollen-services.properties");
- protected PollenTopiaApplicationContext applicationContext;
-
- protected List<PollenTopiaPersistenceContext> openedTransactions = new LinkedList<>();
-
protected FakePollenServiceContext serviceContext;
- protected PollenFixtures fixtures;
+ public void loadFixtures(String fixturesSetName) {
- @After
- public void tearDown() {
-
- for (PollenTopiaPersistenceContext openedTransaction : openedTransactions) {
-
- if (log.isTraceEnabled()) {
- log.trace("closing transaction " + openedTransaction);
- }
-
- openedTransaction.closeContext();
-
- }
-
- if (applicationContext != null) {
-
- if (log.isTraceEnabled()) {
- log.trace("closing transaction " + applicationContext);
- }
-
- applicationContext.closeContext();
-
- }
-
+ application.loadFixtures(getServiceContext(), fixturesSetName);
}
- protected PollenTopiaApplicationContext newApplicationContext(String dataBase) {
+ public <E> E fixture(String id) {
- Map<String, String> hibernateH2Config = new HashMap<>();
-
- hibernateH2Config.putAll(getApplicationConfig().getTopiaProperties());
-
- hibernateH2Config.put(Environment.DRIVER, org.h2.Driver.class.getName());
- hibernateH2Config.put(Environment.DIALECT, org.hibernate.dialect.H2Dialect.class.getName());
- hibernateH2Config.put(Environment.USER, "sa");
- hibernateH2Config.put(Environment.PASS, "sa");
- hibernateH2Config.put(Environment.HBM2DDL_AUTO, "update");
-
- File tempDirFile = SystemUtils.getJavaIoTmpDir();
-
- File databaseFile = new File(tempDirFile, dataBase);
-
- String h2dataPath = databaseFile.getAbsolutePath() + File.separator + "h2data";
-
- String jdbcUrl = "jdbc:h2:file:" + h2dataPath;
-
- hibernateH2Config.put(Environment.URL, jdbcUrl);
-
- if (log.isTraceEnabled()) {
- log.trace("will store H2 data in " + h2dataPath);
- log.trace("allTopiaParameters = " + hibernateH2Config);
- }
-
- if (log.isDebugEnabled()) {
- log.debug("jdbc url is\n" + jdbcUrl);
- }
-
- PollenTopiaApplicationContext topiaApplicationContext = new PollenTopiaApplicationContext(hibernateH2Config);
-
- if (log.isTraceEnabled()) {
- log.trace("created root context " + topiaApplicationContext);
- }
-
- return topiaApplicationContext;
+ return application.fixture(id);
}
- protected PollenTopiaApplicationContext getApplicationContext() {
-
- String databaseName = UUID.randomUUID().toString();
-
- return newApplicationContext(databaseName);
- }
-
- protected PollenTopiaPersistenceContext newPersistenceContext() {
-
- if (applicationContext == null) {
-
- applicationContext = getApplicationContext();
- }
-
- PollenTopiaPersistenceContext persistenceContext;
-
- persistenceContext = applicationContext.newPersistenceContext();
-
- if (log.isTraceEnabled()) {
- log.trace("opened transaction " + persistenceContext);
- }
-
- openedTransactions.add(persistenceContext);
-
- return persistenceContext;
-
- }
-
- protected static PollenServiceConfig getApplicationConfig() {
-
- if (applicationConfig == null) {
-
- applicationConfig = new PollenServiceConfig("pollen-services.properties");
- }
-
- return applicationConfig;
- }
-
protected FakePollenServiceContext getServiceContext() {
if (serviceContext == null) {
- serviceContext = new FakePollenServiceContext();
- serviceContext.setPollenServiceConfig(getApplicationConfig());
- PollenTopiaPersistenceContext persistenceContext = newPersistenceContext();
- serviceContext.setPersistenceContext(persistenceContext);
- serviceContext.setDate(DateUtil.createDate(2, 11, 2009));
- serviceContext.setTopiaApplicationContext(getApplicationContext());
+ serviceContext = FakePollenServiceContext.newServiceContext(
+ DateUtil.createDate(1, 1, 2014),
+ Locale.FRANCE,
+ application.getConfiguration(),
+ application.getApplicationContext(),
+ application.newPersistenceContext());
}
return serviceContext;
}
- protected void loadFixtures(String fixturesSetName) {
-
- FixturesService fixturesService = getServiceContext().newService(FixturesService.class);
-
- fixtures = fixturesService.loadFixtures(fixturesSetName);
- }
-
- protected <E> E fixture(String id) {
-
- return fixtures.fixture(id);
- }
-
protected <E extends PollenService> E newService(Class<E> serviceClass) {
return getServiceContext().newService(serviceClass);
Deleted: trunk/pollen-services/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/FakePollenServiceContext.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -1,53 +0,0 @@
-package org.chorem.pollen.service;
-
-/*
- * #%L
- * Pollen :: Service
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2013 CodeLutin
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-import com.google.common.base.Preconditions;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.services.DefaultPollenServiceContext;
-
-import java.util.Date;
-
-public class FakePollenServiceContext extends DefaultPollenServiceContext {
-
- private static final Log log =
- LogFactory.getLog(FakePollenServiceContext.class);
-
- protected Date date;
-
- @Override
- public Date getNow() {
- Preconditions.checkState(date != null, "you must provide a date before running service test");
- if (log.isTraceEnabled()) {
- log.trace("injecting fake date in service: " + date);
- }
- return date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
-}
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -61,11 +61,11 @@
loadFixtures("fixtures");
- service = getServiceContext().newService(PollService.class);
+ service = newService(PollService.class);
- serviceContext.setDate(new Date(1363948427576l));
+ getServiceContext().setDate(new Date(1363948427576l));
- serviceContext.setSecurityContext(PollenSecurityContext.newContext(null));
+ getServiceContext().setSecurityContext(PollenSecurityContext.newContext(null));
}
@Test
@@ -127,12 +127,12 @@
Assert.assertNotNull(createdPoll);
Assert.assertNotNull(createdPoll.getTopiaId());
- serviceContext.newService(SecurityService.class).prepareSubject(createdPoll.getCreator().getTopiaId());
+ newService(SecurityService.class).prepareSubject(createdPoll.getCreator().getTopiaId());
Poll reloadedPoll = service.getPoll(createdPoll.getTopiaId());
Assert.assertEquals(createdPoll, reloadedPoll);
- Assert.assertEquals(serviceContext.getNow(), createdPoll.getBeginDate());
+ Assert.assertEquals(getServiceContext().getNow(), createdPoll.getBeginDate());
Assert.assertNotNull(createdPoll.getCreator());
Assert.assertNotNull(createdPoll.getCreator().getTopiaId());
@@ -150,7 +150,7 @@
Assert.assertNotNull(createdChoice1);
Assert.assertNotNull(createdChoice1.getTopiaId());
- ChoiceService choiceService = serviceContext.newService(ChoiceService.class);
+ ChoiceService choiceService = newService(ChoiceService.class);
Choice reloadedChoice1 = choiceService.getChoice(createdPoll.getTopiaId(), createdChoice1.getTopiaId());
Assert.assertEquals(createdChoice1, reloadedChoice1);
@@ -265,7 +265,7 @@
Poll reloadedPoll = service.getPoll(createdPoll.getTopiaId());
Assert.assertEquals(createdPoll, reloadedPoll);
- Assert.assertEquals(serviceContext.getNow(), createdPoll.getBeginDate());
+ Assert.assertEquals(getServiceContext().getNow(), createdPoll.getBeginDate());
Assert.assertNotNull(createdPoll.getCreator());
Assert.assertNotNull(createdPoll.getCreator().getTopiaId());
@@ -281,7 +281,7 @@
Assert.assertNotNull(createdChoice1);
Assert.assertNotNull(createdChoice1.getTopiaId());
- ChoiceService choiceService = serviceContext.newService(ChoiceService.class);
+ ChoiceService choiceService = newService(ChoiceService.class);
Choice reloadedChoice1 = choiceService.getChoice(createdPoll.getTopiaId(), createdChoice1.getTopiaId());
Assert.assertEquals(createdChoice1, reloadedChoice1);
@@ -306,7 +306,7 @@
Assert.assertNotNull(createdVoterList);
Assert.assertNotNull(createdVoterList.getTopiaId());
- VoterListService voterListService = serviceContext.newService(VoterListService.class);
+ VoterListService voterListService = newService(VoterListService.class);
VoterList reloadedVoterList = voterListService.getVoterList(createdPoll.getTopiaId(), createdVoterList.getTopiaId());
Assert.assertEquals(createdVoterList, reloadedVoterList);
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollenUserServiceTest.java 2014-04-30 11:26:00 UTC (rev 3891)
@@ -56,11 +56,11 @@
loadFixtures("fixtures");
- service = getServiceContext().newService(PollenUserService.class);
+ service = newService(PollenUserService.class);
- serviceContext.setDate(new Date(1363948427576l));
+ getServiceContext().setDate(new Date(1363948427576l));
- user = fixture("tony");
+ user = application.fixture("user_tony");
}
@Test
@@ -143,7 +143,7 @@
Assert.assertNotNull(user);
Assert.assertNull(user.getEmailActivationToken());
- serviceContext.getPersistenceContext().getHibernateSupport().getHibernateSession().evict(user);
+ getServiceContext().getPersistenceContext().getHibernateSupport().getHibernateSession().evict(user);
String originalLogin = user.getLogin();
@@ -174,7 +174,7 @@
Assert.assertNotNull(user);
Assert.assertNull(user.getEmailActivationToken());
- serviceContext.getPersistenceContext().getHibernateSupport().getHibernateSession().evict(user);
+ getServiceContext().getPersistenceContext().getHibernateSupport().getHibernateSession().evict(user);
String email = "tony(a)pollen.org";
user.setEmail(email);
Added: trunk/pollen-services/src/test/resources/pollen-services.properties
===================================================================
--- trunk/pollen-services/src/test/resources/pollen-services.properties (rev 0)
+++ trunk/pollen-services/src/test/resources/pollen-services.properties 2014-04-30 11:26:00 UTC (rev 3891)
@@ -0,0 +1,6 @@
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.connection.url=jdbc:h2:file:${pollen.data.directory}/db/pollen-rest-api
+hibernate.connection.username=sa
+hibernate.connection.password=sa
+hibernate.connection.driver_class=org.h2.Driver
+hibernate.hbm2ddl.auto=update
Property changes on: trunk/pollen-services/src/test/resources/pollen-services.properties
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-04-30 10:05:11 UTC (rev 3890)
+++ trunk/pom.xml 2014-04-30 11:26:00 UTC (rev 3891)
@@ -177,6 +177,7 @@
<shiroVersion>1.2.2</shiroVersion>
<slf4jVersion>1.7.6</slf4jVersion>
<jettyVersion>9.0.3.v20130506</jettyVersion>
+ <tomcatEmbedVersion>7.0.47</tomcatEmbedVersion>
<hibernateVersion>4.3.5.Final</hibernateVersion>
<seleniumVersion>2.33.0</seleniumVersion>
<mockitoVersion>1.9.5</mockitoVersion>
@@ -313,12 +314,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.debux.webmotion</groupId>
- <artifactId>webmotion-extra-jpa</artifactId>
- <version>${webmotionVersion}</version>
- </dependency>
-
<!-- Nuiton libs -->
<dependency>
@@ -458,11 +453,32 @@
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
- <version>7.0.41</version>
+ <version>${tomcatEmbedVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-juli</artifactId>
+ <version>${tomcatEmbedVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-log4j</artifactId>
+ <version>${tomcatEmbedVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-jasper</artifactId>
+ <version>${tomcatEmbedVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
1
0
r3890 - in trunk/pollen-ui-angular/src/main/webapp: css js js/controllers partials
by garandel@users.chorem.org 30 Apr '14
by garandel@users.chorem.org 30 Apr '14
30 Apr '14
Author: garandel
Date: 2014-04-30 12:05:11 +0200 (Wed, 30 Apr 2014)
New Revision: 3890
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3890
Log:
add second interface for create and vote
Added:
trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html
trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html
trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
Removed:
trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
Modified:
trunk/pollen-ui-angular/src/main/webapp/css/style.css
trunk/pollen-ui-angular/src/main/webapp/js/app.js
trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
Modified: trunk/pollen-ui-angular/src/main/webapp/css/style.css
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/css/style.css 2014-04-29 19:10:38 UTC (rev 3889)
+++ trunk/pollen-ui-angular/src/main/webapp/css/style.css 2014-04-30 10:05:11 UTC (rev 3890)
@@ -85,38 +85,24 @@
color: rgb(150, 150, 150);
}
-#voteForm .choice {
- background-position: center;
- background-repeat: no-repeat;
- text-align: center;
-}
-
-#voteForm .selected {
- background-color: #6f6;
-}
-
-#voteForm .notSelected {
- background-color: #f66;
-}
-
-#voteForm .voteBeforeChoice {
- background-color: #ff6;
-}
-
.pollTitle, .pollDesc {
margin-top:15px;
min-height:60px;
- border:1px dashed #AAAAAA;
border-radius:5px;
padding-left:5px;
margin-bottom:30px;
}
+
+.pollTitle input[type="text"] {
+ width:99%;
+}
+
.pollAnim {
- background-color:#F8F8F8;
+ background-color:inherit;
transition-duration:0.8s;
}
.pollAnim:hover {
- background:#CCD8DD;
+ background:#DDDDDD;
transition-duration: 0.8s;
}
.pollTitle input {
@@ -146,11 +132,11 @@
padding-right:5px;
padding-top:10px;
padding-bottom:5px;
- border: 1px dashed #AAAAAA;
text-align:center;
+ border:1px solid #DDD;
}
-.
-pollChoice input[type=text]{
+
+.pollChoice input[type=text]{
height:25px;
width:140px;
}
@@ -170,4 +156,31 @@
.fixe-input .ng-hide {
display:inline-block !important;
visibility:hidden;
+}
+
+.pollBigChoice {
+ border-bottom:1px solid #DDDDDD;
+ text-align:right;
+}
+.pollBigChoice h3 {
+ background-color:rgba(0,0,0,0.1);
+ padding:5px;
+ height:40px;
+}
+.pollBigChoice button {
+ height:30px;
+}
+.pollBigChoice p {
+ text-align:justify;
+}
+.pollBigChoice textarea {
+ width:99%;
+}
+.pollBigChoice h3 input[type=text] {
+ width:99%;
+ text-align:right;
+}
+.pollBigChoice .pollChoiceInput {
+ margin-top:20px;
+ text-align:center;
}
\ No newline at end of file
Modified: trunk/pollen-ui-angular/src/main/webapp/js/app.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-04-29 19:10:38 UTC (rev 3889)
+++ trunk/pollen-ui-angular/src/main/webapp/js/app.js 2014-04-30 10:05:11 UTC (rev 3890)
@@ -21,11 +21,11 @@
angular.module('pollen', ["ngRoute", "pollControllers", 'ui.bootstrap'])
.config(['$routeProvider', function($routeProvider) {
- $routeProvider.when('/', {templateUrl: 'partials/home.html', controller: "HomeCtrl"})
- .when('/poll/create', {templateUrl: 'partials/poll.html', controller: "PollAdminCtrl"})
- .when('/poll/edit/:pollId', {templateUrl: 'partials/poll.html', controller:"PollAdminCtrl"})
- .when('/poll/vote', {templateUrl: 'partials/poll.html', controller :"PollVoteCtrl"})
- .when('/poll/list', {templateUrl: 'partials/poll-list.html', controller :"PollListCtrl"})
+ $routeProvider.when('/', {templateUrl: './partials/home.html', controller: "HomeCtrl"})
+ .when('/poll/create', {templateUrl: './partials/poll.html', controller: "PollAdminCtrl"})
+ .when('/poll/edit/:pollId', {templateUrl: './partials/poll.html', controller:"PollAdminCtrl"})
+ .when('/poll/vote', {templateUrl: './partials/poll.html', controller :"PollVoteCtrl"})
+ .when('/poll/list', {templateUrl: './partials/poll-list.html', controller :"PollListCtrl"})
.otherwise({redirectTo: '/'});
}])
Modified: trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-04-29 19:10:38 UTC (rev 3889)
+++ trunk/pollen-ui-angular/src/main/webapp/js/controllers/pollCtrl.js 2014-04-30 10:05:11 UTC (rev 3890)
@@ -35,6 +35,32 @@
$scope.toHTML = function (data) {
return $sce.trustAsHtml(data);
}
+
+ $scope.inlineVersion = function () {
+ $scope.poll.template = 'inline';
+ $scope.templateURL = './partials/inline-poll.html';
+ }
+
+ $scope.bigVersion = function () {
+ $scope.poll.template = 'big';
+ $scope.templateURL = './partials/big-poll.html';
+ }
+
+ var initTemplateURL = function () {
+ if (angular.isDefined($scope.poll.template)) {
+ if ($scope.poll.template == "big") {
+ $scope.bigVersion();
+ }
+ else {
+ $scope.inlineVersion();
+ }
+ }
+ else {
+ $scope.inlineVersion();
+ }
+ }
+ initTemplateURL();
+
}])
@@ -57,6 +83,7 @@
}
$scope.globalVariables.editMode = true;
+ $scope.globalVariables.create = true;
$scope.globalVariables.voted = angular.isDefined($scope.poll.votants);
$scope.globalVariables.lastType = 'text';
@@ -154,6 +181,11 @@
$controller('PollCtrl', {$scope:$scope});
$scope.globalVariables.editMode = false;
+ $scope.$watch('voteName', function (newVal) {
+ if (newVal != '') {
+ $scope.globalVariables.errorForm = false;
+ }
+ });
var initVote = function () {
$scope.voteName = "";
@@ -180,6 +212,7 @@
$scope.poll.votants.push(data);
pollStorage.put($scope.poll);
$scope.globalVariables.saved = true;
+ $scope.globalVariables.errorForm = false;
initVote();
}
else {
Added: trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html (rev 0)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/big-poll.html 2014-04-30 10:05:11 UTC (rev 3890)
@@ -0,0 +1,67 @@
+<!--
+ ~
+ ~ #%L
+ ~ Pollen :: UI (Angular)
+ ~ %%
+ ~ Copyright (C) 2009 - 2014 CodeLutin
+ ~ %%
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU Affero General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Affero General Public License
+ ~ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ~ #L%
+ ~
+ -->
+
+<div ng-repeat="choice in poll.choices" class="row pollBigChoice">
+ <div class="col-sm-10">
+
+ <div ng-click="showDesc = !showDesc" >
+ <div ng-if="choice.type == 'text'">
+ <h3 edit-me="showEdit" ng-hide="showEdit" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
+ <button class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)">...</button>
+ {{choice.name}}
+ </h3>
+ <h3 ng-show="showEdit">
+ <input type="text" ng-model="choice.name" focus-me="showEdit" ng-exit="showEdit = false" required/>
+ </h3>
+ </div>
+
+ <div ng-if="choice.type == 'date'">
+ <h3 edit-me="showEdit" ng-hide="showEdit || isOpen" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
+ <button class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)">...</button>
+ {{choice.date | date:'dd/MM/yyyy'}}
+ </h3>
+ <h3 ng-show="showEdit || isOpen">
+ <input type="text" ng-model="choice.date" datepicker-popup="dd/MM/yyyy" is-open="isOpen" focus-me="showEdit" ng-exit="showEdit = false" required/>
+ </h3>
+ </div>
+ </div>
+ <p collapse="!globalVariables.editMode && !showDesc" edit-me="showEditDesc" ng-hide="showEditDesc">{{choice.description}}</p>
+ <p ng-show="globalVariables.editMode && showEditDesc"><textarea ng-model="choice.description" focus-me="showEditDesc" ng-exit="showEditDesc = false" cols="80" rows="8"></textarea></p>
+ </div>
+ <div class="col-sm-2 pollChoiceInput">
+ <input type="checkbox" ng-model="choice.value"/>
+ </div>
+</div>
+<div class="row pollBigChoice" ng-if="globalVariables.editMode">
+ <div class="col-sm-10">
+ <button class="btn btn-info btn-large" ng-click="addChoice()">Ajouter un choix</button>
+ </div>
+ <div class="col-sm-2">
+ <button ng-click="inlineVersion()" class="btn btn-default">inline version</button>
+ </div>
+</div>
+
+<div style="float:right; margin-top:5px;">
+ <input type="text" placeholder="Votre Nom" ng-model="voteName"/>
+ <button class="btn btn-primary" >Voter</button>
+</div>
\ No newline at end of file
Copied: trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html (from rev 3889, trunk/pollen-ui-angular/src/main/webapp/partials/poll.html)
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html (rev 0)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/inline-poll.html 2014-04-30 10:05:11 UTC (rev 3890)
@@ -0,0 +1,63 @@
+<!--
+ ~
+ ~ #%L
+ ~ Pollen :: UI (Angular)
+ ~ %%
+ ~ Copyright (C) 2009 - 2014 CodeLutin
+ ~ %%
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU Affero General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Affero General Public License
+ ~ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ~ #L%
+ ~
+ -->
+
+ <table>
+ <tr>
+ <td><button ng-if="globalVariables.editMode" ng-click="bigVersion()" class="btn btn-default" >Big version</button></td>
+ <td ng-repeat="choice in poll.choices" class="pollChoice pollAnim" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
+ <div ng-if="choice.type == 'text'" edit-me="showEdit" >
+ <div ng-hide="showEdit && !globalVariables.voted" class="fixe-input" title="{{choice.description}}">{{choice.name}} <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/></div>
+ <div ng-show="showEdit && !globalVariables.voted">
+ <input type="text" class="form-control" ng-model="choice.name" focus-me="showEdit" ng-exit="showEdit = false" required/>
+ <input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/>
+ </div>
+ </div>
+ <div ng-if="choice.type == 'date'" edit-me="showEdit" >
+ <div ng-hide="!globalVariables.voted && showEdit || isOpen" class="fixe-input" title="{{choice.description}}">{{choice.date | date:'dd/MM/yyyy'}} <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/></div>
+ <div ng-show="!globalVariables.voted && showEdit || isOpen" >
+ <input type="text" class="form-control" ng-model="choice.date" focus-me="showEdit" datepicker-popup="dd/MM/yyyy" is-open="isOpen" ng-exit="showEdit = false" required/>
+ <input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/>
+ </div>
+ </div>
+ </td>
+ <td ng-if="!globalVariables.voted && globalVariables.editMode"><input type="button" class="btn btn-default btn-large" value="+" ng-click="addChoice()"/></td>
+ </tr>
+
+ <tr>
+ <td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="voteName" /> </td>
+ <td ng-repeat="choice in voteChoices" class="pollChoice">
+ <input type="checkbox" name="{{choice.name}}" ng-model="choice.value"/>
+ </td>
+ <td>
+ <input class="btn btn-primary btn-large" type="button" value="Vote" ng-click="vote()" />
+ </td>
+ </tr>
+
+ <tr ng-repeat="vote in poll.votants track by $index" class="pollAnim">
+ <td class="pollChoice"> {{vote.name}}</td>
+ <td ng-repeat="choice in vote.choices" class="pollChoice">
+ <input type="checkbox" ng-model="choice.value" disabled/>
+ </td>
+ </tr>
+ </table>
+
Deleted: trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-04-29 19:10:38 UTC (rev 3889)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-04-30 10:05:11 UTC (rev 3890)
@@ -1,97 +0,0 @@
-<!--
- ~
- ~ #%L
- ~ Pollen :: UI (Angular)
- ~ %%
- ~ Copyright (C) 2009 - 2014 CodeLutin
- ~ %%
- ~ This program is free software: you can redistribute it and/or modify
- ~ it under the terms of the GNU Affero General Public License as published by
- ~ the Free Software Foundation, either version 3 of the License, or
- ~ (at your option) any later version.
- ~
- ~ This program is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
- ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ~ GNU General Public License for more details.
- ~
- ~ You should have received a copy of the GNU Affero General Public License
- ~ along with this program. If not, see <http://www.gnu.org/licenses/>.
- ~ #L%
- ~
- -->
-<form class="form-inline" name="pollForm" novalidate>
-
- <alert type="'danger'" ng-if="globalVariables.errorForm"> Champ non remplie </alert>
- <alert type="'success'" ng-if="globalVariables.editMode && globalVariables.saved"> Sondage sauvegardé..</alert>
- <alert type="'success'" ng-if="!globalVariables.editMode && globalVariables.saved"> Vote effectué.. </alert>
-
- <alert type="'warning'" ng-if="globalVariables.voted"> Les votes ont commencé, certaine modification sont inaccessible.. </alert>
-
- <div class="pollTitle pollAnim" edit-me="showEditTitle">
- <h1 ng-hide="showEditTitle"> {{poll.title || 'Click Me for Editing'}} </h1>
-
- <h1 ng-show="showEditTitle"><input type="text" class="form-control" focus-me="showEditTitle" ng-model="poll.title" ng-exit="showEditTitle = false" required/></h1>
- </div>
-
- <div ng-hide="showEditDesc" class="pollDesc pollAnim" edit-me="showEditDesc">
- <div> </div>
- <div ng-bind-html="toHTML(poll.description || 'Description (Facultatif). Ce cadre disparait si aucune description n\'est mise')"></div>
- </div>
- <div ng-show="showEditDesc" class="pollDesc " ng-exit="showEditDesc = false;">
- <textarea id="descEditor" data-ck-editor ng-model="poll.description"></textarea>
-
- <input type="button" value="Return" class="btn btn-primary" ng-click="showEditDesc = false;"/>
- </div>
-
- <div id="poll">
- <table>
- <tr>
- <td class="pollChoice"></td>
- <td ng-repeat="choice in poll.choices" class="pollChoice pollAnim" ng-mouseenter="showEditHover = true" ng-mouseleave="showEditHover = false">
- <div ng-if="choice.type == 'text'" edit-me="showEdit" >
- <div ng-hide="showEdit && !globalVariables.voted" class="fixe-input" title="{{choice.description}}">{{choice.name}} <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/></div>
- <div ng-show="showEdit && !globalVariables.voted">
- <input type="text" class="form-control" ng-model="choice.name" focus-me="showEdit" ng-exit="showEdit = false" required/>
- <input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/>
- </div>
- </div>
- <div ng-if="choice.type == 'date'" edit-me="showEdit" >
- <div ng-hide="!globalVariables.voted && showEdit || isOpen" class="fixe-input" title="{{choice.description}}">{{choice.date | date:'dd/MM/yyyy'}} <input type="button" class="btn btn-default" ng-if="!globalVariables.voted && globalVariables.editMode" ng-show="showEditHover" ng-click="editChoice(choice)" value="..."/></div>
- <div ng-show="!globalVariables.voted && showEdit || isOpen" >
- <input type="text" class="form-control" ng-model="choice.date" focus-me="showEdit" datepicker-popup="dd/MM/yyyy" is-open="isOpen" ng-exit="showEdit = false" required/>
- <input type="button" class="btn btn-default" data-toggle="modal" data-target="#popupAddChoice" ng-click="editChoice(choice)" value="..."/>
- </div>
- </div>
- </td>
- <td ng-if="!globalVariables.voted && globalVariables.editMode"><input type="button" class="btn btn-default btn-large" value="+" ng-click="addChoice()"/></td>
- </tr>
-
- <tr>
- <td class="pollChoice"> <input type="text" class="form-control" placeholder="votre nom" ng-model="voteName" /> </td>
- <td ng-repeat="choice in voteChoices" class="pollChoice">
- <input type="checkbox" name="{{choice.name}}" ng-model="choice.value"/>
- </td>
- <td>
- <input class="btn btn-primary btn-large" type="button" value="Vote" ng-click="vote()" />
- </td>
- </tr>
-
- <tr ng-repeat="vote in poll.votants track by $index" class="pollAnim">
- <td class="pollChoice"> {{vote.name}}</td>
- <td ng-repeat="choice in vote.choices" class="pollChoice">
- <input type="checkbox" ng-model="choice.value" disabled/>
- </td>
- </tr>
- </table>
-
- <div ng-if="globalVariables.editMode">
- <button class="btn btn-primary" ng-click="save()">Save</button>
- <button class="btn btn-warning" ng-click="reset();" ng-if="!globalVariables.voted">Reset</button>
- <button class="btn btn-danger" ng-click="delete();">Delete</button>
- </div>
-
-
- </div>
-</form>
-
Added: trunk/pollen-ui-angular/src/main/webapp/partials/poll.html
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/partials/poll.html (rev 0)
+++ trunk/pollen-ui-angular/src/main/webapp/partials/poll.html 2014-04-30 10:05:11 UTC (rev 3890)
@@ -0,0 +1,38 @@
+<form class="form-inline" name="pollForm" novalidate>
+
+ <alert type="'danger'" ng-if="globalVariables.errorForm"> Champ non remplie </alert>
+ <alert type="'success'" ng-if="globalVariables.editMode && globalVariables.saved"> Sondage sauvegardé..</alert>
+ <alert type="'success'" ng-if="!globalVariables.editMode && globalVariables.saved"> Vote effectué.. </alert>
+
+ <alert type="'warning'" ng-if="globalVariables.voted"> Les votes ont commencé, certaine modification sont inaccessible.. </alert>
+
+ <div class="pollTitle" edit-me="showEditTitle">
+ <h1 ng-hide="showEditTitle"> {{poll.title || 'Click Me for Editing'}} </h1>
+
+ <h1 ng-show="showEditTitle"><input type="text" class="form-control" focus-me="showEditTitle" ng-model="poll.title" ng-exit="showEditTitle = false" required/></h1>
+ </div>
+
+ <div ng-hide="showEditDesc" class="pollDesc" edit-me="showEditDesc">
+ <div ng-bind-html="toHTML(poll.description || 'Description (Facultatif). Ce cadre disparait si aucune description n\'est mise')"></div>
+ </div>
+ <div ng-show="showEditDesc" class="pollDesc " ng-exit="showEditDesc = false;">
+ <textarea id="descEditor" data-ck-editor ng-model="poll.description"></textarea>
+
+ <input type="button" value="Return" class="btn btn-primary" ng-click="showEditDesc = false;"/>
+ </div>
+
+ <div id="poll">
+
+ <div ng-include="templateURL"></div>
+
+ </div>
+
+ <div ng-if="globalVariables.create">
+ <hr/>
+ <button type="button" class="btn btn-default" ng-model="globalVariables.editMode" btn-checkbox>Mode Edition</button>
+ <button class="btn btn-primary" ng-click="save()">Save</button>
+ <button class="btn btn-warning" ng-click="reset();" ng-if="!globalVariables.voted">Reset</button>
+ <button class="btn btn-danger" ng-click="delete();">Delete</button>
+ </div>
+
+</form>
\ No newline at end of file
1
0
r3889 - in trunk: pollen-persistence/src/main/xmi pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1 pollen-rest-api/src/main/resources pollen-rest-api/src/test/java/org/chorem/pollen/rest/api pollen-services/src/main/java/org/chorem/pollen/services/service pollen-services/src/test/java/org/chorem/pollen/service
by tchemit@users.chorem.org 29 Apr '14
by tchemit@users.chorem.org 29 Apr '14
29 Apr '14
Author: tchemit
Date: 2014-04-29 21:10:38 +0200 (Tue, 29 Apr 2014)
New Revision: 3889
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3889
Log:
pass ChoiceType to Choice, no more to Poll + add Rest Doc action + begin to add Rest API tests
Added:
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocService.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
Modified:
trunk/pollen-persistence/src/main/xmi/pollen.zargo
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java
trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java
trunk/pollen-rest-api/src/main/resources/mapping
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java
trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java
trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
Modified: trunk/pollen-persistence/src/main/xmi/pollen.zargo
===================================================================
(Binary files differ)
Added: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocService.java (rev 0)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocService.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -0,0 +1,29 @@
+package org.chorem.pollen.rest.api.v1;
+
+import org.apache.commons.io.IOUtils;
+import org.debux.webmotion.server.WebMotionController;
+import org.debux.webmotion.server.render.Render;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * Created on 4/29/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+public class DocService extends WebMotionController {
+
+ public Render showMapping() {
+
+ InputStream mappingUrl = getClass().getResourceAsStream("/mapping");
+ try {
+ String content = IOUtils.toString(mappingUrl);
+ return renderContent(content, "text/plain");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ }
+}
Property changes on: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/DocService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollService.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -23,7 +23,6 @@
* #L%
*/
-import org.chorem.pollen.persistence.entity.ChoiceType;
import org.chorem.pollen.persistence.entity.Poll;
import org.chorem.pollen.rest.api.PollenRestApiRequestContext;
import org.chorem.pollen.services.exception.EntityNotFoundException;
@@ -41,8 +40,8 @@
*/
public class PollService extends WebMotionController {
- public Poll getNewPoll(PollenRestApiRequestContext context, String userId, ChoiceType choiceType) throws EntityNotFoundException {
- return context.getPollService().getNewPoll(userId, choiceType);
+ public Poll getNewPoll(PollenRestApiRequestContext context, String userId) throws EntityNotFoundException {
+ return context.getPollService().getNewPoll(userId);
}
public Set<Poll> getPolls(PollenRestApiRequestContext context, String userId) throws EntityNotFoundException {
Modified: trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java
===================================================================
--- trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-rest-api/src/main/java/org/chorem/pollen/rest/api/v1/PollenUserService.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -62,6 +62,11 @@
return context.getPollenUserService().editUser(user);
}
+ public void deleteUser(PollenRestApiRequestContext context,
+ String userId) throws EntityNotFoundException, InvalidPollenUserFormException {
+ context.getPollenUserService().deleteUser(userId);
+ }
+
public void validateUserEmail(PollenRestApiRequestContext context,
String userId,
String token) throws EntityNotFoundException, UserInvalidEmailActivationTokenException {
Modified: trunk/pollen-rest-api/src/main/resources/mapping
===================================================================
--- trunk/pollen-rest-api/src/main/resources/mapping 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-rest-api/src/main/resources/mapping 2014-04-29 19:10:38 UTC (rev 3889)
@@ -26,6 +26,9 @@
[actions]
+# Doc
+
+GET /v1/doc DocService.showMapping
# AuthService
PUT /v1/login AuthService.login
@@ -84,6 +87,7 @@
GET /v1/users/{userId} PollenUserService.getUser
POST /v1/users PollenUserService.createUser
PUT /v1/users/{userId} PollenUserService.editUser
+DELETE /v1/users/{userId} PollenUserService.deleteUser
PUT /v1/users/{userId}?token={} PollenUserService.validateUserEmail
# VoteCountingService
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/FakePollenRestApiApplicationContext.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -30,6 +30,7 @@
import org.chorem.pollen.services.PollenServiceContext;
import org.chorem.pollen.services.config.PollenServiceConfig;
import org.hibernate.cfg.Environment;
+import org.nuiton.util.DateUtil;
import java.io.File;
import java.util.HashMap;
@@ -72,6 +73,7 @@
serviceContext.setPollenServiceConfig(getApplicationConfig());
serviceContext.setTopiaApplicationContext(getTopiaApplicationContext());
serviceContext.setLocale(locale);
+ serviceContext.setDate(DateUtil.createDate(1, 1, 2014));
return serviceContext;
}
Added: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java (rev 0)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -0,0 +1,110 @@
+package org.chorem.pollen.rest.api;
+
+import org.apache.http.client.fluent.Request;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.net.URISyntaxException;
+
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * Created on 4/29/14.
+ *
+ * @author Tony Chemit <chemit(a)codelutin.com>
+ * @since 2.0
+ */
+@Ignore
+public class PollServiceTest extends AbstractPollenRestApiTest {
+
+ @Test
+ public void getPollsNew() throws URISyntaxException, IOException {
+ Request request = createRequest("/v1/polls/new").Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void getPolls() throws URISyntaxException, IOException {
+ Request request = createRequest("/v1/polls").Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void getPollsCreated() throws URISyntaxException, IOException {
+ Request request = createRequest("/v1/polls/created").Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void getPollsInvited() throws URISyntaxException, IOException {
+ Request request = createRequest("/v1/polls/invited").Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void getPollsParticipated() throws URISyntaxException, IOException {
+ Request request = createRequest("/v1/polls/participated").Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void getPoll() throws URISyntaxException, IOException {
+ String pollId = "";
+ Request request = createRequest("/v1/polls/" + pollId).Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void postPoll() throws URISyntaxException, IOException {
+ Request request = createRequest("/v1/polls").Post();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void putPoll() throws URISyntaxException, IOException {
+ String pollId = "";
+ Request request = createRequest("/v1/polls/" + pollId).Put();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void deletePoll() throws URISyntaxException, IOException {
+ String pollId = "";
+ Request request = createRequest("/v1/polls/" + pollId).Delete();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void clonePoll() throws URISyntaxException, IOException {
+ String pollId = "";
+ Request request = createRequest("/v1/polls/" + pollId).Post();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void exportPoll() throws URISyntaxException, IOException {
+ String pollId = "";
+ Request request = createRequest("/v1/polls/" + pollId + "/export").Get();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+
+ @Test
+ public void closePoll() throws URISyntaxException, IOException {
+ String pollId = "";
+ Request request = createRequest("/v1/polls/" + pollId + "/close").Post();
+ String content = request.execute().returnContent().asString();
+ assertNotNull(content);
+ }
+}
Property changes on: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollServiceTest.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision
Added: svn:eol-style
+ native
Modified: trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java
===================================================================
--- trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-rest-api/src/test/java/org/chorem/pollen/rest/api/PollenUserServiceTest.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -25,6 +25,7 @@
import org.apache.http.client.fluent.Request;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
@@ -35,6 +36,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 2.0
*/
+@Ignore
public class PollenUserServiceTest extends AbstractPollenRestApiTest {
@@ -45,38 +47,53 @@
}
@Test
- public void testGetUsers() throws Exception {
+ public void getUsers() throws Exception {
Request request = createRequest("/v1/users").Get();
String result = request.execute().returnContent().asString();
assertTrue(result.contains("email"));
+ }
+ @Test
+ public void getUser() throws Exception {
+ String userId = "";
+ Request request = createRequest("/v1/users/" + userId).Get();
+ String result = request.execute().returnContent().asString();
+ assertTrue(result.contains("email"));
}
-// @Test
-// public void testGetUser() throws Exception {
-//
-// }
-//
-// @Test
-// public void testCreateUser() throws Exception {
-//
-// }
-//
-// @Test
-// public void testEditUser() throws Exception {
-//
-// }
-//
-// @Test
-// public void testValidateUserEmail() throws Exception {
-//
-// }
-//
-// @Test
-// public void testChangePassword() throws Exception {
-//
-// }
+ @Test
+ public void postUser() throws Exception {
+ Request request = createRequest("/v1/users").Post();
+ String result = request.execute().returnContent().asString();
+
+ assertTrue(result.contains("email2"));
+ }
+
+ @Test
+ public void putUser() throws Exception {
+ String userId = "";
+ Request request = createRequest("/v1/users/" + userId).Get();
+ String result = request.execute().returnContent().asString();
+ assertTrue(result.contains("email3"));
+ }
+
+ @Test
+ public void deleteUser() throws Exception {
+ String userId = "";
+ Request request = createRequest("/v1/users/" + userId).Delete();
+ String result = request.execute().returnContent().asString();
+ assertTrue(result.contains("OK!"));
+ }
+
+ @Test
+ public void validateUserEmail() throws Exception {
+ String userId = "";
+ String token = "";
+ Request request = createRequest("/v1/users/" + userId + "?token=" + token).Put();
+ String result = request.execute().returnContent().asString();
+ assertTrue(result.contains("OK!"));
+ }
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/ChoiceService.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -120,8 +120,7 @@
return result;
}
- protected Choice saveChoice(Poll poll,
- Choice choice) throws EntityNotFoundException {
+ protected Choice saveChoice(Poll poll, Choice choice) throws EntityNotFoundException {
ChoiceTopiaDao choiceDao = getChoiceDao();
@@ -151,7 +150,7 @@
poll.addChoice(choiceToPersist);
}
- switch (poll.getChoiceType()) {
+ switch (choice.getChoiceType()) {
case TEXT:
choiceToPersist.setName(choice.getName());
@@ -178,21 +177,22 @@
Set<String> choiceNames = Sets.newHashSet();
+ checkNotNull(errors, "choiceType", choice.getChoiceType(), "choiceType can not be null");
if (!poll.isChoiceEmpty()) {
// get all used names
- for (Choice member : poll.getChoice()) {
+ for (Choice choice1 : poll.getChoice()) {
if (choiceExists &&
- member.getTopiaId().equals(choice.getTopiaId())) {
+ choice1.getTopiaId().equals(choice.getTopiaId())) {
continue;
}
- choiceNames.add(member.getName());
+ choiceNames.add(choice1.getName());
}
}
- switch (poll.getChoiceType()) {
+ switch (choice.getChoiceType()) {
case TEXT:
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollService.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -30,7 +30,6 @@
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils;
import org.chorem.pollen.persistence.entity.Choice;
-import org.chorem.pollen.persistence.entity.ChoiceType;
import org.chorem.pollen.persistence.entity.Poll;
import org.chorem.pollen.persistence.entity.PollTopiaDao;
import org.chorem.pollen.persistence.entity.PollenPrincipal;
@@ -88,12 +87,10 @@
return result;
}
- public Poll getNewPoll(String userId, ChoiceType choiceType) throws EntityNotFoundException {
+ public Poll getNewPoll(String userId) throws EntityNotFoundException {
Poll result = getPollDao().newInstance();
- result.setChoiceType(choiceType);
-
// -- default values -- //
result.setVoteCountingType(getPollenServiceConfig().getDefaultVoteCountingType());
@@ -232,7 +229,7 @@
toSave.setVoteCountingType(poll.getVoteCountingType());
toSave.setVoteVisibility(poll.getVoteVisibility());
toSave.setCommentVisibility(poll.getCommentVisibility());
- toSave.setChoiceType(poll.getChoiceType());
+// toSave.setChoiceType(poll.getChoiceType());
toSave.setAnonymousVoteAllowed(poll.isAnonymousVoteAllowed());
toSave.setChoiceAddAllowed(poll.isChoiceAddAllowed());
@@ -273,7 +270,6 @@
Multimap<String, String> errors = ArrayListMultimap.create();
checkNotNull(errors, "pollType", poll.getPollType(), "pollType can not be null");
- checkNotNull(errors, "choiceType", poll.getChoiceType(), "choiceType can not be null");
checkNotNull(errors, "commentVisibility", poll.getCommentVisibility(), "commentVisibility can not be null");
checkNotNull(errors, "voteVisibility", poll.getVoteVisibility(), "voteVisibility can not be null");
checkNotNull(errors, "voteCountingType", poll.getVoteCountingType(), "voteCountingType can not be null");
@@ -299,21 +295,27 @@
String choiceField = "choice[" + (choiceIndex++) + "]";
- switch (poll.getChoiceType()) {
+ checkNotNull(errors,
+ choiceField + ".choiceType",
+ choice.getChoiceType(),
+ "choiceType can not be null");
+ if (choice.getChoiceType()!=null) {
+ switch (choice.getChoiceType()) {
- case TEXT:
+ case TEXT:
- checkNotBlank(errors,
- choiceField + ".name",
- choice.getName(),
- "choice name can not be empty");
+ checkNotBlank(errors,
+ choiceField + ".name",
+ choice.getName(),
+ "choice name can not be empty");
- break;
- case DATE:
- throw new IllegalStateException("Not implemented");
+ break;
+ case DATE:
+ throw new IllegalStateException("Not implemented");
- case IMAGE:
- throw new IllegalStateException("Not implemented");
+ case IMAGE:
+ throw new IllegalStateException("Not implemented");
+ }
}
}
}
Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java
===================================================================
--- trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/service/PollenUserService.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -97,6 +97,14 @@
return result;
}
+ public void deleteUser(String userId) throws EntityNotFoundException, InvalidPollenUserFormException {
+ Preconditions.checkNotNull(userId);
+
+ PollenUser user = getUser(userId);
+ getPollenUserDao().delete(user);
+ commit();
+ }
+
public void changePassword(String userId,
String oldPassword,
String newPassword) throws EntityNotFoundException, UserInvalidPasswordException {
Modified: trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java
===================================================================
--- trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2014-04-29 09:46:36 UTC (rev 3888)
+++ trunk/pollen-services/src/test/java/org/chorem/pollen/service/PollServiceTest.java 2014-04-29 19:10:38 UTC (rev 3889)
@@ -71,7 +71,7 @@
@Test
public void testCreateFreePoll() throws EntityNotFoundException, InvalidPollFormException {
- Poll poll = service.getNewPoll(null, ChoiceType.TEXT);
+ Poll poll = service.getNewPoll(null);
poll.setPollType(PollType.FREE);
@@ -91,6 +91,14 @@
try {
service.createPoll(null, poll);
} catch (InvalidPollFormException e) {
+ // missing choice type
+ assertErrorKeyFound(e, "choice[0].choiceType");
+ }
+
+ choice1.setChoiceType(ChoiceType.TEXT);
+ try {
+ service.createPoll(null, poll);
+ } catch (InvalidPollFormException e) {
// missing choice name
assertErrorKeyFound(e, "choice[0].name");
}
@@ -100,6 +108,7 @@
Choice choice2 = new ChoiceImpl();
+ choice2.setChoiceType(ChoiceType.TEXT);
choice2.setName("A");
choice2.setDescription("Choice B");
poll.addChoice(choice2);
@@ -165,18 +174,20 @@
@Test
public void testCreateRestrictedPoll() throws EntityNotFoundException, InvalidPollFormException {
- Poll poll = service.getNewPoll(null, ChoiceType.TEXT);
+ Poll poll = service.getNewPoll(null);
poll.setPollType(PollType.RESTRICTED);
poll.setTitle("poll1");
Choice choice1 = new ChoiceImpl();
+ choice1.setChoiceType(ChoiceType.TEXT);
choice1.setName("A");
choice1.setDescription("Choice A");
poll.addChoice(choice1);
Choice choice2 = new ChoiceImpl();
+ choice2.setChoiceType(ChoiceType.TEXT);
choice2.setName("B");
choice2.setDescription("Choice B");
1
0
r3888 - in trunk: pollen-rest-api pollen-ui-angular/src/main/webapp/WEB-INF
by tchemit@users.chorem.org 29 Apr '14
by tchemit@users.chorem.org 29 Apr '14
29 Apr '14
Author: tchemit
Date: 2014-04-29 11:46:36 +0200 (Tue, 29 Apr 2014)
New Revision: 3888
Url: http://forge.chorem.org/projects/pollen/repository/revisions/3888
Log:
fix ui-angular war deploy
Modified:
trunk/pollen-rest-api/pom.xml
trunk/pollen-ui-angular/src/main/webapp/WEB-INF/web.xml
Modified: trunk/pollen-rest-api/pom.xml
===================================================================
--- trunk/pollen-rest-api/pom.xml 2014-04-29 09:37:51 UTC (rev 3887)
+++ trunk/pollen-rest-api/pom.xml 2014-04-29 09:46:36 UTC (rev 3888)
@@ -137,7 +137,6 @@
<defaultLogDir>${basedir}/target</defaultLogDir>
<defaultDbDir>${basedir}/target</defaultDbDir>
- <deployFiles>target/${project.build.finalName}.war</deployFiles>
</properties>
<build>
<resources>
Modified: trunk/pollen-ui-angular/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/pollen-ui-angular/src/main/webapp/WEB-INF/web.xml 2014-04-29 09:37:51 UTC (rev 3887)
+++ trunk/pollen-ui-angular/src/main/webapp/WEB-INF/web.xml 2014-04-29 09:46:36 UTC (rev 3888)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-
+
<web-app version="3.0" id="pollen-ui-angular"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1
0