Skip to content

Commit

Permalink
CAY-1881 CayenneModeler (Mac version) doesn't work with Java 7
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cayenne/main/trunk@1546735 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
andrus committed Nov 30, 2013
1 parent b49acb9 commit e31bcf9
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 60 deletions.
23 changes: 21 additions & 2 deletions assembly/pom.xml
Expand Up @@ -164,6 +164,11 @@
<artifactId>cayenne-modeler-mac</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cayenne.modeler</groupId>
<artifactId>cayenne-modeler-mac-legacy</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -210,7 +215,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<!-- chmod executable ... while japplication plugin produces the correct
<!-- 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 -->
<execution>
Expand All @@ -223,7 +228,21 @@
<executable>/bin/chmod</executable>
<arguments>
<argument>755</argument>
<argument>target/cayenne-${project.version}-macosx/CayenneModeler.app/Contents/MacOS/JavaApplicationStub</argument>
<argument>target/cayenne-${project.version}-macosx/CayenneModeler.app/Contents/MacOS/JavaAppLauncher</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>chmod-modeler-legacy</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>/bin/chmod</executable>
<arguments>
<argument>755</argument>
<argument>target/cayenne-${project.version}-macosx/CayenneModeler-Java6-legacy.app/Contents/MacOS/JavaApplicationStub</argument>
</arguments>
</configuration>
</execution>
Expand Down
1 change: 1 addition & 0 deletions assembly/src/main/resources/assemblies/assembly-mac.xml
Expand Up @@ -107,6 +107,7 @@
<outputDirectory>../../</outputDirectory>
<includes>
<include>org.apache.cayenne.modeler:cayenne-modeler-mac</include>
<include>org.apache.cayenne.modeler:cayenne-modeler-mac-legacy</include>
</includes>
<unpack>true</unpack>
<unpackOptions>
Expand Down
52 changes: 18 additions & 34 deletions modeler/cayenne-modeler-generic/pom.xml
@@ -1,23 +1,16 @@
<?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
http://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">
<!-- 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 http://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>

Expand All @@ -39,11 +32,8 @@
<version>${project.version}</version>
</dependency>

<!--
adding cayenne runtime dependencies explicitly,
as they are marked as "provided" in the modeler pom
and won't be included in the jar
-->
<!-- adding cayenne runtime dependencies explicitly, as they are marked
as "provided" in the modeler pom and won't be included in the jar -->
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-server</artifactId>
Expand All @@ -67,18 +57,12 @@
</dependencies>

<build>
<resources>
<resource>
<directory>target/modeler</directory>
</resource>
</resources>

<plugins>
<plugin>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-japplication-plugin</artifactId>
<groupId>org.objectstyle.japp</groupId>
<artifactId>japp-maven-plugin</artifactId>
<configuration>
<destDir>target/modeler</destDir>
<destDir>${project.build.outputDirectory}</destDir>
<name>CayenneModeler</name>
<mainClass>org.apache.cayenne.modeler.generic.GenericMain</mainClass>
<os>java</os>
Expand All @@ -87,7 +71,7 @@
<execution>
<phase>generate-resources</phase>
<goals>
<goal>japplication</goal>
<goal>japp</goal>
</goals>
</execution>
</executions>
Expand Down
111 changes: 111 additions & 0 deletions modeler/cayenne-modeler-mac-legacy/pom.xml
@@ -0,0 +1,111 @@
<?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
http://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>3.2.M2-SNAPSHOT</version>
</parent>

<artifactId>cayenne-modeler-mac-legacy</artifactId>
<name>Cayenne Modeler Mac OS X - Old Apple Java</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>org.apache.cayenne.modeler</groupId>
<artifactId>cayenne-modeler</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.cayenne.modeler</groupId>
<artifactId>cayenne-modeler-mac-ext</artifactId>
<version>${project.version}</version>
</dependency>

<!--
adding cayenne runtime dependencies explicitly,
as they are marked as "provided" in the modeler pom
and won't be included in the jar
-->
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-server</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cayenne</groupId>
<artifactId>cayenne-project</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cayenne.modeler</groupId>
<artifactId>cayenne-wocompat</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.objectstyle.japp</groupId>
<artifactId>japp-maven-plugin</artifactId>
<configuration>
<name>CayenneModeler-Java6-legacy</name>
<longName>${project.version}</longName>
<destDir>${project.build.outputDirectory}</destDir>
<mainClass>org.apache.cayenne.modeler.osx.OSXMain</mainClass>
<icon>src/japplication/resources/CayenneModeler.icns</icon>
<os>mac</os>
<jvm>1.5+</jvm>
<flavor>osx_legacy</flavor>
<jvmOptions>-Xmx500m -Dapple.laf.useScreenMenuBar=true</jvmOptions>
</configuration>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>japp</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<pluginRepositories>
<pluginRepository>
<id>objectstyle</id>
<name>ObjectStyle repository</name>
<url>http://maven.objectstyle.org/nexus/content/groups/cayenne-deps</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</project>
Binary file not shown.
20 changes: 6 additions & 14 deletions modeler/cayenne-modeler-mac/pom.xml
Expand Up @@ -67,33 +67,25 @@
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>target/modeler</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-japplication-plugin</artifactId>
<groupId>org.objectstyle.japp</groupId>
<artifactId>japp-maven-plugin</artifactId>
<configuration>
<name>CayenneModeler</name>
<longName>${project.version}</longName>
<destDir>target/modeler</destDir>
<destDir>${project.build.outputDirectory}</destDir>
<mainClass>org.apache.cayenne.modeler.osx.OSXMain</mainClass>
<icon>src/japplication/resources/CayenneModeler.icns</icon>
<os>mac</os>
<jvm>1.5+</jvm>
<jvmOptions>-Xmx500m</jvmOptions>
<jvm>1.7+</jvm>
<jvmOptions>-Xmx500m -Dapple.laf.useScreenMenuBar=true</jvmOptions>
</configuration>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>japplication</goal>
<goal>japp</goal>
</goals>
</execution>
</executions>
Expand Down
8 changes: 4 additions & 4 deletions modeler/cayenne-modeler-win/pom.xml
Expand Up @@ -74,12 +74,12 @@
</resources>
<plugins>
<plugin>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-japplication-plugin</artifactId>
<groupId>org.objectstyle.japp</groupId>
<artifactId>japp-maven-plugin</artifactId>
<configuration>
<name>CayenneModeler</name>
<longName>${project.version}</longName>
<destDir>target/modeler</destDir>
<destDir>${project.build.outputDirectory}</destDir>
<mainClass>org.apache.cayenne.modeler.generic.GenericMain</mainClass>
<icon>src/japplication/resources/CayenneModeler.ico</icon>
<os>windows</os>
Expand All @@ -90,7 +90,7 @@
<execution>
<phase>generate-resources</phase>
<goals>
<goal>japplication</goal>
<goal>japp</goal>
</goals>
</execution>
</executions>
Expand Down
1 change: 1 addition & 0 deletions modeler/pom.xml
Expand Up @@ -50,6 +50,7 @@
<modules>
<module>cayenne-modeler-mac-ext</module>
<module>cayenne-modeler-mac</module>
<module>cayenne-modeler-mac-legacy</module>
</modules>
</profile>
<profile>
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Expand Up @@ -601,11 +601,11 @@
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-japplication-plugin</artifactId>
<groupId>org.objectstyle.japp</groupId>
<artifactId>japp-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>japplication</goal>
<goal>japp</goal>
</goals>
</pluginExecutionFilter>
<action>
Expand Down Expand Up @@ -739,9 +739,9 @@
<version>0.8</version>
</plugin>
<plugin>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-japplication-plugin</artifactId>
<version>2.0.17</version>
<groupId>org.objectstyle.japp</groupId>
<artifactId>japp-maven-plugin</artifactId>
<version>3.0</version>
</plugin>

</plugins>
Expand Down

0 comments on commit e31bcf9

Please sign in to comment.