You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2014/10/15 13:41:28 UTC

[1/3] git commit: Instruct git to do eol normalization on text files (in case core.autocrlf is not set in git config)

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master deb1d9d26 -> 20472eb73


Instruct git to do eol normalization on text files (in case core.autocrlf is not set in git config)


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/0d775db8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/0d775db8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/0d775db8

Branch: refs/heads/master
Commit: 0d775db8495f0485963a625316c894d17b4576fa
Parents: d1a7f2e
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Oct 6 21:46:39 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Mon Oct 6 21:46:39 2014 +0300

----------------------------------------------------------------------
 .gitattributes | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/0d775db8/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
index 2bca294..dc165f0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,3 @@
 #Don't auto-convert line endings for shell scripts on Windows (breaks the scripts)
+* text=auto
 *.sh text eol=lf


[2/3] git commit: Work around for archetype:generate forcing OS line endings.

Posted by al...@apache.org.
Work around for archetype:generate forcing OS line endings.

When processing template resources (filtered="true") the archetype plugin forces all content to use the current OS specific line endings. Treat shell scripts as binary files in the archetype plugin and instead move the shell script variable replacement to the build phase of the resulting project.

Shell scripts don't work when they contain Windows style line breaks, so it is important to preserve the original line breaks even when building on Windows.


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/208aeea1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/208aeea1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/208aeea1

Branch: refs/heads/master
Commit: 208aeea161bbaab5aa97c86087a978b3ed93e982
Parents: 0d775db
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Thu Oct 9 21:52:37 2014 +0300
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Thu Oct 9 21:52:37 2014 +0300

----------------------------------------------------------------------
 usage/archetypes/quickstart/pom.xml             |  8 +++++--
 .../quickstart/src/brooklyn-sample/pom.xml      |  2 ++
 .../src/main/assembly/assembly.xml              | 24 ++++++++++++++------
 .../src/main/assembly/scripts/start.sh          |  4 ++--
 .../META-INF/maven/archetype-metadata.xml       |  4 +++-
 5 files changed, 30 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/208aeea1/usage/archetypes/quickstart/pom.xml
----------------------------------------------------------------------
diff --git a/usage/archetypes/quickstart/pom.xml b/usage/archetypes/quickstart/pom.xml
index d0a6c7a..035e685 100644
--- a/usage/archetypes/quickstart/pom.xml
+++ b/usage/archetypes/quickstart/pom.xml
@@ -149,7 +149,8 @@
                 <exclude>.*</exclude> 
                 <exclude>**/*.png</exclude> 
                 <exclude>.*/**</exclude> 
-                <exclude>*.log</exclude> 
+                <exclude>*.log</exclude>
+                <exclude>**/*.sh</exclude>
               </excludes>
               <replacements>
                 <!-- special chars in velocity have to be escaped.
@@ -178,7 +179,10 @@
               <basedir>${basedir}/src/brooklyn-sample/</basedir>
               <outputBasedir>${basedir}</outputBasedir>
               <outputDir>src/main/resources/archetype-resources/</outputDir>
-              <includes> <include>**/*.png</include> </includes>
+              <includes>
+                <include>**/*.png</include>
+                <include>**/*.sh</include>
+              </includes>
               <excludes> 
                 <exclude>target/**</exclude> 
                 <exclude>test-output/**</exclude> 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/208aeea1/usage/archetypes/quickstart/src/brooklyn-sample/pom.xml
----------------------------------------------------------------------
diff --git a/usage/archetypes/quickstart/src/brooklyn-sample/pom.xml b/usage/archetypes/quickstart/src/brooklyn-sample/pom.xml
index 8b4117e..cf03dac 100644
--- a/usage/archetypes/quickstart/src/brooklyn-sample/pom.xml
+++ b/usage/archetypes/quickstart/src/brooklyn-sample/pom.xml
@@ -58,6 +58,8 @@
   -->
 
   <properties>
+    <project.entry>com.acme.sample.SampleMain</project.entry>
+
     <!-- Compilation -->
     <java.version>1.6</java.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/208aeea1/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/assembly.xml
----------------------------------------------------------------------
diff --git a/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/assembly.xml b/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/assembly.xml
index beb6f70..2875a8a 100644
--- a/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/assembly.xml
+++ b/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/assembly.xml
@@ -40,12 +40,20 @@
         </dependencySet>
     </dependencySets>
 
+    <!--
+       Adds startup scripts to the root directory of zip package. The startup
+       scripts are located to src/main/scripts directory as stated by Maven
+       conventions.
+    -->
+    <files>
+        <file>
+            <source>src/main/assembly/scripts/start.sh</source>
+            <outputDirectory></outputDirectory>
+            <fileMode>0755</fileMode>
+            <filtered>true</filtered>
+        </file>
+    </files>
     <fileSets>
-        <!--
-           Adds startup scripts to the root directory of zip package. The startup
-           scripts are located to src/main/scripts directory as stated by Maven
-           conventions.
-        -->
         <fileSet>
             <directory>src/main/assembly/scripts</directory>
             <outputDirectory></outputDirectory>
@@ -53,8 +61,11 @@
             <includes>
                 <include>*</include>
             </includes>
+            <excludes>
+                <exclude>start.sh</exclude>
+            </excludes>
         </fileSet>
-	   <!-- add additional files (but not marked executable) -->
+        <!--  add additional files (but not marked executable) -->
         <fileSet>
             <directory>src/main/assembly/files</directory>
             <outputDirectory></outputDirectory>
@@ -75,4 +86,3 @@
         </fileSet>
     </fileSets>
 </assembly>
-

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/208aeea1/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/scripts/start.sh
----------------------------------------------------------------------
diff --git a/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/scripts/start.sh b/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/scripts/start.sh
index 5f93b5b..2879b6d 100755
--- a/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/scripts/start.sh
+++ b/usage/archetypes/quickstart/src/brooklyn-sample/src/main/assembly/scripts/start.sh
@@ -29,12 +29,12 @@ if [ ! -x "$JAVA" ] ; then
   exit 1
 fi
 
-if [[ ! `ls brooklyn-sample-*.jar 2> /dev/null` ]] ; then
+if [[ ! `ls ${project.artifactId}-*.jar 2> /dev/null` ]] ; then
   echo Command must be run from the directory where the JAR is installed.
   exit 4
 fi
 
 $JAVA -Xms256m -Xmx1024m -XX:MaxPermSize=1024m \
     -classpath "conf/:patch/*:*:lib/*" \
-    com.acme.sample.brooklyn.SampleMain \
+    ${project.entry} \
     "$@"

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/208aeea1/usage/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
----------------------------------------------------------------------
diff --git a/usage/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml b/usage/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
index 8059d86..4768945 100644
--- a/usage/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
+++ b/usage/archetypes/quickstart/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -43,6 +43,7 @@
       <directory></directory>
       <includes>
         <include>**/*.png</include>
+        <include>**/*.sh</include>
       </includes>
     </fileSet>
     <fileSet filtered="true" packaged="false">
@@ -55,7 +56,8 @@
         <exclude>src/main/java/**</exclude> 
         <exclude>src/test/java/**</exclude> 
         <exclude>pom.xml</exclude>
-        <exclude>**.png</exclude> 
+        <exclude>**.png</exclude>
+        <exclude>**.sh</exclude>
       </excludes>
     </fileSet>
   </fileSets>


[3/3] git commit: This closes #222

Posted by al...@apache.org.
This closes #222


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/20472eb7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/20472eb7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/20472eb7

Branch: refs/heads/master
Commit: 20472eb73f79d93a5f54100e2198b5eed36317b2
Parents: deb1d9d 208aeea
Author: Aled Sage <al...@gmail.com>
Authored: Wed Oct 15 12:41:12 2014 +0100
Committer: Aled Sage <al...@gmail.com>
Committed: Wed Oct 15 12:41:12 2014 +0100

----------------------------------------------------------------------
 .gitattributes                                  |  1 +
 usage/archetypes/quickstart/pom.xml             |  8 +++++--
 .../quickstart/src/brooklyn-sample/pom.xml      |  2 ++
 .../src/main/assembly/assembly.xml              | 24 ++++++++++++++------
 .../src/main/assembly/scripts/start.sh          |  4 ++--
 .../META-INF/maven/archetype-metadata.xml       |  4 +++-
 6 files changed, 31 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/20472eb7/usage/archetypes/quickstart/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/20472eb7/usage/archetypes/quickstart/src/brooklyn-sample/pom.xml
----------------------------------------------------------------------