directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PeteK <peter.ke...@prudential.com>
Subject Re: How do I compile for Java 1.5?
Date Thu, 10 Jul 2008 19:25:48 GMT

Has there been any improvement on this situation?  I am trying to build just
a custom schema for the stable release 1.0.2 (as listed on the web site),
and am not having much luck with the instructions on this page:

http://directory.apache.org/apacheds/1.0/custom-schema.html

First of all, and maybe this gets to the core of the problem, the svn url is
not valid.
http://svn.apache.org/repos/asf/directory/apacheds/releases/1.0.2/schema-archetype/

What svn url should we use to get the 1.0.2 build?  I've been poking around
and found various tags etc, but when I compile them, I get the warning that
I'm using an old version of the compiler:
 generics are not supported in -source 1.3 (try -source 1.5 to enable
generics)
>From previous posts it appears that the 1.0.2 code stream should be using
Java 1.4 and should not contain any generics.  So I must be using the wrong
svn location.
I have tried:
>svn co
http://svn.apache.org/repos/asf/directory/apacheds/tags/1.0.2/schema-archetype/
>cd schema-archetype
>mvn install
>cd ..
>schema-archtype\apacheds-schema-archtype com.acme foo-schema
>cd foo-schema
>mvn package
This results in the generic error, which indicates that I have the wrong
version of the apacheds source(?) which is based on Java 1.4 (?).
This is the output of mvn package.  I know how to solve the Java version
(pom.xml plugins section) to force the right version of Java, but that
appears to be the wrong move.  What I need is the right svn source that is
truly 1.0.2 (Java 1.4).  Any help would be greatly appreciated.

[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building Schema Project
[INFO]    task-segment: [package]
[INFO]
------------------------------------------------------------------------
Jul 10, 2008 3:18:16 PM org.apache.velocity.runtime.log.JdkLogChute log
INFO: FileResourceLoader : adding path '.'
[INFO] [apacheds-core:generate {execution: default}]
[INFO] ===================================================================
[INFO] [directory:generate]
[INFO] sourceDirectory =
D:\projects\directory\apacheds\tag1.0.2\foo-schema\src\
main\schema
[INFO] outputDirectory =
D:\projects\directory\apacheds\tag1.0.2\foo-schema\targ
et\generated-sources
[INFO] defaultPackage  = org.apache.directory.server.schema.bootstrap
[INFO] defaultOwner    = uid=admin,ou=system
[INFO] ----------------------------- schemas -----------------------------
[INFO] SCHEMA: car
[INFO] DEPENDENCIES: system core
[INFO] PACKAGE: com.acme
[INFO] OWNER: uid=admin,ou=system
[INFO] ===================================================================
[INFO] Generating car schema.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 13 source files to
D:\projects\directory\apacheds\tag1.0.2\foo-
schema\target\classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure

D:\projects\directory\apacheds\tag1.0.2\foo-schema\target\generated-sources\com\
acme\CarAttributeTypeProducer.java:[29,17] generics are not supported in
-source
 1.3
(try -source 1.5 to enable generics)
        ArrayList<String> names = new ArrayList<String>();

D:\projects\directory\apacheds\tag1.0.2\foo-schema\target\generated-sources\com\
acme\CarObjectClassProducer.java:[28,17] generics are not supported in
-source 1
.3
(try -source 1.5 to enable generics)
        ArrayList<String> array = new ArrayList<String>();

D:\projects\directory\apacheds\tag1.0.2\foo-schema\target\generated-sources\com\
acme\CarSchema.java:[17,17] generics are not supported in -source 1.3
(try -source 1.5 to enable generics)
        ArrayList<String> list = new ArrayList<String>();


[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Thu Jul 10 15:18:19 EDT 2008
[INFO] Final Memory: 9M/17M
[INFO]
------------------------------------------------------------------------




Emmanuel Lecharny-3 wrote:
> 
> Ahhh.... Sorry, I really thought you were trying to compile the whole 
> server !
> 
> Ok, I'm back from Apache Conference, but will move to have some rest for 
> a week. I will try to squeeze a few hours this week-end to find out 
> what's your problem can be.
> 
> I already have a full 1.0 code base compiling on my laptop, and will 
> have a 5 hours train trip tomorrow, so hopefully, I may have time for 
> this issue :)
> 
> 
> Mark Swanson wrote:
>> Emmanuel Lecharny wrote:
>>>
>>> Where are the sources coming from ? Can you give us the command you 
>>> used to get the sources on your computer ?
>>>
>> There are no sources for this. I'm simply compiling a schema as per 
>> the documentation I found on the ads website (maybe 2 years ago?).
>> The pom.xml I pasted into a previous email was all that was ever 
>> necessary. Just the pom.xml and my schema.
>>
>>>> *** Strange, I guess the latest 1.0.x pom is downloaded? I didn't 
>>>> notice 1.0.5 was used...
>>>> Downloading: 
>>>> http://repo1.maven.org/maven2/org/apache/directory/build/1.0.5/build-1.0.5.pom

>>>>
>>>
>>> This is totally different. We are using 4 different sub-projects :
>>> - apacheds
>>> - daemon
>>> - installers
>>> - project
>>> - shared
>> I think the disconnect here is that you think I'm building ADS and I'm 
>> not, I'm just trying to compile a schema.
>>> Each project has its own version. As you may have noticed, shared is 
>>> version 0.9.5.3. The 1.0.5 version applies to the 'project' version
>>>> It's just that the API seems to have changed too. F.e. a previous 
>>>> schema compile that worked fine no longer works and produces compile 
>>>> errors that aren't 1.5 related, but class files that are completely 
>>>> missing:
>>> It seems that the maven build you are using is not the good one...
>> I'm not trying to build ADS :-)
>>>
>>>> Is there an easy way perhaps for me to force maven to use an older 
>>>> 1.0 instead of 1.0.5 so I can build the schema?
>>> No, because this is unrelated.
>>>
>>> Let me try to build ADS 1.0 and come back to you.
>>>
>>
>> I truly thank you for your help, but I'm not having trouble building 
>> ADS. I don't actually do that - I just use the shipped jars. Quite 
>> likely I'm one of the few folks actually building a custom schema in 
>> the stable release branch of ADS...
>>
>> I realize it's painful to drop working on the cool new beta and 
>> support the stable release. If it's too much work don't worry about it 
>> and just ignore this request.
>>
>> FYI - the amount of work required to upgrade from 1.0 to the next 
>> version seems a bit intimidating. I wish you folks had released stable 
>> versions more often.
>>
>> Cheers.
>>
>>
>>
> 
> 
> -- 
> --
> cordialement, regards,
> Emmanuel L├ęcharny
> www.iktek.com
> directory.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-do-I-compile-for-Java-1.5--tp16534466p18390028.html
Sent from the Apache Directory Project mailing list archive at Nabble.com.


Mime
View raw message