-
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9825 from renanfranca/9743-add-missing-frontend-s…
…erver-plugin add missing frontend server plugin
- Loading branch information
Showing
19 changed files
with
318 additions
and
101 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...or/server/javatool/frontendmaven/application/FrontendJavaBuildToolApplicationService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package tech.jhipster.lite.generator.server.javatool.frontendmaven.application; | ||
|
||
import org.springframework.stereotype.Service; | ||
import tech.jhipster.lite.generator.server.javatool.frontendmaven.domain.FrontendJavaBuildToolModuleFactory; | ||
import tech.jhipster.lite.module.domain.JHipsterModule; | ||
import tech.jhipster.lite.module.domain.npm.NpmVersions; | ||
import tech.jhipster.lite.module.domain.properties.JHipsterModuleProperties; | ||
|
||
@Service | ||
public class FrontendJavaBuildToolApplicationService { | ||
|
||
private final FrontendJavaBuildToolModuleFactory factory; | ||
|
||
public FrontendJavaBuildToolApplicationService(NpmVersions npmVersions) { | ||
factory = new FrontendJavaBuildToolModuleFactory(npmVersions); | ||
} | ||
|
||
public JHipsterModule buildFrontendMavenModule(JHipsterModuleProperties properties) { | ||
return factory.buildFrontendMavenModule(properties); | ||
} | ||
|
||
public JHipsterModule buildFrontendGradleModule(JHipsterModuleProperties properties) { | ||
return factory.buildFrontendGradleModule(properties); | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
.../generator/server/javatool/frontendmaven/application/FrontendMavenApplicationService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...vatool/frontendmaven/infrastructure/primary/FrontendJavaBuildToolModuleConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package tech.jhipster.lite.generator.server.javatool.frontendmaven.infrastructure.primary; | ||
|
||
import static tech.jhipster.lite.generator.slug.domain.JHLiteFeatureSlug.*; | ||
import static tech.jhipster.lite.generator.slug.domain.JHLiteModuleSlug.*; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import tech.jhipster.lite.generator.server.javatool.frontendmaven.application.FrontendJavaBuildToolApplicationService; | ||
import tech.jhipster.lite.module.domain.resource.JHipsterModuleOrganization; | ||
import tech.jhipster.lite.module.domain.resource.JHipsterModulePropertiesDefinition; | ||
import tech.jhipster.lite.module.domain.resource.JHipsterModuleResource; | ||
|
||
@Configuration | ||
class FrontendJavaBuildToolModuleConfiguration { | ||
|
||
@Bean | ||
JHipsterModuleResource frontendMavenModule(FrontendJavaBuildToolApplicationService frontendJavaBuildTool) { | ||
return JHipsterModuleResource.builder() | ||
.slug(FRONTEND_MAVEN_PLUGIN) | ||
.propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addBasePackage().addProjectBaseName().addIndentation().build()) | ||
.apiDoc("Frontend Maven Plugin", "Add Frontend Maven Plugin") | ||
.organization( | ||
JHipsterModuleOrganization.builder() | ||
.feature(FRONTEND_JAVA_BUILD_TOOL_PLUGIN) | ||
.addDependency(SPRING_SERVER) | ||
.addDependency(CLIENT_CORE) | ||
.addDependency(MAVEN_JAVA) | ||
.build() | ||
) | ||
.tags("server", "tools") | ||
.factory(frontendJavaBuildTool::buildFrontendMavenModule); | ||
} | ||
|
||
@Bean | ||
JHipsterModuleResource frontendGradleModule(FrontendJavaBuildToolApplicationService frontendJavaBuildTool) { | ||
return JHipsterModuleResource.builder() | ||
.slug(NODE_GRADLE_PLUGIN) | ||
.propertiesDefinition(JHipsterModulePropertiesDefinition.builder().addBasePackage().addProjectBaseName().addIndentation().build()) | ||
.apiDoc("Frontend Gradle Plugin", "Add node-gradle plugin for building frontend with Gradle") | ||
.organization( | ||
JHipsterModuleOrganization.builder() | ||
.feature(FRONTEND_JAVA_BUILD_TOOL_PLUGIN) | ||
.addDependency(SPRING_SERVER) | ||
.addDependency(CLIENT_CORE) | ||
.addDependency(GRADLE_JAVA) | ||
.build() | ||
) | ||
.tags("server", "tools") | ||
.factory(frontendJavaBuildTool::buildFrontendGradleModule); | ||
} | ||
} |
26 changes: 0 additions & 26 deletions
26
...erver/javatool/frontendmaven/infrastructure/primary/FrontendMavenModuleConfiguration.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/test/features/server/javatool/frontend-java-build-tool.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Feature: Frontend server module | ||
|
||
Scenario: Should apply frontend server maven module | ||
When I apply "frontend-maven-plugin" module to default project with maven file | ||
| packageName | tech.jhipster.chips | | ||
| baseName | jhipster | | ||
Then I should have files in "src/main/java/tech/jhipster/chips/wire/frontend/infrastructure/primary" | ||
| RedirectionResource.java | | ||
|
||
Scenario: Should apply frontend server gradle module | ||
When I apply "node-gradle-plugin" module to default project with gradle build | ||
| packageName | tech.jhipster.chips | | ||
| baseName | jhipster | | ||
Then I should have files in "src/main/java/tech/jhipster/chips/wire/frontend/infrastructure/primary" | ||
| RedirectionResource.java | |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.