You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-commits@incubator.apache.org by ng...@apache.org on 2006/11/18 22:29:34 UTC
svn commit: r476634 - in /incubator/ftpserver/trunk/distribution: ./ bin/
common/lib/ src/main/ src/main/assemblies/
Author: ngn
Date: Sat Nov 18 14:29:33 2006
New Revision: 476634
URL: http://svn.apache.org/viewvc?view=rev&rev=476634
Log:
Distribution package now works
Added:
incubator/ftpserver/trunk/distribution/bin/
incubator/ftpserver/trunk/distribution/bin/appendcp.bat
- copied unchanged from r476538, incubator/ftpserver/trunk/distribution/appendcp.bat
incubator/ftpserver/trunk/distribution/bin/ftpd.bat
- copied, changed from r476538, incubator/ftpserver/trunk/distribution/ftpd.bat
incubator/ftpserver/trunk/distribution/bin/ftpd.sh
- copied, changed from r476538, incubator/ftpserver/trunk/distribution/ftpd.sh
incubator/ftpserver/trunk/distribution/src/main/
incubator/ftpserver/trunk/distribution/src/main/assemblies/
incubator/ftpserver/trunk/distribution/src/main/assemblies/bin-with-dependencies.xml (with props)
incubator/ftpserver/trunk/distribution/src/main/assemblies/source-jar.xml (with props)
Removed:
incubator/ftpserver/trunk/distribution/appendcp.bat
incubator/ftpserver/trunk/distribution/ftpd.bat
incubator/ftpserver/trunk/distribution/ftpd.sh
incubator/ftpserver/trunk/distribution/maven.xml
incubator/ftpserver/trunk/distribution/project.properties
incubator/ftpserver/trunk/distribution/project.xml
Modified:
incubator/ftpserver/trunk/distribution/common/lib/README.txt
incubator/ftpserver/trunk/distribution/pom.xml
Copied: incubator/ftpserver/trunk/distribution/bin/ftpd.bat (from r476538, incubator/ftpserver/trunk/distribution/ftpd.bat)
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution/bin/ftpd.bat?view=diff&rev=476634&p1=incubator/ftpserver/trunk/distribution/ftpd.bat&r1=476538&p2=incubator/ftpserver/trunk/distribution/bin/ftpd.bat&r2=476634
==============================================================================
--- incubator/ftpserver/trunk/distribution/ftpd.bat (original)
+++ incubator/ftpserver/trunk/distribution/bin/ftpd.bat Sat Nov 18 14:29:33 2006
@@ -21,19 +21,43 @@
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal
+REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo ERROR: JAVA_HOME not found in your environment.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto setFtpHome
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory.
+echo JAVA_HOME = %JAVA_HOME%
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:setFtpHome
+
rem ----- use the location of this script to infer $FTPD_HOME -------
-if NOT "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=.
-if "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=%~dp0
-if "%OS%"=="WINNT" set DEFAULT_FTPD_HOME=%~dp0
+if NOT "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=..
+if "%OS%"=="Windows_NT" set DEFAULT_FTPD_HOME=%~dp0\..
+if "%OS%"=="WINNT" set DEFAULT_FTPD_HOME=%~dp0\..
if "%FTPD_HOME%"=="" set FTPD_HOME=%DEFAULT_FTPD_HOME%
rem ----- Create CLASSPATH --------------------------------------------
-set FTPD_CLASSPATH=%CLASSPATH%;%FTPD_HOME%\common\classes;%FTPD_HOME%\target\classes;
+set FTPD_CLASSPATH=%CLASSPATH%;%FTPD_HOME%\common\classes;
cd /d "%FTPD_HOME%\common\lib"
-for %%i in ("*.jar") do call "%FTPD_HOME%\appendcp.bat" "%FTPD_HOME%\common\lib\%%i"
+for %%i in ("*.jar") do call "%FTPD_HOME%\bin\appendcp.bat" "%FTPD_HOME%\common\lib\%%i"
cd /d %FTPD_HOME%
rem ----- call java.. ---------------------------------------------------
set MAIN_CLASS=org.apache.ftpserver.commandline.CommandLine
set JAVA_CMD=%JAVA_HOME%\bin\java
+
"%JAVA_CMD%" -classpath "%FTPD_CLASSPATH%" %MAIN_CLASS% %*
Copied: incubator/ftpserver/trunk/distribution/bin/ftpd.sh (from r476538, incubator/ftpserver/trunk/distribution/ftpd.sh)
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution/bin/ftpd.sh?view=diff&rev=476634&p1=incubator/ftpserver/trunk/distribution/ftpd.sh&r1=476538&p2=incubator/ftpserver/trunk/distribution/bin/ftpd.sh&r2=476634
==============================================================================
--- incubator/ftpserver/trunk/distribution/ftpd.sh (original)
+++ incubator/ftpserver/trunk/distribution/bin/ftpd.sh Sat Nov 18 14:29:33 2006
@@ -53,10 +53,9 @@
realpath=$whereami/$whoami
;;
esac
- FTPD_HOME=`dirname "$realpath"`
+ FTPD_HOME=`dirname "$realpath"`/..
fi
-
#
# For Cygwin, ensure paths are in UNIX format before anything is touched
#
@@ -108,9 +107,9 @@
# Build classpath
#
if [ "$cygwin" = "true" ] ; then
- FTPD_CLASSPATH=$CLASSPATH$S`cygpath -w $FTPD_HOME/common/classes`$S`cygpath -w $FTPD_HOME/target/classes`
+ FTPD_CLASSPATH=$CLASSPATH$S`cygpath -w $FTPD_HOME/common/classes`
else
- FTPD_CLASSPATH=$CLASSPATH$S$FTPD_HOME/common/classes$S$FTPD_HOME/target/classes
+ FTPD_CLASSPATH=$CLASSPATH$S$FTPD_HOME/common/classes
fi
for i in $FTPD_HOME/common/lib/*.jar; do
Modified: incubator/ftpserver/trunk/distribution/common/lib/README.txt
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution/common/lib/README.txt?view=diff&rev=476634&r1=476633&r2=476634
==============================================================================
--- incubator/ftpserver/trunk/distribution/common/lib/README.txt (original)
+++ incubator/ftpserver/trunk/distribution/common/lib/README.txt Sat Nov 18 14:29:33 2006
@@ -2,10 +2,3 @@
--------------------
You can keep your other jar files here. All the jar files in this directory
will be available to the FTP server.
-
-
-Source Distribution
--------------------
-Maven copies all the dependent jar files here if you run ftpserver:build goal.
-You can keep your other jar files in this directory. The FTP server scripts
-add all the jar files in this directory in CLASSPATH.
Modified: incubator/ftpserver/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution/pom.xml?view=diff&rev=476634&r1=476633&r2=476634
==============================================================================
--- incubator/ftpserver/trunk/distribution/pom.xml (original)
+++ incubator/ftpserver/trunk/distribution/pom.xml Sat Nov 18 14:29:33 2006
@@ -20,38 +20,96 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.ftpserver</groupId>
- <artifactId>ftpserver</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <artifactId>ftpserver-parent</artifactId>
+ <version>1.0-incubator-SNAPSHOT</version>
</parent>
<groupId>org.apache.ftpserver</groupId>
- <artifactId>ftpserver-core</artifactId>
- <packaging>jar</packaging>
+ <artifactId>ftpserver</artifactId>
<version>1.0-incubator-SNAPSHOT</version>
- <name>Apache Incubator FtpServer Core</name>
+ <name>Apache Incubator FtpServer</name>
+ <packaging>pom</packaging>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/core</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/ftpserver/trunk/core</developerConnection>
- <url>http://svn.apache.org/viewvc/incubator/ftpserver/trunk/core</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/ftpserver/trunk/distribution</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/ftpserver/trunk/distribution</developerConnection>
+ <url>http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution</url>
</scm>
- <reporting>
+ <build>
<plugins>
<plugin>
- <artifactId>maven-javadoc-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>jxr-maven-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <echo>Copying sources for source jar</echo>
+ <mkdir dir="${basedir}/target/sources"></mkdir>
+ <copy todir="${basedir}/target/sources">
+ <fileset dir="${basedir}/../core/src/java"></fileset>
+ <fileset dir="${basedir}/../ftplet-api/src/java"></fileset>
+ <fileset dir="${basedir}/../admin-gui/src/java"></fileset>
+ </copy>
+
+ <echo>Creating JavaDoc</echo>
+ <javadoc defaultexcludes="yes" useexternalfile="yes" destdir="${project.build.directory}/api" use="true" packagenames="org.apache.ftpserver.*" windowtitle="Apache FTP Server ${project.version} API" author="true" version="true">
+ <fileset defaultexcludes="yes" dir="./target/sources/">
+ <include name="**/*.java"></include>
+ </fileset>
+ <classpath refid="maven.compile.classpath"/>
+ <doctitle><h1>Apache FTP Server</h1></doctitle>
+ <!--<link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api/"></link>-->
+ </javadoc>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>site</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>site</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.1</version>
+ <executions>
+ <execution>
+ <id>bin</id>
+ <phase>package</phase>
+ <goals>
+ <goal>assembly</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assemblies/bin-with-dependencies.xml</descriptor>
+ <descriptor>src/main/assemblies/source-jar.xml</descriptor>
+ </descriptors>
+ <finalName>ftpserver-${version}</finalName>
+ <outputDirectory>target/distro</outputDirectory>
+ <workDirectory>target/work</workDirectory>
+ </configuration>
+ </execution>
+ </executions>
</plugin>
+
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
@@ -68,34 +126,11 @@
</reportSet>
</reportSets>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- </plugin>
</plugins>
</reporting>
- <build>
- <resources>
- <resource>
- <directory>src/java</directory>
- <includes>
- <include>**/*.properties</include>
- </includes>
- </resource>
-
- </resources>
- <testResources>
- <testResource>
- <directory>src/test</directory>
- <includes>
- <include>*.properties</include>
- </includes>
-
- </testResource>
- </testResources>
- </build>
+
<dependencies>
<dependency>
<groupId>org.apache.ftpserver</groupId>
@@ -103,6 +138,16 @@
<version>1.0-incubator-SNAPSHOT</version>
</dependency>
<dependency>
+ <groupId>org.apache.ftpserver</groupId>
+ <artifactId>ftpserver-core</artifactId>
+ <version>1.0-incubator-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ftpserver</groupId>
+ <artifactId>ftpserver-admin-gui</artifactId>
+ <version>1.0-incubator-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
@@ -125,37 +170,10 @@
</exclusion>
</exclusions>
</dependency>
-
- <!--Only used for testing -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.13</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-net</groupId>
- <artifactId>commons-net</artifactId>
- <version>1.4.0</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>oro</groupId>
- <artifactId>oro</artifactId>
- <version>2.0.8</version>
- <scope>test</scope>
</dependency>
</dependencies>
</project>
Added: incubator/ftpserver/trunk/distribution/src/main/assemblies/bin-with-dependencies.xml
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution/src/main/assemblies/bin-with-dependencies.xml?view=auto&rev=476634
==============================================================================
--- incubator/ftpserver/trunk/distribution/src/main/assemblies/bin-with-dependencies.xml (added)
+++ incubator/ftpserver/trunk/distribution/src/main/assemblies/bin-with-dependencies.xml Sat Nov 18 14:29:33 2006
@@ -0,0 +1,51 @@
+<assembly>
+ <id></id>
+ <formats>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <includeSiteDirectory>true</includeSiteDirectory>
+ <fileSets>
+ <fileSet>
+ <includes>
+ <include>README*</include>
+ <include>LICENSE*</include>
+ <include>NOTICE*</include>
+ <include>common/**</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>res</directory>
+ <outputDirectory>res</outputDirectory>
+ <excludes>
+ <exclude>*.gen</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>*.bat</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>bin</directory>
+ <outputDirectory>bin</outputDirectory>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ <fileMode>755</fileMode>
+ </fileSet>
+ <fileSet>
+ <directory>target/api</directory>
+ <outputDirectory>/site/api</outputDirectory>
+ </fileSet>
+ </fileSets>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>common/lib</outputDirectory>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
\ No newline at end of file
Propchange: incubator/ftpserver/trunk/distribution/src/main/assemblies/bin-with-dependencies.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/ftpserver/trunk/distribution/src/main/assemblies/source-jar.xml
URL: http://svn.apache.org/viewvc/incubator/ftpserver/trunk/distribution/src/main/assemblies/source-jar.xml?view=auto&rev=476634
==============================================================================
--- incubator/ftpserver/trunk/distribution/src/main/assemblies/source-jar.xml (added)
+++ incubator/ftpserver/trunk/distribution/src/main/assemblies/source-jar.xml Sat Nov 18 14:29:33 2006
@@ -0,0 +1,21 @@
+<assembly>
+ <id>source</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <outputDirectory>META-INF</outputDirectory>
+ <includes>
+ <include>README*</include>
+ <include>LICENSE*</include>
+ <include>NOTICE*</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/sources</directory>
+ <outputDirectory/>
+ </fileSet>
+ </fileSets>
+</assembly>
Propchange: incubator/ftpserver/trunk/distribution/src/main/assemblies/source-jar.xml
------------------------------------------------------------------------------
svn:eol-style = native