cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r412469 - in /incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher: pom.xml src/main/assembly/bin.xml src/main/assembly/package.xml src/main/java/Launcher.java
Date Wed, 07 Jun 2006 17:56:14 GMT
Author: aadamchik
Date: Wed Jun  7 10:56:13 2006
New Revision: 412469

URL: http://svn.apache.org/viewvc?rev=412469&view=rev
Log:
more user-friendly launcher

Added:
    incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/package.xml
      - copied, changed from r412420, incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/bin.xml
Removed:
    incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/bin.xml
Modified:
    incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/pom.xml
    incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/java/Launcher.java

Modified: incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/pom.xml?rev=412469&r1=412468&r2=412469&view=diff
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/pom.xml (original)
+++ incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/pom.xml Wed Jun  7 10:56:13
2006
@@ -1,14 +1,10 @@
 <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">
-
-    <parent>
-        <groupId>org.apache.cayenne</groupId>
-        <artifactId>modeler</artifactId>
-        <version>3.0-SNAPSHOT</version>
-    </parent>
   
     <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.cayenne</groupId>
     <artifactId>plugin-launcher</artifactId>
+    <version>3.0-SNAPSHOT</version>
     <packaging>jar</packaging>
     <name>Plugin Environment Launcher</name>
     
@@ -21,6 +17,27 @@
                         <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
                     </archive>
                 </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>attached</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/package.xml</descriptor>
+                            </descriptors>
+                            <archive>
+                                <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
+                            </archive>
+                            <finalName>modeler</finalName>
+                        </configuration>
+                    </execution>
+                </executions> 
             </plugin>
         </plugins>
     </build>

Copied: incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/package.xml
(from r412420, incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/bin.xml)
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/package.xml?p2=incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/package.xml&p1=incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/bin.xml&r1=412420&r2=412469&rev=412469&view=diff
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/bin.xml
(original)
+++ incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/package.xml
Wed Jun  7 10:56:13 2006
@@ -1 +1 @@
-<!-- 
    Assembles a super-jar application that contains a plugin environment 
    launcher
and a minimal set of Modeler plugins.
    
    * To create a distro do "mvn package assembly:assembly"
   * To create a local assembly do "mvn package assembly:directory"
-->
<assembly>
   <id>core</id>
    <formats>
        <format>tar.gz</format>
   </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
  
 
    <moduleSets>
        <!-- Launcher Jar -->
        <moduleSet>
  
         <includes>
                <include>org.apache.cayenne:plugin-launcher</include>
           </includes>
            <binaries>
                <outputDirectory>/lib</outputDirectory>
               <includeDependencies>true</includeDependencies>
              
 <unpack>false</unpack>
            </binaries> 
        </moduleSet>
   </moduleSets>
    
    <fileSets>
        <!-- Startup Scripts -->
 
      <!-- 
        <fileSet>
        <directory>plugin-launcher/src/main/bin</direct
 ory>
        <outputDirectory>/</outputDirectory>
        <fileMode>755</fileMode>
       </fileSet>
        -->
        
        <!-- Plugin Descriptors and Fat
Jars -->
        <fileSet>
            <directory>swing-plugin/target/swing-plugin-${version}-plugin.dir</directory>
           <outputDirectory>/plugins/${groupId}_swing-plugin_${version}</outputDirectory>
           <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
           <directory>modeler-plugin/target/modeler-plugin-${version}-plugin.dir</directory>
           <outputDirectory>/plugins/${groupId}_modeler-plugin_${version}</outputDirectory>
           <fileMode>644</fileMode>
        </fileSet>
    </fileSets>
</assembly>
\ No newline at end of file
+<assembly>
    <id>launcher</id>
    <formats>
        <format>jar</format>
   </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
  
 <dependencySets>
        <dependencySet>
            <outputDirectory>/</outputDirectory>
           <unpack>true</unpack>
            <scope>runtime</scope>
       </dependencySet>
    </dependencySets>
</assembly>
\ No newline at end of file

Modified: incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/java/Launcher.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/java/Launcher.java?rev=412469&r1=412468&r2=412469&view=diff
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/java/Launcher.java
(original)
+++ incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/java/Launcher.java
Wed Jun  7 10:56:13 2006
@@ -41,12 +41,18 @@
 
         // try "../plugins"
         if (pluginDirectories == null) {
-            File dir = new File(System.getProperty("user.dir")).getParentFile();
 
-            File defaultDir = dir != null
-                    ? new File(dir, PLUGINS_DIR_DEFAULT)
-                    : new File(PLUGINS_DIR_DEFAULT);
-                    
+            // try relative to current dir
+            File defaultDir = new File(PLUGINS_DIR_DEFAULT);
+
+            // try relative to parent dir
+            if (!defaultDir.isDirectory()) {
+                File parent = new File(System.getProperty("user.dir")).getParentFile();
+                if (parent != null) {
+                    defaultDir = new File(parent, PLUGINS_DIR_DEFAULT);
+                }
+            }
+
             if (defaultDir.isDirectory()) {
                 pluginDirectories = defaultDir.getAbsolutePath();
             }



Mime
View raw message