Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRDOCS-7081 Setting DI for Service Builder project template #4481

Merged
merged 1 commit into from
Aug 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,24 @@ mvn archetype:generate \
-DartifactId=[projectName] \
-Dpackage=[packageName] \
-DapiPath=[apiPath] \
-DdependencyInjector=[dependencyInjector] \
-DliferayVersion=7.2
```

By default, the Service Builder project uses OSGi Declarative Services (`ds`)
for its dependency injector. If you prefer using Spring, you can set the
parameter `--dependency-injector spring` with Blade CLI or
`-DdependencyInjector=spring` with Maven. See the
[Dependency Injection](/docs/7-2/frameworks/-/knowledge_base/f/dependency-injection)
section for more information on these options.

You can also insert the `-b maven` parameter in the Blade command to generate a
Maven project using Blade CLI.

The template for this kind of project is `service-builder`. Suppose you want to
create a Service Builder project called `tasks` with a package name of
`com.liferay.docs.tasks`. You could run the following command to accomplish
this:
`com.liferay.docs.tasks` using OSGi Declarative Services. You could run the
following command to accomplish this:

```bash
blade create -t service-builder -p com.liferay.docs.tasks tasks
Expand All @@ -50,6 +58,7 @@ mvn archetype:generate \
-Dpackage=com.liferay.docs.tasks \
-Dversion=1.0 \
-DapiPath=com.liferay.api.path \
-DdependencyInjector=ds \
-DliferayVersion=7.2
```

Expand Down