RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Tue Dec 23, 2025 11:06 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Time To Ditch Ant(iquated build system)?
PostPosted: Thu Apr 19, 2012 4:38 am 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
I'm not sure how familiar you guys are with Maven, but Maven 3 is the way to roll for any Java project, enterprise or otherwise. I'd be willing to do some/all of the work migrating from ant to maven if you guys are up for it. Some advantages:

1) No binaries in your repo, adios lib dir
2) Repeatable and predictable builds
3) Sophisticated release management
4) Automated documentation and code review/metrics (don't be scared, it's a good thing)
5) Industry standard, anyone can walk up and just use it

Disadvantages:

1) Someone has to do the move
2) The move involves directory layout change
3) Some people are old fashioned and die-hard ant fans (they'll live)
4) Possibly teething troubles esp around cross platform builds, though it will likely make that easier, not harder.

Let me know what you guys think!

Fred.

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Thu Apr 19, 2012 9:51 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
If you wish to propose the changes I can look at updating the repository.


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Thu Apr 19, 2012 11:32 am 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
This one is definitely in the back seat to the git one in my eyes. It's worthwhile anyway, but even better if making the change while already migrated to Git. Let's see how we get on in the other thread first. This one is also quite a bit more work overall.

If/when it goes ahead, though, I have a proper nexus server setup somewhere for deploying artifacts to, but I think it's offline right now. You/we could use that once migrated, if you wanted to. It should be up again fairly soon, with some luck.

Fred.

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Mon Apr 30, 2012 8:52 am 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
My nexus server is back online and with a shiny new (shorter) URL. Looking forward to participating in the next RR release somehow :-)

Dale, did you get a chance to have a play with mvn on that other project to get a feel for it?

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Mon Apr 30, 2012 10:38 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
I loaded up maven last night and got my environment variables setup as suggested from their site. BUT, when I run mvn --version it spits out some stupid crap about my Java Home being C:\yaddayadda\jre which is wrong.
I'm not sure why it thinks that, as my JAVA_HOME is set correctly to my JDK install and my PATH is set to JAVA_HOME\bin
So needless to say my attempted maven build failed and it was late so I called it a night.


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Mon Apr 30, 2012 11:08 am 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
Well that sucks! Can you post more detail? Or are you happy figuring out the issue? I've put maven on countless win XP and Linux machines and not had any weirdness like that. Is it Vista or 7? Does searching yield any clues? User env vars set or global? Not that I can see why that would have any effect, but worth asking I guess. Good luck! :-)

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Mon Apr 30, 2012 5:55 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
I did get it to build from within Eclipse after fiddling with Window->Preferences->Java->Installed JREs and making sure my JDK path was set "C:\Program Files\Java\jdk1.6.0_16"

This is what my system says:
Code:
C:\Documents and Settings\Dale\OpenLogViewer>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_16

C:\Documents and Settings\Dale\OpenLogViewer>echo %M2_HOME%
C:\Program Files\Apache\apache-maven-3.0.4

C:\Documents and Settings\Dale\OpenLogViewer>echo %M2%
C:\Program Files\Apache\apache-maven-3.0.4\bin

C:\Documents and Settings\Dale\OpenLogViewer>echo %PATH%
C:\Program Files\Subversion Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\GnuWin32\bin;C:\Program Files\MySQL\bin;C:\Program Files\Common Files\DivX Shared\;C:\Program Files\GtkSharp\2.12\bin;C:\Program Files\Java\jdk1.6.0_16\bin;C:\Program Files\Apache\apache-maven-3.0.4\bin

C:\Documents and Settings\Dale\OpenLogViewer>mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
Maven home: C:\Program Files\Apache\apache-maven-3.0.4
Java version: 1.6.0_16, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_16\jre
Default locale: en_CA, platform encoding: Cp1252
OS name: "windows xp", version: "5.1", arch: "x86", family: "windows"
C:\Documents and Settings\Dale\OpenLogViewer>javac -version
javac 1.6.0_16

C:\Documents and Settings\Dale\OpenLogViewer>mvn
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenLogViewer 0.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------

<... snip ...>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.734s
[INFO] Finished at: Mon Apr 30 17:50:34 EDT 2012
[INFO] Final Memory: 14M/254M
[INFO] ------------------------------------------------------------------------


Building within Eclipse I get this error, I suspect I need to install a library somewhere on my system?
Code:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
I didn't see it in the command line maven build though.


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Mon Apr 30, 2012 6:14 pm 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
You likely need to enable the maven-ness of it in eclipse. Maven generates the classpath and without that eclipse can't find the library which lives in your .m2 directory far away. What you're doing in eclipse is likely just a std Java build unaware that it's a maven project and thus unaware that there is a library required and where that lib is. Hopefully that makes sense :-)

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Mon Apr 30, 2012 11:12 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
In Eclipse I right click on pod.xml and select Maven build...

Here's the debug log (line 88 and near the very end).
Attachment:
log.txt

It also happened on the subsequent maven clean.

I see Eclipse is busy updating something called nexus maven repository index. We'll see what happens when that's done.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Tue May 01, 2012 7:12 am 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
Does it work correctly on the command line? Thought: how up to date is your eclipse?

Try switching it to use external maven, I don't know what I have setup, but I never run builds in eclipse. Can check later for you, though I suspect that this'll help.

http://comments.gmane.org/gmane.comp.id ... .user/7697

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Tue May 01, 2012 9:48 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
I'll have to recheck a command line build.
I'm using the latest Eclipse version.

As per this: http://www.slf4j.org/codes.html#StaticLoggerBinder
Where is the referenced jar located (in the repository or elsewhere) and what's making this reference? Is it maven or actually part of OpenLogViewer?


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Tue May 01, 2012 10:01 am 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
Another odd thing. I tried it on a clean install on my Win7 x64 system (running 32 bit Java).
I used Eclipse import to pull from the repository on GitHub. Ran the maven build from within Eclipse (saw the error for SLF4J on build and clean as before) got the OpenLogViewer window, all seems to execute fine.

Then I did a clean and tried to build it again and I'm back to square one:
Code:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project OpenLogViewer: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files (x86)\Java\jre6\..\lib\tools.jar

Something in the maven clean destroys the environment in which the build was successful the first time round.

These are the kind of problems I hate...


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Tue May 01, 2012 12:05 pm 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
Did you try what I suggested, though? Switch eclipse to use the real maven instead of it's built in one. It seems to be a bug in the embedded eclipse variant.

I think we need another call to explain classpaths in more detail?

Weird about working and then not.

Fred.

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Tue May 01, 2012 1:07 pm 
Offline
RomRaider Developer

Joined: Wed May 20, 2009 9:49 pm
Posts: 7314
Location: Canada eh!
On my Win7 machine I have no external maven installation, the fewer external tools then better as it just makes the whole environment harder to setup.

In Eclipse there's a background process running and it takes about an hour to complete (slow repository?) and it's updating something local nexus maven repository index. I believe once that is complete then a pure Eclipse embedded build works fine with no errors or warnings. There seems to be a huge reliance on this maven repository index (61MB) http://repo1.maven.org/maven2.
Each time I open Eclipse it wants to download that 61MB index for update.


Top
 Profile  
 
 Post subject: Re: Time To Ditch Ant(iquated build system)?
PostPosted: Tue May 01, 2012 1:15 pm 
Offline
Experienced
User avatar

Joined: Thu Apr 19, 2012 3:44 am
Posts: 385
Turn it off, I don't use it. I don't even know what it does, TBH.

It's up to you what you do or don't do, but an mvn install is pretty painless regardless of platform. Just drop it in the right place, setup the vars and you're away.

Fred.

_________________
The type of scooby that I most enjoy!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 45 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl