yetus-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [yetus] branch master updated: YETUS-823. releasedocmaker-jar-with-dependencies is missing dependencies
Date Sat, 30 Mar 2019 16:13:55 GMT
This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/master by this push:
     new ffcf2b9  YETUS-823. releasedocmaker-jar-with-dependencies is missing dependencies
ffcf2b9 is described below

commit ffcf2b9649a828a4f563e71e647c5f3d040256d3
Author: Allen Wittenauer <aw@apache.org>
AuthorDate: Mon Mar 25 13:27:50 2019 -0700

    YETUS-823. releasedocmaker-jar-with-dependencies is missing dependencies
    
    Signed-off-by: Allen Wittenauer <aw@apache.org>
---
 releasedocmaker/pom.xml                            |  8 ++--
 .../src/main/assemblies/jar-with-dependencies.xml  | 46 ++++++++++++++++++++++
 .../src/main/python/releasedocmaker/__init__.py    |  7 ++--
 3 files changed, 54 insertions(+), 7 deletions(-)

diff --git a/releasedocmaker/pom.xml b/releasedocmaker/pom.xml
index 9b6b7a2..6f93ab0 100644
--- a/releasedocmaker/pom.xml
+++ b/releasedocmaker/pom.xml
@@ -112,9 +112,9 @@
                   <mainClass>org.apache.yetus.releasedocmaker.ReleaseDocMaker</mainClass>
                 </manifest>
               </archive>
-              <descriptorRefs>
-                <descriptorRef>jar-with-dependencies</descriptorRef>
-              </descriptorRefs>
+              <descriptors>
+                <descriptor>src/main/assemblies/jar-with-dependencies.xml</descriptor>
+              </descriptors>
             </configuration>
           </execution>
 
@@ -127,7 +127,7 @@
         <version>${jython-compile-maven-plugin.version}</version>
         <executions>
           <execution>
-            <phase>package</phase>
+            <phase>compile</phase>
             <goals>
               <goal>jython</goal>
             </goals>
diff --git a/releasedocmaker/src/main/assemblies/jar-with-dependencies.xml b/releasedocmaker/src/main/assemblies/jar-with-dependencies.xml
new file mode 100644
index 0000000..3528e16
--- /dev/null
+++ b/releasedocmaker/src/main/assemblies/jar-with-dependencies.xml
@@ -0,0 +1,46 @@
+<?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.
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 http://maven.apache.org/xsd/assembly-2.0.0.xsd">
+  <!-- TODO: a jarjar format would be better -->
+  <id>jar-with-dependencies</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>/</outputDirectory>
+      <useProjectArtifact>true</useProjectArtifact>
+      <unpack>true</unpack>
+      <scope>runtime</scope>
+    </dependencySet>
+  </dependencySets>
+  <fileSets>
+    <fileSet>
+      <directory>${project.build.directory}/jython-plugins-tmp/Lib/site-packages</directory>
+      <outputDirectory>Lib</outputDirectory>
+      <includes>
+        <include>**</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>
diff --git a/releasedocmaker/src/main/python/releasedocmaker/__init__.py b/releasedocmaker/src/main/python/releasedocmaker/__init__.py
index ae70165..900f497 100755
--- a/releasedocmaker/src/main/python/releasedocmaker/__init__.py
+++ b/releasedocmaker/src/main/python/releasedocmaker/__init__.py
@@ -698,14 +698,15 @@ def main():
     if options.output_directory is not None:
         # Create the output directory if it does not exist.
         try:
-            os.makedirs(options.output_directory)
+            if not os.path.exists(options.output_directory):
+                os.makedirs(options.output_directory)
         except OSError as exc:
             if exc.errno == errno.EEXIST and os.path.isdir(
                     options.output_directory):
                 pass
             else:
-                print "Unable to create output directory %s: %s" % \
-                        (options.output_directory, exc.message)
+                print "Unable to create output directory %s: %u, %s" % \
+                        (options.output_directory, exc.errno, exc.message)
                 sys.exit(1)
         os.chdir(options.output_directory)
 


Mime
View raw message