Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
embedmongo-maven-plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
We are moving to Forgejo!
You are on a read-only GitLab instance.
Show more breadcrumbs
Jeffrey Phillips Freeman
embedmongo-maven-plugin
Commits
21c93c23
Commit
21c93c23
authored
11 years ago
by
Joe Littlejohn
Browse files
Options
Downloads
Patches
Plain Diff
WIP
parent
22c724fa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/com/github/joelittlejohn/embedmongo/StartEmbeddedMongoMojo.java
+22
-1
22 additions, 1 deletion
...thub/joelittlejohn/embedmongo/StartEmbeddedMongoMojo.java
with
22 additions
and
1 deletion
src/main/java/com/github/joelittlejohn/embedmongo/StartEmbeddedMongoMojo.java
+
22
−
1
View file @
21c93c23
...
@@ -55,6 +55,8 @@ import de.flapdoodle.embed.mongo.distribution.Versions;
...
@@ -55,6 +55,8 @@ import de.flapdoodle.embed.mongo.distribution.Versions;
import
de.flapdoodle.embed.process.config.IRuntimeConfig
;
import
de.flapdoodle.embed.process.config.IRuntimeConfig
;
import
de.flapdoodle.embed.process.config.io.ProcessOutput
;
import
de.flapdoodle.embed.process.config.io.ProcessOutput
;
import
de.flapdoodle.embed.process.config.store.IDownloadConfig
;
import
de.flapdoodle.embed.process.config.store.IDownloadConfig
;
import
de.flapdoodle.embed.process.config.store.ITimeoutConfig
;
import
de.flapdoodle.embed.process.config.store.TimeoutConfigBuilder
;
import
de.flapdoodle.embed.process.distribution.Distribution
;
import
de.flapdoodle.embed.process.distribution.Distribution
;
import
de.flapdoodle.embed.process.distribution.IVersion
;
import
de.flapdoodle.embed.process.distribution.IVersion
;
import
de.flapdoodle.embed.process.exceptions.DistributionException
;
import
de.flapdoodle.embed.process.exceptions.DistributionException
;
...
@@ -198,6 +200,16 @@ public class StartEmbeddedMongoMojo extends AbstractMojo {
...
@@ -198,6 +200,16 @@ public class StartEmbeddedMongoMojo extends AbstractMojo {
*/
*/
private
boolean
authEnabled
;
private
boolean
authEnabled
;
/**
* The number of <b>seconds</b> to allow (when downloading MongoDB) for the
* TCP handshake to complete (connection timeout), and the number of seconds
* to allow the download to be idle for (no bytes received) before throwing
* a timeout exception (read timeout).
*
* @parameter expression="${embedmongo.timeout}" default-value="60"
*/
private
int
timeout
=
60
;
/**
/**
* The maven project.
* The maven project.
*
*
...
@@ -304,7 +316,11 @@ public class StartEmbeddedMongoMojo extends AbstractMojo {
...
@@ -304,7 +316,11 @@ public class StartEmbeddedMongoMojo extends AbstractMojo {
}
}
private
IArtifactStore
getArtifactStore
()
{
private
IArtifactStore
getArtifactStore
()
{
IDownloadConfig
downloadConfig
=
new
DownloadConfigBuilder
().
defaultsForCommand
(
Command
.
MongoD
).
downloadPath
(
downloadPath
).
build
();
IDownloadConfig
downloadConfig
=
new
DownloadConfigBuilder
()
.
defaultsForCommand
(
Command
.
MongoD
)
.
downloadPath
(
downloadPath
)
.
timeoutConfig
(
getTimeoutConfig
()).
build
();
return
new
ArtifactStoreBuilder
().
defaults
(
Command
.
MongoD
).
download
(
downloadConfig
).
build
();
return
new
ArtifactStoreBuilder
().
defaults
(
Command
.
MongoD
).
download
(
downloadConfig
).
build
();
}
}
...
@@ -366,4 +382,9 @@ public class StartEmbeddedMongoMojo extends AbstractMojo {
...
@@ -366,4 +382,9 @@ public class StartEmbeddedMongoMojo extends AbstractMojo {
}
}
}
}
private
ITimeoutConfig
getTimeoutConfig
()
{
int
timeoutMillis
=
(
int
)
TimeUnit
.
SECONDS
.
toMillis
(
timeout
);
return
new
TimeoutConfigBuilder
().
defaults
().
readTimeout
(
timeoutMillis
).
build
();
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment