Building Compiere from Source

For those who ventured too far - just hope they know their way back :)

Moderator: neilg

Building Compiere from Source

Postby simran » Sun Jan 23, 2005 3:14 pm

Hi,

I am trying to build Compiere from source. I have downloaded the source code for version 251f and made the necessary changes to the file myDevEnv.bat in the folder utils_dev. When I run the file RUN_build.bat from the same folder, it seems to go on and on and not stop running. This is the output I get:

C:\CompiereSource_251f\compiere-all\utils_dev>RUN_build.bat
keytool usage:

-certreq [-v] [-alias <alias>] [-sigalg <sigalg>]
[-file <csr_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-delete [-v] -alias <alias>
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-export [-v] [-rfc] [-alias <alias>] [-file <cert_file>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-genkey [-v] [-alias <alias>] [-keyalg <keyalg>]
[-keysize <keysize>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-help

-identitydb [-v] [-file <idb_file>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-import [-v] [-noprompt] [-trustcacerts] [-alias <alias>]
[-file <cert_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-keyclone [-v] [-alias <alias>] -dest <dest_alias>
[-keypass <keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-keypasswd [-v] [-alias <alias>]
[-keypass <old_keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-list [-v | -rfc] [-alias <alias>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-printcert [-v] [-file <cert_file>]

-selfcert [-v] [-alias <alias>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-storepasswd [-v] [-new <new_storepass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

No Java Keystore found, creating ...

C:\CompiereSource_251f\com
piere-all\utils_dev>SET KEYTOOL_DNAME="CN=myName, OU=myName, O=myOrg, L=myTown,
ST=myState, C=US"

C:\CompiereSource_251f\com
piere-all\utils_dev>C:\Sun\AppServer\jdk1.4.2\bin\keytool -genkey -keyalg rsa -a
lias compiere -dname "CN=myName, OU=myName, O=myOrg, L=myTown, ST=myState, C=US"
-keypass myPassword -validity 365 -keystore C:\CompiereSource_251f\compiere-all\keystore\myKeystore
-storepass myPassword
keytool usage:

-certreq [-v] [-alias <alias>] [-sigalg <sigalg>]
[-file <csr_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-delete [-v] -alias <alias>
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-export [-v] [-rfc] [-alias <alias>] [-file <cert_file>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-genkey [-v] [-alias <alias>] [-keyalg <keyalg>]
[-keysize <keysize>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-help

-identitydb [-v] [-file <idb_file>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-import [-v] [-noprompt] [-trustcacerts] [-alias <alias>]
[-file <cert_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-keyclone [-v] [-alias <alias>] -dest <dest_alias>
[-keypass <keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-keypasswd [-v] [-alias <alias>]
[-keypass <old_keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-list [-v | -rfc] [-alias <alias>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-printcert [-v] [-file <cert_file>]

-selfcert [-v] [-alias <alias>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-storepasswd [-v] [-new <new_storepass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...


C:\CompiereSource_251f\com
piere-all\utils_dev>C:\Sun\AppServer\jdk1.4.2\bin\keytool -selfcert -alias compi
ere -dname "CN=myName, OU=myName, O=myOrg, L=myTown, ST=myState, C=US" -keypass
myPassword -validity 180 -keystore C:\CompiereSource_251f\compiere-all\keystore\myKeystore -storepas
s myPassword
^Ckeytool usage:

-certreq [-v] [-alias <alias>] [-sigalg <sigalg>]
[-file <csr_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-delete [-v] -alias <alias>
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-export [-v] [-rfc] [-alias <alias>] [-file <cert_file>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-genkey [-v] [-alias <alias>] [-keyalg <keyalg>]
[-keysize <keysize>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-help

-identitydb [-v] [-file <idb_file>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-import [-v] [-noprompt] [-trustcacerts] [-alias <alias>]
[-file <cert_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-keyclone [-v] [-alias <alias>] -dest <dest_alias>
[-keypass <keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-keypasswd [-v] [-alias <alias>]
[-keypass <old_keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-list [-v | -rfc] [-alias <alias>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

-printcert [-v] [-file <cert_file>]

-selfcert [-v] [-alias <alias>] [-sigalg <sigalg>]
[-dname <dname>] [-validity <valDays>]
[-keypass <keypass>] [-keystore <keystore>]
[-storepass <storepass>] [-storetype <storetype>]
[-provider <provider_class_name>] ...

-storepasswd [-v] [-new <new_storepass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-provider <provider_class_name>] ...

It seems to repeat the process of creating the keystore, without coming to an end. Any advice as to what I'm doing wrong would be very much appreciated...also, no binaries seem to have been created in the target directory or in compiere-all\install\build\

Thanks,
simran
simran
 
Posts: 3
Joined: Thu Jan 20, 2005 2:15 pm

Postby red1 » Mon Jan 24, 2005 9:07 am

Hi Simran,
U may force the creation of the KeyStore manually to break the so called emdless loop, which i have not experienced before, and i dont know why yet it should in your case.

Perhaps u can dump your modified MyDevEnv bat here for us to see.

many regards
red1
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby simran » Mon Jan 24, 2005 9:29 pm

Thanks for your reply, the contents of myDevEnv.bat are below:


@Rem My Development Environment
@Rem
@Rem This script sets variable for compiling Compiere from source
@Rem
@Rem
@Rem $Header: /cvsroot/compiere/utils_dev/myDevEnvTemplate.bat,v 1.16 2004/05/09 04:54:03 jjanke Exp $


@Rem Check the following parameters:
@Rem -------------------------------

@Rem Set Java Home
@SET JAVA_HOME=C:\Sun\AppServer\jdk1.4.2
@IF NOT EXIST %JAVA_HOME%\bin ECHO "** JAVA_HOME NOT found"
@SET PATH=%JAVA_HOME%\bin;%PATH%

@Rem Set Compiere Source Directory
@SET COMPIERE_SOURCE=C:\CompiereSource_251f\compiere-all
@IF NOT EXIST %JAVA_HOME%\bin ECHO "** COMPIERE_SOURCE NOT found"

@Rem Passwords for the keystore
@SET KEYTOOL_PASS=%KEY_PASSWORD%
@IF "%KEYTOOL_PASS%"=="" SET KEYTOOL_PASS=myPassword

@Rem Keystore & FTP Password
@SET ANT_PROPERTIES=-Dpassword=%KEYTOOL_PASS% -DftpPassword=%FTP_PASSWORD%

@Rem Ant to send email after completion - change or delete
@SET ANT_PROPERTIES=%ANT_PROPERTIES% -DMailLogger.mailhost=xxx -DMailLogger.from=xxxx -DMailLogger.failure.to=xxxx -DMailLogger.success.to=xxxx

@Rem Automatic Installation - Where Compiere2 will be unzipped
@SET COMPIERE_ROOT=C:\
@Rem Automatic Installation - Resulting Home Directory
@SET COMPIERE_HOME=%COMPIERE_ROOT%Compiere2
@Rem Automatic Installation - Share for final Installers
@SET COMPIERE_INSTALL=C:\Install
@IF NOT EXIST %COMPIERE_INSTALL% Mkdir %COMPIERE_INSTALL%


@Rem ---------------------------------------------------------------
@Rem In most cases you don't need to change anything below this line
@Rem If you need to define something manually do it above this line,
@Rem it should work, since most variables are checked before set.
@Rem ---------------------------------------------------------------

@SET CURRENTDIR=%CD%

@Rem Set Version
@SET COMPIERE_VERSION=Custom
@SET COMPIERE_VERSION_FILE=C251
@SET COMPIERE_VENDOR=Unsupported

@Rem ClassPath
@IF NOT EXIST %JAVA_HOME%\lib\tools.jar ECHO "** Need Full Java SDK **"
@SET CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar

@IF NOT EXIST %COMPIERE_SOURCE%\tools\lib\ant.jar ECHO "** Ant.jar NOT found **"
@SET CLASSPATH=%CLASSPATH%;%COMPIERE_SOURCE%\tools\lib\ant.jar;%COMPIERE_SOURCE%\tools\lib\ant-launcher.jar;%COMPIERE_SOURCE%\tools\lib\ant-swing.jar;%COMPIERE_SOURCE%\tools\lib\ant-commons-net.jar;%COMPIERE_SOURCE%\tools\lib\commons-net.jar
@Rem SET CLASSPATH=%CLASSPATH%;%COMPIERE_SOURCE%\jboss\lib\xml-apis.jar


@Rem Set XDoclet 1.1.2 Environment
@SET XDOCLET_HOME=%COMPIERE_SOURCE%\tools

@Rem Java Keystore for signing jars
@IF NOT EXIST %COMPIERE_SOURCE%\keystore MKDIR %COMPIERE_SOURCE%\keystore
@IF EXIST %COMPIERE_SOURCE%\keystore\myKeystore GOTO CHECKKEYVALUE

:CREATECOMPIEREKEY
@Echo No Java Keystore found, creating ...
@Rem .
@Rem This is the keystore for code signing.
@Rem Replace it with the official certificate.
@Rem Note that this is not the SSL certificate.
@Rem .

SET KEYTOOL_DNAME="CN=myName, OU=myName, O=myOrg, L=myTown, ST=myState, C=US"

%JAVA_HOME%\bin\keytool -genkey -keyalg rsa -alias compiere -dname %KEYTOOL_DNAME% -keypass %KEYTOOL_PASS% -validity 365 -keystore %COMPIERE_SOURCE%\keystore\myKeystore -storepass %KEYTOOL_PASS%

%JAVA_HOME%\bin\keytool -selfcert -alias compiere -dname %KEYTOOL_DNAME% -keypass %KEYTOOL_PASS% -validity 180 -keystore %COMPIERE_SOURCE%\keystore\myKeystore -storepass %KEYTOOL_PASS%

:CHECKKEYVALUE
@%JAVA_HOME%\bin\keytool -list -alias compiere -keyStore %COMPIERE_SOURCE%\keystore\myKeystore -storepass %KEYTOOL_PASS%
@IF ERRORLEVEL 1 GOTO :CREATECOMPIEREKEY

@Rem Set COMPIERE_ENV for all other scripts.
@SET COMPIERE_ENV=Y

Regards,
Simran
simran
 
Posts: 3
Joined: Thu Jan 20, 2005 2:15 pm

Postby marlom9000 » Mon Jan 24, 2005 10:14 pm

Don't know... but it seems you just invoke the keytool in the wrong way.
Maybe editing the file you broke the long command lines it has.

Or it could be an error in the CVS head. Checkout another release and try to run it.
Then compare the 2 RUN_build.

As soon as you can migrate to GNU/Linux, it always help... soon or late ;-)

Mar
Compilo subAdministrator
--------------------------------------
Harmony is action without effort.
marlom9000
 
Posts: 5
Joined: Sun Oct 10, 2004 3:18 am
Location: Lucca, Italy.

Postby simran » Wed Jan 26, 2005 9:32 pm

Thank you...it was a problem with the way the keytool was invoked...I don't get the error anymore :)
simran
 
Posts: 3
Joined: Thu Jan 20, 2005 2:15 pm

Building Compiere from compiere source

Postby antony_praveen80 » Wed Oct 19, 2005 8:35 pm

Hi All !!,
How to build compiere from compiere source?. I am getting the error incorrect keystore password.
antony_praveen80
 
Posts: 5
Joined: Wed Sep 21, 2005 1:43 pm

Postby red1 » Wed Oct 19, 2005 11:06 pm

this is a common problem that has been replied in many places. Pls research bit more, and i will delete such questions in future.
red1
Site Admin
 
Posts: 2760
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby imantri » Mon Mar 06, 2006 3:31 pm

So did I, downloaded the same source. After edit myDevEnv.bat and run run_buid.bat i got the following error message :

makedir:

compile:
[javac] Compiling 574 source files to D:\compiere-all\dbPort\build
[javac] D:\compiere-all\dbPort\src\org\compiere\db\DB_Oracle.java:25: packag
e org.apache.xalan.lib.sql does not exist
[javac] import org.apache.xalan.lib.sql.*;
[javac] ^
[javac] D:\compiere-all\dbPort\src\org\compiere\util\DB.java:514: reference
to Timestamp is ambiguous, both class java.sql.Timestamp in java.sql and class j
ava.security.Timestamp in java.security match
[javac] KeyNamePair org, KeyNamePair warehouse, Timestamp timest
amp, String printerName)
[javac] ^
[javac] D:\compiere-all\dbPort\src\org\compiere\util\DB.java:1930: reference
to Timestamp is ambiguous, both class java.sql.Timestamp in java.sql and class
java.security.Timestamp in java.security match
[javac] public static String TO_DATE (Timestamp time, boolean dayOnly)
[javac] ^
[javac] D:\compiere-all\dbPort\src\org\compiere\util\DB.java:1960: reference
to Timestamp is ambiguous, both class java.sql.Timestamp in java.sql and class
java.security.Timestamp in java.security match
[javac] public static String TO_DATE (Timestamp day)
[javac] ^
[javac] D:\compiere-all\dbPort\src\org\compiere\util\Splash.java:138: warnin
g: [deprecation] show() in java.awt.Window has been deprecated
[javac] public void show()
[javac] ^
[javac] D:\compiere-all\dbPort\src\org\compiere\util\Splash.java:138: warnin
g: [deprecation] show() in java.awt.Component has been deprecated
[javac] public void show()
[javac] ^
[javac] D:\compiere-all\dbPort\src\org\compiere\util\Splash.java:140: warnin
g: [deprecation] show() in java.awt.Window has been deprecated
[javac] super.show();
[javac] ^
[javac] 4 errors
[javac] 3 warnings

BUILD FAILED
D:\compiere-all\utils_dev\build.xml:21: Following error occured while executing
this line
D:\compiere-all\dbPort\build.xml:55: Compile failed; see the compiler error outp
ut for details.

Total time: 47 seconds
MailLogger failed to send e-mail!
java.net.UnknownHostException: xxx
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at org.apache.tools.mail.MailMessage.connect(MailMessage.java:392)
at org.apache.tools.mail.MailMessage.<init>(MailMessage.java:175)
at org.apache.tools.ant.listener.MailLogger.sendMail(MailLogger.java:203
)
at org.apache.tools.ant.listener.MailLogger.buildFinished(MailLogger.jav
a:137)
at org.apache.tools.ant.Project.fireBuildFinished(Project.java:1797)
at org.apache.tools.ant.Main.runBuild(Main.java:652)
at org.apache.tools.ant.Main.startAnt(Main.java:183)
at org.apache.tools.ant.Main.start(Main.java:147)
at org.apache.tools.ant.Main.main(Main.java:230)


I have look up DB_Oracle.java and found the file in the directory.
Please inform us how solve this problem.

Regards,
Iman
imantri
 
Posts: 1
Joined: Mon Mar 06, 2006 3:19 pm

Dont modify the source code

Postby neilg » Wed Apr 05, 2006 9:05 am

Please remember that for production code you should not modify the source code at all but use the classpath to override the classes you wish to modify.

Even in test mode not necessary to touch the source.

Just mentioning it because it is so important and in case you didn't know already.
neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm


Return to Strictly Technical

Who is online

Users browsing this forum: No registered users and 1 guest

cron