Issue Details (XML | Word | Printable)

Key: BTRACE-10
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: j.bachorik
Reporter: joachimhskeie
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
btrace

Porting BTrace to Maven

Created: 03/Oct/09 07:12 PM   Updated: Friday 02:56 PM
Component/s: Core
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File btrace (current vs 12).diff (3 kB) 15/Mar/11 05:41 PM - joachimhskeie
2. Zip Archive btrace-maven.zip (934 kB) 03/Oct/09 08:39 PM - joachimhskeie
3. File maven.diff (3 kB) 16/Mar/11 10:20 AM - j.bachorik


Tags:


 Description  « Hide

I have made a first go at porting the project to Maven. I have moved classes into three subdirectories - btrace-agent, btrace-boot and btrace-client. I have tried to move the classes into the correct sub-project depending on the JAR files that are available, as well as the information in the ANT script supplied with the source.

I am not all that familiar with HG, so I am not sure how to make a DIFF script. I have however Zipped up my project folder, which I am attaching to this issue.

I also do not have enough experience with BTrace as of yet (I plan on starting to use it in a real project soon), so I would need someone more familiar with the project to test that the JARS built does not introduce more bugs.

I am willing to do more work on this port if needed.



joachimhskeie added a comment - 03/Oct/09 08:39 PM

Attached the ZIP file with the source code.


jbachorik added a comment - 04/Oct/09 11:06 AM

The easiest way to get the diff from HG is using 'hg diff -g > mydiff.patch' in the project root


joachimhskeie added a comment - 11/Oct/09 08:30 PM

Hello,

For some reason hg stopped working on my computer.

The changes though, is basically inside src. Delete the "shared" folder and unzip the attached ZIP (btrace-maven.zip) inside the src folder. This should lead the following structure under "src":

btrace-agent
btrace-boot
btrace-client
pom.xml
solaris
test


joachimhskeie added a comment - 15/Mar/11 05:41 PM

I cloned the Mavenized Core, and had some initial trouble when trying to build with maven.

As I am on a Mac, I dont have a "tools.jar" file at all in my JVM. Apple ships a "classes.jar" that contains the contents from tools.jar as well. Im not sure maven is able to auto-detect the OS, but in order to only have to change the path to classes.jar once, I added a dependencyManagement tag inside the main pom.xml. That way the sub-poms dont have to specify a version, or a path to the jar file.

Also, for some reason, I had to build some of the sub-project manually before the build of the parent pom.xml worked. Im not too sure why that might be.

I am attaching a diff file for the changes I made to the poms.


j.bachorik added a comment - 16/Mar/11 10:20 AM

Hi,
I've slightly modified the patch to be OS sensitive. Could you (anyone owning a mac) try it out?


joachimhskeie added a comment - 16/Mar/11 12:56 PM

I will have a look at it this evening.


joachimhskeie added a comment - 17/Mar/11 09:45 PM

I tried out the patch today, and it works fine on my machine (OS X 10.6.6, Java build 1.6.0_22-b04-307-10M3261, which is Java for Mac OS X 10.6 Update 3, not the newest Update 4).


joachimhskeie added a comment - 18/Mar/11 09:27 AM

Hello,

Trying out a clean clone of the repo (to verify BTRACE-63), I also needed to add the following to the main pom.xml inside the btrace-folder, as my compiler tried to compile with a Java 1.3 complancy for some reason.

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>ISO-8859-1</encoding>
                </configuration>
            </plugin>

Other than that, everything seems to be working as its supposed to! How far off the main repo is the mavenized repo ?


j.bachorik added a comment - 18/Mar/11 11:01 AM

I've applied the proposed change along with some other improvements - http://kenai.com/projects/btrace/sources/core-maven/revision/18.

In fact, the mavenized repo is now ahead of the main repo. Thanks to rather big structural differences between those 2 repos I was commiting fixes and features to the mavenized one only as I hope it will be the primary repo soon.


joachimhskeie added a comment - 18/Mar/11 01:06 PM

That sounds very nice indeed! I'm switching to the maven-repo for my continued work on EurekaJ, and I will submit a new diff file for BTRACE-55 as well that works with the mavenized core.