This is an automated email from the ASF dual-hosted git repository. asf-gitbox-commits pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cayenne.git
commit 397cc81f9675078b2994574c0ee2d6d5d94e4e4c Author: Andrus Adamchik <[email protected]> AuthorDate: Thu Aug 27 15:00:31 2026 -0400 Collapsing platform builds into cayenne-modeler * no need for separate platform modules * cleanup: "assembly" module name must match the directory name * cleanup: removing "-add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED" from Windows assembly. Presumably no longer in use? --- build-tools/rat-excludes | 2 +- {assembly => cayenne-assembly}/pom.xml | 27 +----- .../assemblies/generic/assembly-generic.xml | 17 ++-- .../src/main/resources/assemblies/mac}/README.txt | 0 .../main/resources/assemblies/mac/assembly-mac.xml | 24 ++--- .../main/resources/assemblies/mac/background.tiff | Bin .../main/resources/assemblies/mac/create-dmg.sh | 0 .../main/resources/assemblies/src/assembly-src.xml | 0 .../assemblies/windows/assembly-windows.xml | 17 ++-- modeler/cayenne-modeler-generic/pom.xml | 62 ------------- modeler/cayenne-modeler-mac/pom.xml | 73 --------------- modeler/cayenne-modeler-win/pom.xml | 75 ---------------- modeler/cayenne-modeler/pom.xml | 99 +++++++++++++++++++++ .../src/japplication/resources/CayenneModeler.icns | Bin .../src/japplication/resources/CayenneModeler.ico | Bin modeler/pom.xml | 3 - pom.xml | 2 +- 17 files changed, 126 insertions(+), 275 deletions(-) diff --git a/build-tools/rat-excludes b/build-tools/rat-excludes index 5e5bd3e0e..7d3e39020 100644 --- a/build-tools/rat-excludes +++ b/build-tools/rat-excludes @@ -46,4 +46,4 @@ # ASF and distribution text that carries no header by convention KEYS RELEASE-NOTES.txt -modeler/cayenne-modeler-mac/src/main/resources/README.txt +cayenne-assembly/src/main/resources/assemblies/mac/README.txt diff --git a/assembly/pom.xml b/cayenne-assembly/pom.xml similarity index 93% rename from assembly/pom.xml rename to cayenne-assembly/pom.xml index cb3f03d3c..45344e928 100644 --- a/assembly/pom.xml +++ b/cayenne-assembly/pom.xml @@ -226,13 +226,6 @@ <profile> <!-- GENERIC cross-platform assembly. Can be created on any platform --> <id>generic</id> - <dependencies> - <dependency> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler-generic</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> <build> <plugins> <plugin> @@ -276,13 +269,6 @@ <profile> <!-- MAC assembly (can only be run on Mac) --> <id>mac</id> - <dependencies> - <dependency> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler-mac</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> <properties> <content.dir>cayenne-${project.version}</content.dir> </properties> @@ -348,9 +334,9 @@ <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <executions> - <!-- chmod executable ... while japp plugin produces the correct - permissions, jar/unjar operation resets 'x' flag, so the app becomes non-executable. - Must fix that manually --> + <!-- chmod executable ... while japp plugin produces the correct permissions, the + assembly copy resets the 'x' flag, so the app becomes non-executable. + Must fix that manually --> <execution> <id>chmod-modeler</id> <phase>package</phase> @@ -388,13 +374,6 @@ <profile> <!-- WINDOWS assembly (can only be run on Windows) --> <id>windows</id> - <dependencies> - <dependency> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler-win</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> <build> <plugins> <!-- Make sure we are running on windows --> diff --git a/assembly/src/main/resources/assemblies/generic/assembly-generic.xml b/cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml similarity index 93% rename from assembly/src/main/resources/assemblies/generic/assembly-generic.xml rename to cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml index 0bf452f98..0403f4713 100644 --- a/assembly/src/main/resources/assemblies/generic/assembly-generic.xml +++ b/cayenne-assembly/src/main/resources/assemblies/generic/assembly-generic.xml @@ -61,6 +61,11 @@ <include>KEYS</include> </includes> </fileSet> + <!-- Native Modeler launchers, built by the matching "generic" profile of "cayenne-modeler" --> + <fileSet> + <directory>../modeler/cayenne-modeler/target/apps/generic</directory> + <outputDirectory>bin</outputDirectory> + </fileSet> </fileSets> <dependencySets> @@ -101,18 +106,6 @@ </excludes> </unpackOptions> </dependencySet> - <dependencySet> - <outputDirectory>bin</outputDirectory> - <includes> - <include>org.apache.cayenne.modeler:cayenne-modeler-generic</include> - </includes> - <unpack>true</unpack> - <unpackOptions> - <excludes> - <exclude>META-INF/**</exclude> - </excludes> - </unpackOptions> - </dependencySet> <dependencySet> <outputDirectory>bin</outputDirectory> <includes> diff --git a/modeler/cayenne-modeler-mac/src/main/resources/README.txt b/cayenne-assembly/src/main/resources/assemblies/mac/README.txt similarity index 100% rename from modeler/cayenne-modeler-mac/src/main/resources/README.txt rename to cayenne-assembly/src/main/resources/assemblies/mac/README.txt diff --git a/assembly/src/main/resources/assemblies/mac/assembly-mac.xml b/cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml similarity index 91% rename from assembly/src/main/resources/assemblies/mac/assembly-mac.xml rename to cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml index cf5faf9cf..136a7e521 100644 --- a/assembly/src/main/resources/assemblies/mac/assembly-mac.xml +++ b/cayenne-assembly/src/main/resources/assemblies/mac/assembly-mac.xml @@ -59,6 +59,18 @@ <include>KEYS</include> </includes> </fileSet> + <fileSet> + <directory>src/main/resources/assemblies/mac</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>README.txt</include> + </includes> + </fileSet> + <!-- Native Modeler launchers, built by the matching "mac" profile of "cayenne-modeler" --> + <fileSet> + <directory>../modeler/cayenne-modeler/target/apps/mac</directory> + <outputDirectory>/</outputDirectory> + </fileSet> </fileSets> <dependencySets> @@ -99,18 +111,6 @@ </excludes> </unpackOptions> </dependencySet> - <dependencySet> - <outputDirectory>/</outputDirectory> - <includes> - <include>org.apache.cayenne.modeler:cayenne-modeler-mac</include> - </includes> - <unpack>true</unpack> - <unpackOptions> - <excludes> - <exclude>META-INF/**</exclude> - </excludes> - </unpackOptions> - </dependencySet> <dependencySet> <outputDirectory>CayenneModeler.app/Contents/Resources/mcp/</outputDirectory> <includes> diff --git a/assembly/src/main/resources/assemblies/mac/background.tiff b/cayenne-assembly/src/main/resources/assemblies/mac/background.tiff similarity index 100% rename from assembly/src/main/resources/assemblies/mac/background.tiff rename to cayenne-assembly/src/main/resources/assemblies/mac/background.tiff diff --git a/assembly/src/main/resources/assemblies/mac/create-dmg.sh b/cayenne-assembly/src/main/resources/assemblies/mac/create-dmg.sh similarity index 100% rename from assembly/src/main/resources/assemblies/mac/create-dmg.sh rename to cayenne-assembly/src/main/resources/assemblies/mac/create-dmg.sh diff --git a/assembly/src/main/resources/assemblies/src/assembly-src.xml b/cayenne-assembly/src/main/resources/assemblies/src/assembly-src.xml similarity index 100% rename from assembly/src/main/resources/assemblies/src/assembly-src.xml rename to cayenne-assembly/src/main/resources/assemblies/src/assembly-src.xml diff --git a/assembly/src/main/resources/assemblies/windows/assembly-windows.xml b/cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml similarity index 93% rename from assembly/src/main/resources/assemblies/windows/assembly-windows.xml rename to cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml index c250f9e27..d5ccc6b3a 100644 --- a/assembly/src/main/resources/assemblies/windows/assembly-windows.xml +++ b/cayenne-assembly/src/main/resources/assemblies/windows/assembly-windows.xml @@ -59,6 +59,11 @@ <include>KEYS</include> </includes> </fileSet> + <!-- Native Modeler launchers, built by the matching "windows" profile of "cayenne-modeler" --> + <fileSet> + <directory>../modeler/cayenne-modeler/target/apps/windows</directory> + <outputDirectory>bin</outputDirectory> + </fileSet> </fileSets> <dependencySets> @@ -99,18 +104,6 @@ </excludes> </unpackOptions> </dependencySet> - <dependencySet> - <outputDirectory>bin</outputDirectory> - <includes> - <include>org.apache.cayenne.modeler:cayenne-modeler-win</include> - </includes> - <unpack>true</unpack> - <unpackOptions> - <excludes> - <exclude>META-INF/**</exclude> - </excludes> - </unpackOptions> - </dependencySet> <dependencySet> <outputDirectory>bin</outputDirectory> <includes> diff --git a/modeler/cayenne-modeler-generic/pom.xml b/modeler/cayenne-modeler-generic/pom.xml deleted file mode 100644 index ef6c6d87a..000000000 --- a/modeler/cayenne-modeler-generic/pom.xml +++ /dev/null @@ -1,62 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor - license agreements. See the NOTICE file distributed with this work for additional - information regarding copyright ownership. The ASF licenses this file to - you 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. --> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler-parent</artifactId> - <version>5.0-SNAPSHOT</version> - </parent> - - <artifactId>cayenne-modeler-generic</artifactId> - <name>cayenne-modeler-generic: Modeler Generic Assembly</name> - <packaging>jar</packaging> - - <dependencies> - - <dependency> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>generic</id> - <build> - <plugins> - <plugin> - <groupId>org.objectstyle.japp</groupId> - <artifactId>japp-maven-plugin</artifactId> - <configuration> - <destDir>${project.build.outputDirectory}</destDir> - <name>CayenneModeler</name> - <mainClass>org.apache.cayenne.modeler.Main</mainClass> - <os>java</os> - </configuration> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <goal>japp</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project> diff --git a/modeler/cayenne-modeler-mac/pom.xml b/modeler/cayenne-modeler-mac/pom.xml deleted file mode 100644 index fe6ce14df..000000000 --- a/modeler/cayenne-modeler-mac/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler-parent</artifactId> - <version>5.0-SNAPSHOT</version> - </parent> - - <artifactId>cayenne-modeler-mac</artifactId> - <name>cayenne-modeler-mac: Modeler MacOS Assembly</name> - <packaging>jar</packaging> - - <dependencies> - <dependency> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <profiles> - <profile> - <id>mac</id> - <build> - <plugins> - <plugin> - <groupId>org.objectstyle.japp</groupId> - <artifactId>japp-maven-plugin</artifactId> - <configuration> - <name>CayenneModeler</name> - <longName>${project.version}</longName> - <destDir>${project.build.outputDirectory}</destDir> - <mainClass>org.apache.cayenne.modeler.Main</mainClass> - <icon>src/japplication/resources/CayenneModeler.icns</icon> - <os>mac</os> - <jvm0>21</jvm0> - <jvm0Options>-Xmx500m -Dapple.laf.useScreenMenuBar=true</jvm0Options> - </configuration> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <goal>japp</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project> diff --git a/modeler/cayenne-modeler-win/pom.xml b/modeler/cayenne-modeler-win/pom.xml deleted file mode 100644 index e8da608b1..000000000 --- a/modeler/cayenne-modeler-win/pom.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you 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. ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler-parent</artifactId> - <version>5.0-SNAPSHOT</version> - </parent> - - <artifactId>cayenne-modeler-win</artifactId> - <name>cayenne-modeler-win: Modeler Windows Assembly</name> - <packaging>jar</packaging> - - <dependencies> - - <dependency> - <groupId>org.apache.cayenne.modeler</groupId> - <artifactId>cayenne-modeler</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - <profiles> - <!-- Avoid assembly of Modeler on normal build --> - <profile> - <id>windows</id> - <build> - <plugins> - <plugin> - <groupId>org.objectstyle.japp</groupId> - <artifactId>japp-maven-plugin</artifactId> - <configuration> - <name>CayenneModeler</name> - <longName>${project.version}</longName> - <destDir>${project.build.outputDirectory}</destDir> - <mainClass>org.apache.cayenne.modeler.Main</mainClass> - <icon>src/japplication/resources/CayenneModeler.ico</icon> - <os>windows</os> - <jvm0>21</jvm0> - <jvm0Options>-Xmx500m --add-exports java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED</jvm0Options> - </configuration> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <goal>japp</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> -</project> diff --git a/modeler/cayenne-modeler/pom.xml b/modeler/cayenne-modeler/pom.xml index 872339a40..79b99a3b0 100644 --- a/modeler/cayenne-modeler/pom.xml +++ b/modeler/cayenne-modeler/pom.xml @@ -91,4 +91,103 @@ <scope>test</scope> </dependency> </dependencies> + <!-- + Native Modeler launchers, built into "target/apps/<platform>" and picked up from there by + "cayenne-assembly". Bound to "verify" rather than "package", as "japp" bundles the module's + own jar into the launcher, and same-phase plugin ordering would not guarantee it exists yet. + Each platform gets its own directory, so any combination of the profiles can be active at once. + --> + <profiles> + <!-- GENERIC cross-platform launcher: a runnable "CayenneModeler.jar". Builds on any OS --> + <profile> + <id>generic</id> + <build> + <plugins> + <plugin> + <groupId>org.objectstyle.japp</groupId> + <artifactId>japp-maven-plugin</artifactId> + <executions> + <execution> + <id>japp-generic</id> + <phase>verify</phase> + <goals> + <goal>japp</goal> + </goals> + <configuration> + <destDir>${project.build.directory}/apps/generic</destDir> + <name>CayenneModeler</name> + <mainClass>org.apache.cayenne.modeler.Main</mainClass> + <os>java</os> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <!-- MACOS launcher: a "CayenneModeler.app" bundle. Builds on macOS --> + <profile> + <id>mac</id> + <build> + <plugins> + <plugin> + <groupId>org.objectstyle.japp</groupId> + <artifactId>japp-maven-plugin</artifactId> + <executions> + <execution> + <id>japp-mac</id> + <phase>verify</phase> + <goals> + <goal>japp</goal> + </goals> + <configuration> + <destDir>${project.build.directory}/apps/mac</destDir> + <name>CayenneModeler</name> + <longName>${project.version}</longName> + <mainClass>org.apache.cayenne.modeler.Main</mainClass> + <icon>src/japplication/resources/CayenneModeler.icns</icon> + <os>mac</os> + <jvm0>21</jvm0> + <jvm0Options>-Xmx500m -Dapple.laf.useScreenMenuBar=true</jvm0Options> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + + <!-- WINDOWS launcher: "CayenneModeler.jar" plus a "CayenneModeler.exe". Builds on Windows --> + <profile> + <id>windows</id> + <build> + <plugins> + <plugin> + <groupId>org.objectstyle.japp</groupId> + <artifactId>japp-maven-plugin</artifactId> + <executions> + <execution> + <id>japp-windows</id> + <phase>verify</phase> + <goals> + <goal>japp</goal> + </goals> + <configuration> + <destDir>${project.build.directory}/apps/windows</destDir> + <name>CayenneModeler</name> + <longName>${project.version}</longName> + <mainClass>org.apache.cayenne.modeler.Main</mainClass> + <icon>src/japplication/resources/CayenneModeler.ico</icon> + <os>windows</os> + <jvm0>21</jvm0> + <jvm0Options>-Xmx500m</jvm0Options> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project> diff --git a/modeler/cayenne-modeler-mac/src/japplication/resources/CayenneModeler.icns b/modeler/cayenne-modeler/src/japplication/resources/CayenneModeler.icns similarity index 100% rename from modeler/cayenne-modeler-mac/src/japplication/resources/CayenneModeler.icns rename to modeler/cayenne-modeler/src/japplication/resources/CayenneModeler.icns diff --git a/modeler/cayenne-modeler-win/src/japplication/resources/CayenneModeler.ico b/modeler/cayenne-modeler/src/japplication/resources/CayenneModeler.ico similarity index 100% rename from modeler/cayenne-modeler-win/src/japplication/resources/CayenneModeler.ico rename to modeler/cayenne-modeler/src/japplication/resources/CayenneModeler.ico diff --git a/modeler/pom.xml b/modeler/pom.xml index 3ff2d3e9b..4b9461f89 100644 --- a/modeler/pom.xml +++ b/modeler/pom.xml @@ -36,9 +36,6 @@ <module>cayenne-wocompat</module> <module>cayenne-modeler-prefs</module> <module>cayenne-modeler</module> - <module>cayenne-modeler-generic</module> - <module>cayenne-modeler-mac</module> - <module>cayenne-modeler-win</module> </modules> <build> diff --git a/pom.xml b/pom.xml index bf8da33c8..6c7a7460b 100644 --- a/pom.xml +++ b/pom.xml @@ -126,7 +126,7 @@ <module>modeler</module> <module>tutorials</module> <module>docs</module> - <module>assembly</module> + <module>cayenne-assembly</module> </modules> <issueManagement> <system>jira</system>
