You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2006/06/07 15:04:28 UTC

svn commit: r412398 - in /incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher: .classpath src/main/assembly/bin.xml src/main/java/Launcher.java

Author: aadamchik
Date: Wed Jun  7 06:04:28 2006
New Revision: 412398

URL: http://svn.apache.org/viewvc?rev=412398&view=rev
Log:
a structure that sort of builds with maven to produce an app with plugins

Modified:
    incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/.classpath
    incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/src/main/assembly/bin.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/.classpath
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/.classpath?rev=412398&r1=412397&r2=412398&view=diff
==============================================================================
--- incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/.classpath (original)
+++ incubator/cayenne/main/branches/PROTO-3.0/modeler/plugin-launcher/.classpath Wed Jun  7 06:04:28 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
 	<classpathentry kind="src" path="src/main/java"/>
-	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry output="src/main/resources" kind="src" path="src/main/resources"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
 	<classpathentry kind="output" path="target/classes"/>

Modified: 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/bin.xml?rev=412398&r1=412397&r2=412398&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/bin.xml Wed Jun  7 06:04:28 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>
    <fileSets>
        <fileSet>
            <directory>plugin-launcher/src/main/bin</directory>
            <outputDirectory>/</outputDirectory>
            <fileMode>755</fileMode>
        </fileSet>
    </fileSets>
    <moduleSets>
        <!-- Startup Jar -->
        <moduleSet>
            <includes>
                <include>org.apache.cayenne:plugin-launcher</include>
            </includes>
            <binaries>
                <outputDirectory>/lib</outputDirectory>
                <includeDependencies>true</includeDependencies>
                <unpack>false</
 unpack>
            </binaries> 
        </moduleSet>
        <!-- Core Modeler Plugins -->
        <moduleSet>
            <includes>
                <include>org.apache.cayenne:swing-plugin</include>
                <include>org.apache.cayenne:modeler-plugin</include>
            </includes>
            <binaries>
                <outputDirectory>/plugins/${groupId}_${artifactId}_${version}</outputDirectory>
                <includeDependencies>true</includeDependencies>
                <unpack>false</unpack>
            </binaries> 
        </moduleSet>
    </moduleSets>
</assembly>
\ No newline at end of file
+<!-- 
    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>
    
    <fileSets>
        <!-- Startup Scripts -->
        <fileSet>
            <directory>plugin-launcher/src/main/bin</directory>
            <outputDirectory>/</outputDirectory>
            <fileMode>755</fileMode>
        </fileSet>
        
         <!-- Plugin Descriptors -->
        <fileSet>
            <directory>swing-plugin/src/main/plugin</directory>
            <outputDirectory>/plugins/${groupId}_swing-plugin_${version}</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
        <fileSet>
            <directory>modeler-plugin/src/
 main/plugin</directory>
            <outputDirectory>/plugins/${groupId}_modeler-plugin_${version}</outputDirectory>
            <fileMode>644</fileMode>
        </fileSet>
    </fileSets>
  
    <moduleSets>
        <!-- Startup Jar -->
        <moduleSet>
            <includes>
                <include>org.apache.cayenne:plugin-launcher</include>
            </includes>
            <binaries>
                <outputDirectory>/lib</outputDirectory>
                <includeDependencies>true</includeDependencies>
                <unpack>false</unpack>
            </binaries> 
        </moduleSet>
        <!-- Core Modeler Plugins -->
        <moduleSet>
            <includes>
                <include>org.apache.cayenne:swing-plugin</include>
                <include>org.apache.cayenne:modeler-plugin</include>
            </includes>
            <binaries>
                <outputDirectory>/plugins/${groupId}_${artifactId}_${version}</outputDirectory>
                <includeDe
 pendencies>true</includeDependencies>
                <unpack>false</unpack>
            </binaries> 
        </moduleSet>
    </moduleSets>
</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=412398&r1=412397&r2=412398&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 06:04:28 2006
@@ -1,5 +1,3 @@
-
-
 import java.io.File;
 import java.util.Iterator;
 import java.util.StringTokenizer;
@@ -41,12 +39,23 @@
         // load plugins...
         String pluginDirectories = System.getProperty(PLUGINS_DIR_PROPERTY);
 
+        // try "../plugins"
         if (pluginDirectories == null) {
-            File defaultDir = new File(PLUGINS_DIR_DEFAULT);
+            File dir = new File(System.getProperty("user.dir")).getParentFile();
+
+            File defaultDir = dir != null
+                    ? new File(dir, PLUGINS_DIR_DEFAULT)
+                    : new File(PLUGINS_DIR_DEFAULT);
+                    
             if (defaultDir.isDirectory()) {
                 pluginDirectories = defaultDir.getAbsolutePath();
             }
         }
+
+        pluginEngine.getLogger().log(
+                LoggerLevel.INFO,
+                "Plugins directory: " + pluginDirectories,
+                null);
 
         if (pluginDirectories != null) {
             StringTokenizer toks = new StringTokenizer(pluginDirectories, ",");