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

Dev profile to update modules without building the whole GlassFish distribution #24985

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 4 additions & 0 deletions appserver/admingui/cluster/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<name>Admin Console Clustering Support Plugin</name>
<description>Clustering support plugin bundle for GlassFish Admin Console</description>

<properties>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.main.admingui</groupId>
Expand Down
4 changes: 4 additions & 0 deletions appserver/admingui/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<name>Admin Console Common</name>
<description>This bundle contains common code that may be shared across plugins.</description>

<properties>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.main.common</groupId>
Expand Down
8 changes: 7 additions & 1 deletion appserver/admingui/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!--

Copyright (c) 1997, 2021 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2021 Contributors to the Eclipse Foundation
Copyright (c) 2021,2024 Contributors to the Eclipse Foundation

This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -33,6 +33,11 @@

<name>Admin Console Core Jar</name>

<properties>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
<copy.modules.to.distribution.destFile>${basedir}/../../../${glassfish.distribution.dir}/lib/install/applications/__admingui/WEB-INF/lib/console-core-${project.version}.jar</copy.modules.to.distribution.destFile>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.woodstock</groupId>
Expand Down Expand Up @@ -61,4 +66,5 @@
<artifactId>junit-jupiter-engine</artifactId>
</dependency>
</dependencies>

</project>
4 changes: 4 additions & 0 deletions appserver/admingui/jca/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<name>Admin Console Connectors Plugin</name>
<description>Connectors plugin bundle for GlassFish Admin Console</description>

<properties>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.main.admingui</groupId>
Expand Down
4 changes: 4 additions & 0 deletions appserver/admingui/jms-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<!-- See parent POM -->
</developers>

<properties>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
<dependency>
<groupId>org.glassfish.main.admingui</groupId>
Expand Down
29 changes: 29 additions & 0 deletions appserver/admingui/war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,33 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>copy-main-artifact</id>
<phase>package</phase>
<configuration>
<target>
<delete dir="${basedir}/../../../${glassfish.distribution.dir}/lib/install/applications/__admingui"/>
<unzip src="${project.build.directory}/${project.build.finalName}.war" dest="${basedir}/../../../${glassfish.distribution.dir}/lib/install/applications/__admingui" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
2 changes: 2 additions & 0 deletions nucleus/admin/rest/rest-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

<properties>
<command.security.maven.plugin.isFailureFatal>false</command.security.maven.plugin.isFailureFatal>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
<copy.modules.to.distribution.path.to.root>../../../..</copy.modules.to.distribution.path.to.root>
</properties>

<dependencies>
Expand Down
1 change: 1 addition & 0 deletions nucleus/admin/util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<command.security.maven.plugin.isFailureFatal>false</command.security.maven.plugin.isFailureFatal>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
Expand Down
1 change: 1 addition & 0 deletions nucleus/cluster/common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
Expand Down
1 change: 1 addition & 0 deletions nucleus/common/common-util/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
Expand Down
1 change: 1 addition & 0 deletions nucleus/core/kernel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

<properties>
<findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
<copy.modules.to.distribution.skip>false</copy.modules.to.distribution.skip>
</properties>

<dependencies>
Expand Down
55 changes: 50 additions & 5 deletions nucleus/parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@
<!-- GlassFishLogManager is a child of this module, so we cannot use it here yet. -->
<test.logManager>java.util.logging.LogManager</test.logManager>
<test.logLevel>INFO</test.logLevel>

<glassfish.distribution.dir>appserver/distributions/glassfish/target/stage/glassfish7/glassfish</glassfish.distribution.dir>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -838,7 +840,7 @@
<plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>glassfishbuild-maven-plugin</artifactId>
<version>4.0.0</version>
<version>4.0.2</version>
<!-- Adds support for glassfish-jar and it's customized lifecycle-->
<extensions>true</extensions>
</plugin>
Expand Down Expand Up @@ -933,7 +935,7 @@
<logViolationsToConsole>true</logViolationsToConsole>
<excludes>**/generated-sources/**/*, **/module-info.java</excludes>
<!-- build-helper-plugin adds the root as a resource path, but checkstyle overrides the filter and
adds all property files in the tree -->
adds all property files in the tree -->
<resourceExcludes>
**/appserver/**/src/main/resources/**/*,
**/deployment/**/src/main/resources/**/*,
Expand Down Expand Up @@ -1331,7 +1333,7 @@
<copy toDir="${project.build.outputDirectory}/META-INF" overwrite="false">
<fileset dir="${basedir}/target" includes="MANIFEST.MF">
<present targetdir="${project.build.outputDirectory}/META-INF"
present="srconly" />
present="srconly" />
</fileset>
</copy>
</target>
Expand Down Expand Up @@ -1371,8 +1373,8 @@
<groupId>org.glassfish.hk2</groupId>
<artifactId>osgiversion-maven-plugin</artifactId>
<!-- Since we don't want qualifier like b05 or SNAPSHOT to appear in package version attribute, we use the
following goal to populate a project property with an OSGi version which is equivalent to maven version without qualifier
and then use that property in osgi.bundle while exporting. -->
following goal to populate a project property with an OSGi version which is equivalent to maven version without qualifier
and then use that property in osgi.bundle while exporting. -->
<configuration>
<dropVersionComponent>qualifier</dropVersionComponent>
<versionPropertyName>project.osgi.version</versionPropertyName>
Expand Down Expand Up @@ -1669,5 +1671,48 @@
<file.executable.suffix>.bat</file.executable.suffix>
</properties>
</profile>

<profile>
<id>dev</id>
<properties>
<copy.modules.to.distribution.skip>true</copy.modules.to.distribution.skip>
<copy.modules.to.distribution.path.to.root>../../..</copy.modules.to.distribution.path.to.root>
<copy.modules.to.distribution.destFile>${basedir}/${copy.modules.to.distribution.path.to.root}/${glassfish.distribution.dir}/modules/${project.build.finalName}.jar</copy.modules.to.distribution.destFile>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>glassfishbuild-maven-plugin</artifactId>
<executions>
<execution>
<id>copy-module-to-distribution</id>
<phase>package</phase>
<goals>
<goal>copy-file</goal>
</goals>
<configuration>
<skip>${copy.modules.to.distribution.skip}</skip>
<destFile>${copy.modules.to.distribution.destFile}</destFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.glassfish.build</groupId>
<artifactId>glassfishbuild-maven-plugin</artifactId>
<executions>
<execution>
<id>copy-module-to-distribution</id>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>