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

Rename pom.xml.ejs to pom.xml.jhi.ejs #690

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion generators/server/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ const serverFiles = {
{ file: '.mvn/wrapper/maven-wrapper.jar', method: 'copy', noEjs: true },
{ file: '.mvn/wrapper/maven-wrapper.properties', method: 'copy', noEjs: true },
{ file: '.mvn/wrapper/MavenWrapperDownloader.java', method: 'copy', noEjs: true },
{ file: 'pom.xml', options: { interpolate: INTERPOLATE_REGEX } },
'pom.xml.jhi',
'pom.xml.jhi.eclipse',
],
},
{
Expand Down
106 changes: 106 additions & 0 deletions generators/server/templates/pom.xml.jhi.eclipse.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<%#
Copyright 2013-2021 the original author or authors from the JHipster project.

This file is part of the JHipster project, see https://www.jhipster.tech/
for more information.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-%>
<&_ if (fragment.profilesSection) { -&>
<profile>
<!-- This is automatically activated when working in Eclipse -->
<id>eclipse</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<dependencies>
<!-- The following dependency is added due to issue #9175-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--
This plugin's configuration is used to store Eclipse m2e settings only.
It has no influence on the Maven build itself.
Remove when the m2e plugin can correctly bind to Maven lifecycle
-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>${lifecycle-mapping.version}</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>
jacoco-maven-plugin
</artifactId>
<versionRange>
${jacoco-maven-plugin.version}
</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<%_ if (!skipClient) { _%>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<versionRange>${frontend-maven-plugin.version}</versionRange>
<goals>
<goal>install-node-and-npm</goal>
<goal>npm</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<%_ } _%>
<%_ if (enableSwaggerCodegen) { _%>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<versionRange>${openapi-generator-maven-plugin.version}</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<%_ } _%>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<&_ } -&>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
See the License for the specific language governing permissions and
limitations under the License.
-%>
<&_
// Register sections and max allowed fragments, 0 for unlimited.
fragments.registerSections({
parentSection: 1,
repositoriesSection: 0,
pluginRepositoriesSection: 0,
propertiesSection: 0,
propertiesStartClassSection: 1,
dependenciesSection: 0,
dependencyManagementDependenciesSection: 0,
buildSection: 0,
buildPluginsSection: 0,
buildPluginManagementPluginsSection: 0,
profilesSection: 0,
});
-&>

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -29,6 +46,7 @@
<packaging>jar</packaging>
<name><%= humanizedBaseName %></name>

<&- fragments.parentSection('\n\n') -&>
<repositories>
<%_ if (SPRING_BOOT_VERSION.indexOf('M') > -1 || SPRING_BOOT_VERSION.indexOf('RC') > -1) { _%>
<repository>
Expand All @@ -46,6 +64,7 @@
</repository>
<%_ } _%>
<!-- jhipster-needle-maven-repository -->
<&- fragments.repositoriesSection() -&>
</repositories>

<pluginRepositories>
Expand All @@ -56,13 +75,19 @@
<url>https://repo.spring.io/milestone</url>
</pluginRepository>
<%_ } _%>
<&- fragments.pluginRepositoriesSection() -&>
<!-- jhipster-needle-maven-plugin-repository -->
</pluginRepositories>

<!-- jhipster-needle-distribution-management -->

<properties>
<!-- Build properties -->
<&- fragments.propertiesStartClassSection() -&>
<&_ if (!fragments.propertiesStartClassSection()) { -&>
<start-class><%= packageName %>.<%= mainClass %></start-class>

<&_ } -&>
<maven.version>3.3.9</maven.version>
<java.version><%= JAVA_VERSION %></java.version>
<%_ if (!skipClient) { _%>
Expand All @@ -75,7 +100,6 @@
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<start-class><%= packageName %>.<%= mainClass %></start-class>
<argLine>-Djava.security.egd=file:/dev/./urandom -Xmx256m</argLine>
<m2e.apt.activation>jdt_apt</m2e.apt.activation>
<run.addResources>false</run.addResources>
Expand Down Expand Up @@ -180,6 +204,7 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<&- fragments.dependencyManagementDependenciesSection() -&>
<!-- jhipster-needle-maven-add-dependency-management -->
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -888,6 +913,7 @@
<scope>test</scope>
</dependency>
<%_ } _%>
<&- fragments.dependenciesSection() -&>
<!-- jhipster-needle-maven-add-dependency -->
</dependencies>

Expand All @@ -903,6 +929,7 @@
</testResource>
</testResources>
<%_ } _%>
<&- fragments.buildSection() -&>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -976,6 +1003,7 @@
<artifactId>openapi-generator-maven-plugin</artifactId>
</plugin>
<%_ } _%>
<&- fragments.buildPluginsSection() -&>
<!-- jhipster-needle-maven-add-plugin -->
</plugins>
<pluginManagement>
Expand Down Expand Up @@ -1489,12 +1517,13 @@
<jvmArguments>-Djgroups.tcp.address=NON_LOOPBACK -Djava.net.preferIPv4Stack=true</jvmArguments>
<%_ } _%>
</configuration>

</plugin>
<&- fragments.buildPluginManagementPluginsSection() -&>
<!-- jhipster-needle-maven-add-plugin-management -->
</plugins>
</pluginManagement>
</build>

<profiles>
<%_ if (databaseTypeSql) { _%>
<profile>
Expand Down Expand Up @@ -1842,92 +1871,6 @@
<%_ } _%>
</dependencies>
</profile>
<profile>
<!-- This is automatically activated when working in Eclipse -->
<id>eclipse</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<dependencies>
<!-- The following dependency is added due to issue #9175-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!--
This plugin's configuration is used to store Eclipse m2e settings only.
It has no influence on the Maven build itself.
Remove when the m2e plugin can correctly bind to Maven lifecycle
-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>${lifecycle-mapping.version}</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.jacoco</groupId>
<artifactId>
jacoco-maven-plugin
</artifactId>
<versionRange>
${jacoco-maven-plugin.version}
</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<%_ if (!skipClient) { _%>
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<versionRange>${frontend-maven-plugin.version}</versionRange>
<goals>
<goal>install-node-and-npm</goal>
<goal>npm</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
<%_ } _%>
<%_ if (enableSwaggerCodegen) { _%>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<versionRange>${openapi-generator-maven-plugin.version}</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<%_ } _%>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<%_ if (cypressTests || protractorTests) { _%>
<profile>
<id>e2e</id>
Expand All @@ -1952,6 +1895,7 @@
</build>
</profile>
<%_ } _%>
<&- fragments.profilesSection() -&>
<!-- jhipster-needle-maven-add-profile -->
</profiles>
</project>