Hi dev,
I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. Actually with the default configuration of Eclipse only 1 warning is still active: The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services org.ofbiz.security.authz.da.DynamicAccessHandler Someone knows if it's necessary and how to fix it ? Thanks in advance Marco |
Administrator
|
Hi Marco,
I have tried the following patch locally and I get a lot of warnings. Index: applications/order/build.xml =================================================================== --- applications/order/build.xml (revision 1081008) +++ applications/order/build.xml (working copy) @@ -59,6 +59,7 @@ <javac16> <!-- exclude the payment processor packages; comment if you have libs --> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> + <compilerarg value="-Xlint"/> </javac16> </target> Index: common.xml =================================================================== --- common.xml (revision 1081008) +++ common.xml (working copy) @@ -90,7 +90,9 @@ <!-- ================================================================== --> <target name="classes" depends="prepare"> - <javac16/> + <javac16> + <compilerarg value="-Xlint"/> + </javac16> </target> <target name="jar" depends="classes"> Index: framework/base/build.xml =================================================================== --- framework/base/build.xml (revision 1081008) +++ framework/base/build.xml (working copy) @@ -87,7 +87,9 @@ </target> <target name="classes" depends="prepare,gen-src"> - <javac16/> + <javac16> + <compilerarg value="-Xlint"/> + </javac16> </target> <target name="jar" depends="classes"> Index: framework/bi/build.xml =================================================================== --- framework/bi/build.xml (revision 1081008) +++ framework/bi/build.xml (working copy) @@ -46,6 +46,8 @@ <!-- ================================================================== --> <target name="classes" depends="prepare"> - <javac16 classpathref="local.class.path"/> + <javac16 classpathref="local.class.path"> + <compilerarg value="-Xlint"/> + </javac16> </target> </project> Index: framework/sql/build.xml =================================================================== --- framework/sql/build.xml (revision 1081008) +++ framework/sql/build.xml (working copy) @@ -61,7 +61,9 @@ </target> <target name="classes" depends="prepare,gen-src"> - <javac16/> + <javac16> + <compilerarg value="-Xlint"/> + </javac16> </target> <target name="jar" depends="classes"> Index: framework/start/build.xml =================================================================== --- framework/start/build.xml (revision 1081008) +++ framework/start/build.xml (working copy) @@ -34,7 +34,10 @@ <target name="classes" depends="prepare"> <!-- compile start --> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> + <compilerarg value="-Xlint"/> + </javac16> + </target> <target name="jar" depends="classes"> Index: specialpurpose/build.xml =================================================================== --- specialpurpose/build.xml (revision 1081008) +++ specialpurpose/build.xml (working copy) @@ -33,6 +33,7 @@ projectmgr/build.xml, ldap/build.xml, crowd/build.xml, + webui/build.xml, googlecheckout/build.xml"/> <!-- For the Web POS add "webpos/build.xml" to the list above --> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> Index: specialpurpose/shark/build.xml =================================================================== --- specialpurpose/shark/build.xml (revision 1081008) +++ specialpurpose/shark/build.xml (working copy) @@ -55,6 +55,7 @@ <target name="classes" depends="prepare"> <javac16> <src path="${src.dir}"/> + <compilerarg value="-Xlint"/> </javac16> </target> I wanted to commit it, but now I prefer to share this experience and discuss about it BTW I'm not quire sure about your question below Thanks Jacques From: <[hidden email]> > Hi dev, > > I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. > > Actually with the default configuration of Eclipse only 1 warning is still active: > > The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler and > was not copied to the output folder /ofbiz/framework/security/src/META-INF/services > org.ofbiz.security.authz.da.DynamicAccessHandler > > Someone knows if it's necessary and how to fix it ? > > Thanks in advance > Marco > |
Administrator
|
Sorry wrong patch (no webui component by default, I test it from OFBIZ-3877)
Here is the right patch Index: applications/order/build.xml =================================================================== --- applications/order/build.xml (revision 1081022) +++ applications/order/build.xml (working copy) @@ -59,6 +59,7 @@ <javac16> <!-- exclude the payment processor packages; comment if you have libs --> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> + <compilerarg value="-Xlint"/> </javac16> </target> Index: common.xml =================================================================== --- common.xml (revision 1081022) +++ common.xml (working copy) @@ -90,7 +90,9 @@ <!-- ================================================================== --> <target name="classes" depends="prepare"> - <javac16/> + <javac16> + <compilerarg value="-Xlint"/> + </javac16> </target> <target name="jar" depends="classes"> Index: framework/base/build.xml =================================================================== --- framework/base/build.xml (revision 1081022) +++ framework/base/build.xml (working copy) @@ -87,7 +87,9 @@ </target> <target name="classes" depends="prepare,gen-src"> - <javac16/> + <javac16> + <compilerarg value="-Xlint"/> + </javac16> </target> <target name="jar" depends="classes"> Index: framework/bi/build.xml =================================================================== --- framework/bi/build.xml (revision 1081022) +++ framework/bi/build.xml (working copy) @@ -46,6 +46,8 @@ <!-- ================================================================== --> <target name="classes" depends="prepare"> - <javac16 classpathref="local.class.path"/> + <javac16 classpathref="local.class.path"> + <compilerarg value="-Xlint"/> + </javac16> </target> </project> Index: framework/sql/build.xml =================================================================== --- framework/sql/build.xml (revision 1081022) +++ framework/sql/build.xml (working copy) @@ -61,7 +61,9 @@ </target> <target name="classes" depends="prepare,gen-src"> - <javac16/> + <javac16> + <compilerarg value="-Xlint"/> + </javac16> </target> <target name="jar" depends="classes"> Index: framework/start/build.xml =================================================================== --- framework/start/build.xml (revision 1081022) +++ framework/start/build.xml (working copy) @@ -34,7 +34,10 @@ <target name="classes" depends="prepare"> <!-- compile start --> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> + <compilerarg value="-Xlint"/> + </javac16> + </target> <target name="jar" depends="classes"> Index: specialpurpose/shark/build.xml =================================================================== --- specialpurpose/shark/build.xml (revision 1081022) +++ specialpurpose/shark/build.xml (working copy) @@ -55,6 +55,7 @@ <target name="classes" depends="prepare"> <javac16> <src path="${src.dir}"/> + <compilerarg value="-Xlint"/> </javac16> </target> BTW there are some interseting things, like wrong libs names: [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory Jacques From: "Jacques Le Roux" <[hidden email]> > Hi Marco, > > I have tried the following patch locally and I get a lot of warnings. > > Index: applications/order/build.xml > =================================================================== > --- applications/order/build.xml (revision 1081008) > +++ applications/order/build.xml (working copy) > @@ -59,6 +59,7 @@ > <javac16> > <!-- exclude the payment processor packages; comment if you have libs --> > <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> > + <compilerarg value="-Xlint"/> > </javac16> > </target> > > Index: common.xml > =================================================================== > --- common.xml (revision 1081008) > +++ common.xml (working copy) > @@ -90,7 +90,9 @@ > <!-- ================================================================== --> > > <target name="classes" depends="prepare"> > - <javac16/> > + <javac16> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > > <target name="jar" depends="classes"> > Index: framework/base/build.xml > =================================================================== > --- framework/base/build.xml (revision 1081008) > +++ framework/base/build.xml (working copy) > @@ -87,7 +87,9 @@ > </target> > > <target name="classes" depends="prepare,gen-src"> > - <javac16/> > + <javac16> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > > <target name="jar" depends="classes"> > Index: framework/bi/build.xml > =================================================================== > --- framework/bi/build.xml (revision 1081008) > +++ framework/bi/build.xml (working copy) > @@ -46,6 +46,8 @@ > <!-- ================================================================== --> > > <target name="classes" depends="prepare"> > - <javac16 classpathref="local.class.path"/> > + <javac16 classpathref="local.class.path"> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > </project> > Index: framework/sql/build.xml > =================================================================== > --- framework/sql/build.xml (revision 1081008) > +++ framework/sql/build.xml (working copy) > @@ -61,7 +61,9 @@ > </target> > > <target name="classes" depends="prepare,gen-src"> > - <javac16/> > + <javac16> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > > <target name="jar" depends="classes"> > Index: framework/start/build.xml > =================================================================== > --- framework/start/build.xml (revision 1081008) > +++ framework/start/build.xml (working copy) > @@ -34,7 +34,10 @@ > > <target name="classes" depends="prepare"> > <!-- compile start --> > - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> > + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> > + <compilerarg value="-Xlint"/> > + </javac16> > + > </target> > > <target name="jar" depends="classes"> > Index: specialpurpose/build.xml > =================================================================== > --- specialpurpose/build.xml (revision 1081008) > +++ specialpurpose/build.xml (working copy) > @@ -33,6 +33,7 @@ > projectmgr/build.xml, > ldap/build.xml, > crowd/build.xml, > + webui/build.xml, > googlecheckout/build.xml"/> > <!-- For the Web POS add "webpos/build.xml" to the list above --> > <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> > Index: specialpurpose/shark/build.xml > =================================================================== > --- specialpurpose/shark/build.xml (revision 1081008) > +++ specialpurpose/shark/build.xml (working copy) > @@ -55,6 +55,7 @@ > <target name="classes" depends="prepare"> > <javac16> > <src path="${src.dir}"/> > + <compilerarg value="-Xlint"/> > </javac16> > </target> > > I wanted to commit it, but now I prefer to share this experience and discuss about it > > BTW I'm not quire sure about your question below > > Thanks > > Jacques > > > From: <[hidden email]> >> Hi dev, >> >> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >> >> Actually with the default configuration of Eclipse only 1 warning is still active: >> >> The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >> org.ofbiz.security.authz.da.DynamicAccessHandler >> >> Someone knows if it's necessary and how to fix it ? >> >> Thanks in advance >> Marco >> > > |
Hi Jacques,
I have removed some redundant cast warming but if you set all the warning on eclipse to warning where they are ignore you will get many others. So we have to decide if we would like to remove all the warning or simply the ones intercepted by the build. In your patch was missing this one: Index: macros.xml =================================================================== --- macros.xml (revision 1081059) +++ macros.xml (working copy) @@ -73,9 +73,7 @@ <presetdef name="javac16"> <default-javac compiler="javac1.6" target="1.6" source="1.6" encoding="UTF-8" sourcepathref="src-path" includeantruntime="false"> - <!-- - <compilerarg value="-Xlint:unchecked"/> - --> + <compilerarg value="-Xlint"/> </default-javac> </presetdef> I could say that I could fix some of them when I will get the time but I did not know when :-) Thanks Marco Il giorno 13/mar/2011, alle ore 01.38, Jacques Le Roux ha scritto: > Sorry wrong patch (no webui component by default, I test it from OFBIZ-3877) > > Here is the right patch > > Index: applications/order/build.xml > =================================================================== > --- applications/order/build.xml (revision 1081022) > +++ applications/order/build.xml (working copy) > @@ -59,6 +59,7 @@ > <javac16> > <!-- exclude the payment processor packages; comment if you have libs --> > <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> > + <compilerarg value="-Xlint"/> > </javac16> > </target> > > Index: common.xml > =================================================================== > --- common.xml (revision 1081022) > +++ common.xml (working copy) > @@ -90,7 +90,9 @@ > <!-- ================================================================== --> > > <target name="classes" depends="prepare"> > - <javac16/> > + <javac16> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > > <target name="jar" depends="classes"> > Index: framework/base/build.xml > =================================================================== > --- framework/base/build.xml (revision 1081022) > +++ framework/base/build.xml (working copy) > @@ -87,7 +87,9 @@ > </target> > > <target name="classes" depends="prepare,gen-src"> > - <javac16/> > + <javac16> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > > <target name="jar" depends="classes"> > Index: framework/bi/build.xml > =================================================================== > --- framework/bi/build.xml (revision 1081022) > +++ framework/bi/build.xml (working copy) > @@ -46,6 +46,8 @@ > <!-- ================================================================== --> > > <target name="classes" depends="prepare"> > - <javac16 classpathref="local.class.path"/> > + <javac16 classpathref="local.class.path"> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > </project> > Index: framework/sql/build.xml > =================================================================== > --- framework/sql/build.xml (revision 1081022) > +++ framework/sql/build.xml (working copy) > @@ -61,7 +61,9 @@ > </target> > > <target name="classes" depends="prepare,gen-src"> > - <javac16/> > + <javac16> > + <compilerarg value="-Xlint"/> > + </javac16> > </target> > > <target name="jar" depends="classes"> > Index: framework/start/build.xml > =================================================================== > --- framework/start/build.xml (revision 1081022) > +++ framework/start/build.xml (working copy) > @@ -34,7 +34,10 @@ > > <target name="classes" depends="prepare"> > <!-- compile start --> > - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> > + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> > + <compilerarg value="-Xlint"/> > + </javac16> > + > </target> > > <target name="jar" depends="classes"> > Index: specialpurpose/shark/build.xml > =================================================================== > --- specialpurpose/shark/build.xml (revision 1081022) > +++ specialpurpose/shark/build.xml (working copy) > @@ -55,6 +55,7 @@ > <target name="classes" depends="prepare"> > <javac16> > <src path="${src.dir}"/> > + <compilerarg value="-Xlint"/> > </javac16> > </target> > > > BTW there are some interseting things, like wrong libs names: > > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory > > Jacques > > > From: "Jacques Le Roux" <[hidden email]> >> Hi Marco, >> >> I have tried the following patch locally and I get a lot of warnings. >> >> Index: applications/order/build.xml >> =================================================================== >> --- applications/order/build.xml (revision 1081008) >> +++ applications/order/build.xml (working copy) >> @@ -59,6 +59,7 @@ >> <javac16> >> <!-- exclude the payment processor packages; comment if you have libs --> >> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >> + <compilerarg value="-Xlint"/> >> </javac16> >> </target> >> >> Index: common.xml >> =================================================================== >> --- common.xml (revision 1081008) >> +++ common.xml (working copy) >> @@ -90,7 +90,9 @@ >> <!-- ================================================================== --> >> >> <target name="classes" depends="prepare"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/base/build.xml >> =================================================================== >> --- framework/base/build.xml (revision 1081008) >> +++ framework/base/build.xml (working copy) >> @@ -87,7 +87,9 @@ >> </target> >> >> <target name="classes" depends="prepare,gen-src"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/bi/build.xml >> =================================================================== >> --- framework/bi/build.xml (revision 1081008) >> +++ framework/bi/build.xml (working copy) >> @@ -46,6 +46,8 @@ >> <!-- ================================================================== --> >> >> <target name="classes" depends="prepare"> >> - <javac16 classpathref="local.class.path"/> >> + <javac16 classpathref="local.class.path"> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> </project> >> Index: framework/sql/build.xml >> =================================================================== >> --- framework/sql/build.xml (revision 1081008) >> +++ framework/sql/build.xml (working copy) >> @@ -61,7 +61,9 @@ >> </target> >> >> <target name="classes" depends="prepare,gen-src"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/start/build.xml >> =================================================================== >> --- framework/start/build.xml (revision 1081008) >> +++ framework/start/build.xml (working copy) >> @@ -34,7 +34,10 @@ >> >> <target name="classes" depends="prepare"> >> <!-- compile start --> >> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> + >> </target> >> >> <target name="jar" depends="classes"> >> Index: specialpurpose/build.xml >> =================================================================== >> --- specialpurpose/build.xml (revision 1081008) >> +++ specialpurpose/build.xml (working copy) >> @@ -33,6 +33,7 @@ >> projectmgr/build.xml, >> ldap/build.xml, >> crowd/build.xml, >> + webui/build.xml, >> googlecheckout/build.xml"/> >> <!-- For the Web POS add "webpos/build.xml" to the list above --> >> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> >> Index: specialpurpose/shark/build.xml >> =================================================================== >> --- specialpurpose/shark/build.xml (revision 1081008) >> +++ specialpurpose/shark/build.xml (working copy) >> @@ -55,6 +55,7 @@ >> <target name="classes" depends="prepare"> >> <javac16> >> <src path="${src.dir}"/> >> + <compilerarg value="-Xlint"/> >> </javac16> >> </target> >> >> I wanted to commit it, but now I prefer to share this experience and discuss about it >> >> BTW I'm not quire sure about your question below >> >> Thanks >> >> Jacques >> >> >> From: <[hidden email]> >>> Hi dev, >>> >>> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >>> >>> Actually with the default configuration of Eclipse only 1 warning is still active: >>> >>> The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >>> org.ofbiz.security.authz.da.DynamicAccessHandler >>> >>> Someone knows if it's necessary and how to fix it ? >>> >>> Thanks in advance >>> Marco >>> >> >> > > |
Administrator
|
In reply to this post by Jacques Le Roux
From: "Jacques Le Roux" <[hidden email]>
> BTW there are some interseting things, like wrong libs names: > > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or > directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file or > directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or > directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or > directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or > directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory > [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory > > Jacques Eventually this is very mysterious to me. For instance * commons-io-1.3.1.jar exists but in lib/commons and I don't find anything referring to it * commons-logging-1.0.4.jar does not exist but I don't find anything referring to it * serializer-2.7.0.jar does not exist but I don't find anything referring to it. And serializer-2.9.1.jar exists Jacques > > From: "Jacques Le Roux" <[hidden email]> >> Hi Marco, >> >> I have tried the following patch locally and I get a lot of warnings. >> >> Index: applications/order/build.xml >> =================================================================== >> --- applications/order/build.xml (revision 1081008) >> +++ applications/order/build.xml (working copy) >> @@ -59,6 +59,7 @@ >> <javac16> >> <!-- exclude the payment processor packages; comment if you have libs --> >> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >> + <compilerarg value="-Xlint"/> >> </javac16> >> </target> >> >> Index: common.xml >> =================================================================== >> --- common.xml (revision 1081008) >> +++ common.xml (working copy) >> @@ -90,7 +90,9 @@ >> <!-- ================================================================== --> >> >> <target name="classes" depends="prepare"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/base/build.xml >> =================================================================== >> --- framework/base/build.xml (revision 1081008) >> +++ framework/base/build.xml (working copy) >> @@ -87,7 +87,9 @@ >> </target> >> >> <target name="classes" depends="prepare,gen-src"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/bi/build.xml >> =================================================================== >> --- framework/bi/build.xml (revision 1081008) >> +++ framework/bi/build.xml (working copy) >> @@ -46,6 +46,8 @@ >> <!-- ================================================================== --> >> >> <target name="classes" depends="prepare"> >> - <javac16 classpathref="local.class.path"/> >> + <javac16 classpathref="local.class.path"> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> </project> >> Index: framework/sql/build.xml >> =================================================================== >> --- framework/sql/build.xml (revision 1081008) >> +++ framework/sql/build.xml (working copy) >> @@ -61,7 +61,9 @@ >> </target> >> >> <target name="classes" depends="prepare,gen-src"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/start/build.xml >> =================================================================== >> --- framework/start/build.xml (revision 1081008) >> +++ framework/start/build.xml (working copy) >> @@ -34,7 +34,10 @@ >> >> <target name="classes" depends="prepare"> >> <!-- compile start --> >> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> + >> </target> >> >> <target name="jar" depends="classes"> >> Index: specialpurpose/build.xml >> =================================================================== >> --- specialpurpose/build.xml (revision 1081008) >> +++ specialpurpose/build.xml (working copy) >> @@ -33,6 +33,7 @@ >> projectmgr/build.xml, >> ldap/build.xml, >> crowd/build.xml, >> + webui/build.xml, >> googlecheckout/build.xml"/> >> <!-- For the Web POS add "webpos/build.xml" to the list above --> >> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> >> Index: specialpurpose/shark/build.xml >> =================================================================== >> --- specialpurpose/shark/build.xml (revision 1081008) >> +++ specialpurpose/shark/build.xml (working copy) >> @@ -55,6 +55,7 @@ >> <target name="classes" depends="prepare"> >> <javac16> >> <src path="${src.dir}"/> >> + <compilerarg value="-Xlint"/> >> </javac16> >> </target> >> >> I wanted to commit it, but now I prefer to share this experience and discuss about it >> >> BTW I'm not quire sure about your question below >> >> Thanks >> >> Jacques >> >> >> From: <[hidden email]> >>> Hi dev, >>> >>> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >>> >>> Actually with the default configuration of Eclipse only 1 warning is still active: >>> >>> The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >>> org.ofbiz.security.authz.da.DynamicAccessHandler >>> >>> Someone knows if it's necessary and how to fix it ? >>> >>> Thanks in advance >>> Marco >>> >> >> > > |
Yes, it's strange also to me, it's necessary to dig it something more.
Anyone having some suggestion on it ? Thanks Marco Il giorno 13/mar/2011, alle ore 11.17, Jacques Le Roux ha scritto: > From: "Jacques Le Roux" <[hidden email]> >> BTW there are some interseting things, like wrong libs names: >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory >> Jacques > > > Eventually this is very mysterious to me. For instance * commons-io-1.3.1.jar exists but in lib/commons and I don't find anything referring to it > * commons-logging-1.0.4.jar does not exist but I don't find anything referring to it > * serializer-2.7.0.jar does not exist but I don't find anything referring to it. And serializer-2.9.1.jar exists > > Jacques > >> From: "Jacques Le Roux" <[hidden email]> >>> Hi Marco, >>> >>> I have tried the following patch locally and I get a lot of warnings. >>> >>> Index: applications/order/build.xml >>> =================================================================== >>> --- applications/order/build.xml (revision 1081008) >>> +++ applications/order/build.xml (working copy) >>> @@ -59,6 +59,7 @@ >>> <javac16> >>> <!-- exclude the payment processor packages; comment if you have libs --> >>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> Index: common.xml >>> =================================================================== >>> --- common.xml (revision 1081008) >>> +++ common.xml (working copy) >>> @@ -90,7 +90,9 @@ >>> <!-- ================================================================== --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/base/build.xml >>> =================================================================== >>> --- framework/base/build.xml (revision 1081008) >>> +++ framework/base/build.xml (working copy) >>> @@ -87,7 +87,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/bi/build.xml >>> =================================================================== >>> --- framework/bi/build.xml (revision 1081008) >>> +++ framework/bi/build.xml (working copy) >>> @@ -46,6 +46,8 @@ >>> <!-- ================================================================== --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16 classpathref="local.class.path"/> >>> + <javac16 classpathref="local.class.path"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> </project> >>> Index: framework/sql/build.xml >>> =================================================================== >>> --- framework/sql/build.xml (revision 1081008) >>> +++ framework/sql/build.xml (working copy) >>> @@ -61,7 +61,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/start/build.xml >>> =================================================================== >>> --- framework/start/build.xml (revision 1081008) >>> +++ framework/start/build.xml (working copy) >>> @@ -34,7 +34,10 @@ >>> >>> <target name="classes" depends="prepare"> >>> <!-- compile start --> >>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> + >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: specialpurpose/build.xml >>> =================================================================== >>> --- specialpurpose/build.xml (revision 1081008) >>> +++ specialpurpose/build.xml (working copy) >>> @@ -33,6 +33,7 @@ >>> projectmgr/build.xml, >>> ldap/build.xml, >>> crowd/build.xml, >>> + webui/build.xml, >>> googlecheckout/build.xml"/> >>> <!-- For the Web POS add "webpos/build.xml" to the list above --> >>> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> >>> Index: specialpurpose/shark/build.xml >>> =================================================================== >>> --- specialpurpose/shark/build.xml (revision 1081008) >>> +++ specialpurpose/shark/build.xml (working copy) >>> @@ -55,6 +55,7 @@ >>> <target name="classes" depends="prepare"> >>> <javac16> >>> <src path="${src.dir}"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> I wanted to commit it, but now I prefer to share this experience and discuss about it >>> >>> BTW I'm not quire sure about your question below >>> >>> Thanks >>> >>> Jacques >>> >>> >>> From: <[hidden email]> >>>> Hi dev, >>>> >>>> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >>>> >>>> Actually with the default configuration of Eclipse only 1 warning is still active: >>>> >>>> The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>>> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >>>> org.ofbiz.security.authz.da.DynamicAccessHandler >>>> >>>> Someone knows if it's necessary and how to fix it ? >>>> >>>> Thanks in advance >>>> Marco >>>> >>> >>> >> > |
Administrator
|
In reply to this post by risalitim@gmail.com
Hi Marco,
My idea is to use <compilerarg value="-Xlint"/> (thanks for the miss), so I'd say I don't care about Eclipse, if some want to fix them, perfect, else simply forget about those warnings I will wait to commit that we remove most, if not all, of the warning messages in order to not Jacques From: <[hidden email]> > Hi Jacques, > > I have removed some redundant cast warming but if you set all the warning on eclipse to warning where they are ignore you will get > many others. > > So we have to decide if we would like to remove all the warning or simply the ones intercepted by the build. > > In your patch was missing this one: > > Index: macros.xml > =================================================================== > --- macros.xml (revision 1081059) > +++ macros.xml (working copy) > @@ -73,9 +73,7 @@ > > <presetdef name="javac16"> > <default-javac compiler="javac1.6" target="1.6" source="1.6" encoding="UTF-8" sourcepathref="src-path" > includeantruntime="false"> > - <!-- > - <compilerarg value="-Xlint:unchecked"/> > - --> > + <compilerarg value="-Xlint"/> > </default-javac> > </presetdef> > > I could say that I could fix some of them when I will get the time but I did not know when :-) > > Thanks > Marco > > > Il giorno 13/mar/2011, alle ore 01.38, Jacques Le Roux ha scritto: > >> Sorry wrong patch (no webui component by default, I test it from OFBIZ-3877) >> >> Here is the right patch >> >> Index: applications/order/build.xml >> =================================================================== >> --- applications/order/build.xml (revision 1081022) >> +++ applications/order/build.xml (working copy) >> @@ -59,6 +59,7 @@ >> <javac16> >> <!-- exclude the payment processor packages; comment if you have libs --> >> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >> + <compilerarg value="-Xlint"/> >> </javac16> >> </target> >> >> Index: common.xml >> =================================================================== >> --- common.xml (revision 1081022) >> +++ common.xml (working copy) >> @@ -90,7 +90,9 @@ >> <!-- ================================================================== --> >> >> <target name="classes" depends="prepare"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/base/build.xml >> =================================================================== >> --- framework/base/build.xml (revision 1081022) >> +++ framework/base/build.xml (working copy) >> @@ -87,7 +87,9 @@ >> </target> >> >> <target name="classes" depends="prepare,gen-src"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/bi/build.xml >> =================================================================== >> --- framework/bi/build.xml (revision 1081022) >> +++ framework/bi/build.xml (working copy) >> @@ -46,6 +46,8 @@ >> <!-- ================================================================== --> >> >> <target name="classes" depends="prepare"> >> - <javac16 classpathref="local.class.path"/> >> + <javac16 classpathref="local.class.path"> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> </project> >> Index: framework/sql/build.xml >> =================================================================== >> --- framework/sql/build.xml (revision 1081022) >> +++ framework/sql/build.xml (working copy) >> @@ -61,7 +61,9 @@ >> </target> >> >> <target name="classes" depends="prepare,gen-src"> >> - <javac16/> >> + <javac16> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> </target> >> >> <target name="jar" depends="classes"> >> Index: framework/start/build.xml >> =================================================================== >> --- framework/start/build.xml (revision 1081022) >> +++ framework/start/build.xml (working copy) >> @@ -34,7 +34,10 @@ >> >> <target name="classes" depends="prepare"> >> <!-- compile start --> >> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >> + <compilerarg value="-Xlint"/> >> + </javac16> >> + >> </target> >> >> <target name="jar" depends="classes"> >> Index: specialpurpose/shark/build.xml >> =================================================================== >> --- specialpurpose/shark/build.xml (revision 1081022) >> +++ specialpurpose/shark/build.xml (working copy) >> @@ -55,6 +55,7 @@ >> <target name="classes" depends="prepare"> >> <javac16> >> <src path="${src.dir}"/> >> + <compilerarg value="-Xlint"/> >> </javac16> >> </target> >> >> >> BTW there are some interseting things, like wrong libs names: >> >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or >> directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file or >> directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or >> directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or >> directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or >> directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory >> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory >> >> Jacques >> >> >> From: "Jacques Le Roux" <[hidden email]> >>> Hi Marco, >>> >>> I have tried the following patch locally and I get a lot of warnings. >>> >>> Index: applications/order/build.xml >>> =================================================================== >>> --- applications/order/build.xml (revision 1081008) >>> +++ applications/order/build.xml (working copy) >>> @@ -59,6 +59,7 @@ >>> <javac16> >>> <!-- exclude the payment processor packages; comment if you have libs --> >>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> Index: common.xml >>> =================================================================== >>> --- common.xml (revision 1081008) >>> +++ common.xml (working copy) >>> @@ -90,7 +90,9 @@ >>> <!-- ================================================================== --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/base/build.xml >>> =================================================================== >>> --- framework/base/build.xml (revision 1081008) >>> +++ framework/base/build.xml (working copy) >>> @@ -87,7 +87,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/bi/build.xml >>> =================================================================== >>> --- framework/bi/build.xml (revision 1081008) >>> +++ framework/bi/build.xml (working copy) >>> @@ -46,6 +46,8 @@ >>> <!-- ================================================================== --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16 classpathref="local.class.path"/> >>> + <javac16 classpathref="local.class.path"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> </project> >>> Index: framework/sql/build.xml >>> =================================================================== >>> --- framework/sql/build.xml (revision 1081008) >>> +++ framework/sql/build.xml (working copy) >>> @@ -61,7 +61,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/start/build.xml >>> =================================================================== >>> --- framework/start/build.xml (revision 1081008) >>> +++ framework/start/build.xml (working copy) >>> @@ -34,7 +34,10 @@ >>> >>> <target name="classes" depends="prepare"> >>> <!-- compile start --> >>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> + >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: specialpurpose/build.xml >>> =================================================================== >>> --- specialpurpose/build.xml (revision 1081008) >>> +++ specialpurpose/build.xml (working copy) >>> @@ -33,6 +33,7 @@ >>> projectmgr/build.xml, >>> ldap/build.xml, >>> crowd/build.xml, >>> + webui/build.xml, >>> googlecheckout/build.xml"/> >>> <!-- For the Web POS add "webpos/build.xml" to the list above --> >>> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> >>> Index: specialpurpose/shark/build.xml >>> =================================================================== >>> --- specialpurpose/shark/build.xml (revision 1081008) >>> +++ specialpurpose/shark/build.xml (working copy) >>> @@ -55,6 +55,7 @@ >>> <target name="classes" depends="prepare"> >>> <javac16> >>> <src path="${src.dir}"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> I wanted to commit it, but now I prefer to share this experience and discuss about it >>> >>> BTW I'm not quire sure about your question below >>> >>> Thanks >>> >>> Jacques >>> >>> >>> From: <[hidden email]> >>>> Hi dev, >>>> >>>> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >>>> >>>> Actually with the default configuration of Eclipse only 1 warning is still active: >>>> >>>> The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>>> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >>>> org.ofbiz.security.authz.da.DynamicAccessHandler >>>> >>>> Someone knows if it's necessary and how to fix it ? >>>> >>>> Thanks in advance >>>> Marco >>>> >>> >>> >> >> > > |
+1
Thanks Marco Il giorno 13/mar/2011, alle ore 11.31, Jacques Le Roux ha scritto: > Hi Marco, > > My idea is to use <compilerarg value="-Xlint"/> (thanks for the miss), so I'd say I don't care about Eclipse, if some want to fix them, perfect, else simply forget about those warnings > > I will wait to commit that we remove most, if not all, of the warning messages in order to not > > Jacques > > From: <[hidden email]> >> Hi Jacques, >> >> I have removed some redundant cast warming but if you set all the warning on eclipse to warning where they are ignore you will get many others. >> >> So we have to decide if we would like to remove all the warning or simply the ones intercepted by the build. >> >> In your patch was missing this one: >> >> Index: macros.xml >> =================================================================== >> --- macros.xml (revision 1081059) >> +++ macros.xml (working copy) >> @@ -73,9 +73,7 @@ >> >> <presetdef name="javac16"> >> <default-javac compiler="javac1.6" target="1.6" source="1.6" encoding="UTF-8" sourcepathref="src-path" includeantruntime="false"> >> - <!-- >> - <compilerarg value="-Xlint:unchecked"/> >> - --> >> + <compilerarg value="-Xlint"/> >> </default-javac> >> </presetdef> >> >> I could say that I could fix some of them when I will get the time but I did not know when :-) >> >> Thanks >> Marco >> >> >> Il giorno 13/mar/2011, alle ore 01.38, Jacques Le Roux ha scritto: >> >>> Sorry wrong patch (no webui component by default, I test it from OFBIZ-3877) >>> >>> Here is the right patch >>> >>> Index: applications/order/build.xml >>> =================================================================== >>> --- applications/order/build.xml (revision 1081022) >>> +++ applications/order/build.xml (working copy) >>> @@ -59,6 +59,7 @@ >>> <javac16> >>> <!-- exclude the payment processor packages; comment if you have libs --> >>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> Index: common.xml >>> =================================================================== >>> --- common.xml (revision 1081022) >>> +++ common.xml (working copy) >>> @@ -90,7 +90,9 @@ >>> <!-- ================================================================== --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/base/build.xml >>> =================================================================== >>> --- framework/base/build.xml (revision 1081022) >>> +++ framework/base/build.xml (working copy) >>> @@ -87,7 +87,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/bi/build.xml >>> =================================================================== >>> --- framework/bi/build.xml (revision 1081022) >>> +++ framework/bi/build.xml (working copy) >>> @@ -46,6 +46,8 @@ >>> <!-- ================================================================== --> >>> >>> <target name="classes" depends="prepare"> >>> - <javac16 classpathref="local.class.path"/> >>> + <javac16 classpathref="local.class.path"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> </project> >>> Index: framework/sql/build.xml >>> =================================================================== >>> --- framework/sql/build.xml (revision 1081022) >>> +++ framework/sql/build.xml (working copy) >>> @@ -61,7 +61,9 @@ >>> </target> >>> >>> <target name="classes" depends="prepare,gen-src"> >>> - <javac16/> >>> + <javac16> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: framework/start/build.xml >>> =================================================================== >>> --- framework/start/build.xml (revision 1081022) >>> +++ framework/start/build.xml (working copy) >>> @@ -34,7 +34,10 @@ >>> >>> <target name="classes" depends="prepare"> >>> <!-- compile start --> >>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>> + <compilerarg value="-Xlint"/> >>> + </javac16> >>> + >>> </target> >>> >>> <target name="jar" depends="classes"> >>> Index: specialpurpose/shark/build.xml >>> =================================================================== >>> --- specialpurpose/shark/build.xml (revision 1081022) >>> +++ specialpurpose/shark/build.xml (working copy) >>> @@ -55,6 +55,7 @@ >>> <target name="classes" depends="prepare"> >>> <javac16> >>> <src path="${src.dir}"/> >>> + <compilerarg value="-Xlint"/> >>> </javac16> >>> </target> >>> >>> >>> BTW there are some interseting things, like wrong libs names: >>> >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory >>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory >>> >>> Jacques >>> >>> >>> From: "Jacques Le Roux" <[hidden email]> >>>> Hi Marco, >>>> >>>> I have tried the following patch locally and I get a lot of warnings. >>>> >>>> Index: applications/order/build.xml >>>> =================================================================== >>>> --- applications/order/build.xml (revision 1081008) >>>> +++ applications/order/build.xml (working copy) >>>> @@ -59,6 +59,7 @@ >>>> <javac16> >>>> <!-- exclude the payment processor packages; comment if you have libs --> >>>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>>> + <compilerarg value="-Xlint"/> >>>> </javac16> >>>> </target> >>>> >>>> Index: common.xml >>>> =================================================================== >>>> --- common.xml (revision 1081008) >>>> +++ common.xml (working copy) >>>> @@ -90,7 +90,9 @@ >>>> <!-- ================================================================== --> >>>> >>>> <target name="classes" depends="prepare"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/base/build.xml >>>> =================================================================== >>>> --- framework/base/build.xml (revision 1081008) >>>> +++ framework/base/build.xml (working copy) >>>> @@ -87,7 +87,9 @@ >>>> </target> >>>> >>>> <target name="classes" depends="prepare,gen-src"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/bi/build.xml >>>> =================================================================== >>>> --- framework/bi/build.xml (revision 1081008) >>>> +++ framework/bi/build.xml (working copy) >>>> @@ -46,6 +46,8 @@ >>>> <!-- ================================================================== --> >>>> >>>> <target name="classes" depends="prepare"> >>>> - <javac16 classpathref="local.class.path"/> >>>> + <javac16 classpathref="local.class.path"> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> </project> >>>> Index: framework/sql/build.xml >>>> =================================================================== >>>> --- framework/sql/build.xml (revision 1081008) >>>> +++ framework/sql/build.xml (working copy) >>>> @@ -61,7 +61,9 @@ >>>> </target> >>>> >>>> <target name="classes" depends="prepare,gen-src"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/start/build.xml >>>> =================================================================== >>>> --- framework/start/build.xml (revision 1081008) >>>> +++ framework/start/build.xml (working copy) >>>> @@ -34,7 +34,10 @@ >>>> >>>> <target name="classes" depends="prepare"> >>>> <!-- compile start --> >>>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> + >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: specialpurpose/build.xml >>>> =================================================================== >>>> --- specialpurpose/build.xml (revision 1081008) >>>> +++ specialpurpose/build.xml (working copy) >>>> @@ -33,6 +33,7 @@ >>>> projectmgr/build.xml, >>>> ldap/build.xml, >>>> crowd/build.xml, >>>> + webui/build.xml, >>>> googlecheckout/build.xml"/> >>>> <!-- For the Web POS add "webpos/build.xml" to the list above --> >>>> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> >>>> Index: specialpurpose/shark/build.xml >>>> =================================================================== >>>> --- specialpurpose/shark/build.xml (revision 1081008) >>>> +++ specialpurpose/shark/build.xml (working copy) >>>> @@ -55,6 +55,7 @@ >>>> <target name="classes" depends="prepare"> >>>> <javac16> >>>> <src path="${src.dir}"/> >>>> + <compilerarg value="-Xlint"/> >>>> </javac16> >>>> </target> >>>> >>>> I wanted to commit it, but now I prefer to share this experience and discuss about it >>>> >>>> BTW I'm not quire sure about your question below >>>> >>>> Thanks >>>> >>>> Jacques >>>> >>>> >>>> From: <[hidden email]> >>>>> Hi dev, >>>>> >>>>> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >>>>> >>>>> Actually with the default configuration of Eclipse only 1 warning is still active: >>>>> >>>>> The resource is a duplicate of applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>>>> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >>>>> org.ofbiz.security.authz.da.DynamicAccessHandler >>>>> >>>>> Someone knows if it's necessary and how to fix it ? >>>>> >>>>> Thanks in advance >>>>> Marco >>>>> >>>> >>>> >>> >>> >> > > |
https://issues.apache.org/jira/browse/OFBIZ-4213
From: <[hidden email]> > +1 > > Thanks > Marco > > Il giorno 13/mar/2011, alle ore 11.31, Jacques Le Roux ha scritto: > >> Hi Marco, >> >> My idea is to use <compilerarg value="-Xlint"/> (thanks for the miss), so I'd say I don't care about Eclipse, if some want to >> fix them, perfect, else simply forget about those warnings >> >> I will wait to commit that we remove most, if not all, of the warning messages in order to not >> >> Jacques >> >> From: <[hidden email]> >>> Hi Jacques, >>> >>> I have removed some redundant cast warming but if you set all the warning on eclipse to warning where they are ignore you will >>> get many others. >>> >>> So we have to decide if we would like to remove all the warning or simply the ones intercepted by the build. >>> >>> In your patch was missing this one: >>> >>> Index: macros.xml >>> =================================================================== >>> --- macros.xml (revision 1081059) >>> +++ macros.xml (working copy) >>> @@ -73,9 +73,7 @@ >>> >>> <presetdef name="javac16"> >>> <default-javac compiler="javac1.6" target="1.6" source="1.6" encoding="UTF-8" sourcepathref="src-path" >>> includeantruntime="false"> >>> - <!-- >>> - <compilerarg value="-Xlint:unchecked"/> >>> - --> >>> + <compilerarg value="-Xlint"/> >>> </default-javac> >>> </presetdef> >>> >>> I could say that I could fix some of them when I will get the time but I did not know when :-) >>> >>> Thanks >>> Marco >>> >>> >>> Il giorno 13/mar/2011, alle ore 01.38, Jacques Le Roux ha scritto: >>> >>>> Sorry wrong patch (no webui component by default, I test it from OFBIZ-3877) >>>> >>>> Here is the right patch >>>> >>>> Index: applications/order/build.xml >>>> =================================================================== >>>> --- applications/order/build.xml (revision 1081022) >>>> +++ applications/order/build.xml (working copy) >>>> @@ -59,6 +59,7 @@ >>>> <javac16> >>>> <!-- exclude the payment processor packages; comment if you have libs --> >>>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>>> + <compilerarg value="-Xlint"/> >>>> </javac16> >>>> </target> >>>> >>>> Index: common.xml >>>> =================================================================== >>>> --- common.xml (revision 1081022) >>>> +++ common.xml (working copy) >>>> @@ -90,7 +90,9 @@ >>>> <!-- ================================================================== --> >>>> >>>> <target name="classes" depends="prepare"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/base/build.xml >>>> =================================================================== >>>> --- framework/base/build.xml (revision 1081022) >>>> +++ framework/base/build.xml (working copy) >>>> @@ -87,7 +87,9 @@ >>>> </target> >>>> >>>> <target name="classes" depends="prepare,gen-src"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/bi/build.xml >>>> =================================================================== >>>> --- framework/bi/build.xml (revision 1081022) >>>> +++ framework/bi/build.xml (working copy) >>>> @@ -46,6 +46,8 @@ >>>> <!-- ================================================================== --> >>>> >>>> <target name="classes" depends="prepare"> >>>> - <javac16 classpathref="local.class.path"/> >>>> + <javac16 classpathref="local.class.path"> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> </project> >>>> Index: framework/sql/build.xml >>>> =================================================================== >>>> --- framework/sql/build.xml (revision 1081022) >>>> +++ framework/sql/build.xml (working copy) >>>> @@ -61,7 +61,9 @@ >>>> </target> >>>> >>>> <target name="classes" depends="prepare,gen-src"> >>>> - <javac16/> >>>> + <javac16> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: framework/start/build.xml >>>> =================================================================== >>>> --- framework/start/build.xml (revision 1081022) >>>> +++ framework/start/build.xml (working copy) >>>> @@ -34,7 +34,10 @@ >>>> >>>> <target name="classes" depends="prepare"> >>>> <!-- compile start --> >>>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>>> + <compilerarg value="-Xlint"/> >>>> + </javac16> >>>> + >>>> </target> >>>> >>>> <target name="jar" depends="classes"> >>>> Index: specialpurpose/shark/build.xml >>>> =================================================================== >>>> --- specialpurpose/shark/build.xml (revision 1081022) >>>> +++ specialpurpose/shark/build.xml (working copy) >>>> @@ -55,6 +55,7 @@ >>>> <target name="classes" depends="prepare"> >>>> <javac16> >>>> <src path="${src.dir}"/> >>>> + <compilerarg value="-Xlint"/> >>>> </javac16> >>>> </target> >>>> >>>> >>>> BTW there are some interseting things, like wrong libs names: >>>> >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-io-1.3.1.jar": no such file or >>>> directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\commons-logging-1.0.4.jar": no such file >>>> or directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\fop-hyph.jar": no such file or directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer-2.7.0.jar": no such file or >>>> directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\servlet-2.2.jar": no such file or >>>> directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xalan-2.7.0.jar": no such file or >>>> directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl-2.7.1.jar": no such file or >>>> directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis-1.3.04.jar": no such file or >>>> directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\activation.jar": no such file or directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xml-apis.jar": no such file or directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\xercesImpl.jar": no such file or directory >>>> [javac16] warning: [path] bad path element "D:\workspace\ofbizDev\framework\base\lib\serializer.jar": no such file or directory >>>> >>>> Jacques >>>> >>>> >>>> From: "Jacques Le Roux" <[hidden email]> >>>>> Hi Marco, >>>>> >>>>> I have tried the following patch locally and I get a lot of warnings. >>>>> >>>>> Index: applications/order/build.xml >>>>> =================================================================== >>>>> --- applications/order/build.xml (revision 1081008) >>>>> +++ applications/order/build.xml (working copy) >>>>> @@ -59,6 +59,7 @@ >>>>> <javac16> >>>>> <!-- exclude the payment processor packages; comment if you have libs --> >>>>> <exclude name="org/ofbiz/order/thirdparty/taxware/**"/> >>>>> + <compilerarg value="-Xlint"/> >>>>> </javac16> >>>>> </target> >>>>> >>>>> Index: common.xml >>>>> =================================================================== >>>>> --- common.xml (revision 1081008) >>>>> +++ common.xml (working copy) >>>>> @@ -90,7 +90,9 @@ >>>>> <!-- ================================================================== --> >>>>> >>>>> <target name="classes" depends="prepare"> >>>>> - <javac16/> >>>>> + <javac16> >>>>> + <compilerarg value="-Xlint"/> >>>>> + </javac16> >>>>> </target> >>>>> >>>>> <target name="jar" depends="classes"> >>>>> Index: framework/base/build.xml >>>>> =================================================================== >>>>> --- framework/base/build.xml (revision 1081008) >>>>> +++ framework/base/build.xml (working copy) >>>>> @@ -87,7 +87,9 @@ >>>>> </target> >>>>> >>>>> <target name="classes" depends="prepare,gen-src"> >>>>> - <javac16/> >>>>> + <javac16> >>>>> + <compilerarg value="-Xlint"/> >>>>> + </javac16> >>>>> </target> >>>>> >>>>> <target name="jar" depends="classes"> >>>>> Index: framework/bi/build.xml >>>>> =================================================================== >>>>> --- framework/bi/build.xml (revision 1081008) >>>>> +++ framework/bi/build.xml (working copy) >>>>> @@ -46,6 +46,8 @@ >>>>> <!-- ================================================================== --> >>>>> >>>>> <target name="classes" depends="prepare"> >>>>> - <javac16 classpathref="local.class.path"/> >>>>> + <javac16 classpathref="local.class.path"> >>>>> + <compilerarg value="-Xlint"/> >>>>> + </javac16> >>>>> </target> >>>>> </project> >>>>> Index: framework/sql/build.xml >>>>> =================================================================== >>>>> --- framework/sql/build.xml (revision 1081008) >>>>> +++ framework/sql/build.xml (working copy) >>>>> @@ -61,7 +61,9 @@ >>>>> </target> >>>>> >>>>> <target name="classes" depends="prepare,gen-src"> >>>>> - <javac16/> >>>>> + <javac16> >>>>> + <compilerarg value="-Xlint"/> >>>>> + </javac16> >>>>> </target> >>>>> >>>>> <target name="jar" depends="classes"> >>>>> Index: framework/start/build.xml >>>>> =================================================================== >>>>> --- framework/start/build.xml (revision 1081008) >>>>> +++ framework/start/build.xml (working copy) >>>>> @@ -34,7 +34,10 @@ >>>>> >>>>> <target name="classes" depends="prepare"> >>>>> <!-- compile start --> >>>>> - <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"/> >>>>> + <javac16 destdir="${build.dir}/classes" srcdir="${src.dir}"> >>>>> + <compilerarg value="-Xlint"/> >>>>> + </javac16> >>>>> + >>>>> </target> >>>>> >>>>> <target name="jar" depends="classes"> >>>>> Index: specialpurpose/build.xml >>>>> =================================================================== >>>>> --- specialpurpose/build.xml (revision 1081008) >>>>> +++ specialpurpose/build.xml (working copy) >>>>> @@ -33,6 +33,7 @@ >>>>> projectmgr/build.xml, >>>>> ldap/build.xml, >>>>> crowd/build.xml, >>>>> + webui/build.xml, >>>>> googlecheckout/build.xml"/> >>>>> <!-- For the Web POS add "webpos/build.xml" to the list above --> >>>>> <!-- For the old OFBiz Workflow Engine add "workflow/build.xml" to the list above --> >>>>> Index: specialpurpose/shark/build.xml >>>>> =================================================================== >>>>> --- specialpurpose/shark/build.xml (revision 1081008) >>>>> +++ specialpurpose/shark/build.xml (working copy) >>>>> @@ -55,6 +55,7 @@ >>>>> <target name="classes" depends="prepare"> >>>>> <javac16> >>>>> <src path="${src.dir}"/> >>>>> + <compilerarg value="-Xlint"/> >>>>> </javac16> >>>>> </target> >>>>> >>>>> I wanted to commit it, but now I prefer to share this experience and discuss about it >>>>> >>>>> BTW I'm not quire sure about your question below >>>>> >>>>> Thanks >>>>> >>>>> Jacques >>>>> >>>>> >>>>> From: <[hidden email]> >>>>>> Hi dev, >>>>>> >>>>>> I'm near to complete big work of cleaning of all OFBiz classes from warning of during compiling java classes. >>>>>> >>>>>> Actually with the default configuration of Eclipse only 1 warning is still active: >>>>>> >>>>>> The resource is a duplicate of >>>>>> applications/securityext/src/META-INF/services/org.ofbiz.security.authz.da.DynamicAccessHandler >>>>>> and was not copied to the output folder /ofbiz/framework/security/src/META-INF/services >>>>>> org.ofbiz.security.authz.da.DynamicAccessHandler >>>>>> >>>>>> Someone knows if it's necessary and how to fix it ? >>>>>> >>>>>> Thanks in advance >>>>>> Marco >>>>>> >>>>> >>>>> >>>> >>>> >>> >> >> > > |
Free forum by Nabble | Edit this page |