[jitsi-users] importing libjitsi to an Eclipse project


#1

Anyone have a cookbook or even clues on how to:

1. download the libjitsi source tree to a Windows environment and import
the project into Eclipse?
2. build the library using Apache Ant and/or Maven in the Eclipse
environment (Mars release)?
3. Run/debug Jitsi client using the updated libjitsi (I have a need to
tinker with some low-level socket handling to test/demo something I'm
working on for a client).

I tried creating a new Maven project in Eclipse and importing the source,
and as an alternative, creating a Java project, importing the source, and
using the Eclipse Project->Configure->Convert to Maven.

I can follow up with specific problems with the build attempts, but I
suspect I just do not have the project set up right in Eclipse. Best I've
gotten is a small libjitsi.jar that was missing most of the classes, and
Jitsi would not run.

Appreciate any pointers, including a pointer to the right forum if this is
not the place for this discussion

···

--
Ed Jankiewicz


#2

Anyone have a cookbook or even clues on how to:

1. download the libjitsi source tree to a Windows environment and import the
project into Eclipse?

Clone the Git repo, import the pom in Eclipse. You'll need to have the m2e connector installed so that Eclipse correctly sets up the classpath.
Without m2e, you could run mvn eclipse:eclipse to create a .classpath file

2. build the library using Apache Ant and/or Maven in the Eclipse environment
(Mars release)?

The ant script isn't really used anymore unless you rebuild the native libraries. Run the Maven package target.

3. Run/debug Jitsi client using the updated libjitsi (I have a need to tinker
with some low-level socket handling to test/demo something I'm working on for
a client).

Copy the generated libjitsi-1.0-snapshot.jar (which should be about 8MB) to Jitsi's lib/installer-exclude and change .classpath and build.xml where it is referenced as something like libjitsi-1.0-20170103.173255-217.jar. Then run ant make.

I tried creating a new Maven project in Eclipse and importing the source, and
as an alternative, creating a Java project, importing the source, and using
the Eclipse Project->Configure->Convert to Maven.

I can follow up with specific problems with the build attempts, but I
suspect I just do not have the project set up right in Eclipse. Best
I've gotten is a small libjitsi.jar that was missing most of the
classes, and Jitsi would not run.

libjitsi.jar without a version number would only be generated by Ant. Don't use that target.

Appreciate any pointers, including a pointer to the right forum if this is
not the place for this discussion

Ingo


#3

I faced the same problem to run jvb with a local build libjitsi, I took the
steps below,

1. Git clone jvb

mvn package to install all the dependencies including libjitsi

2. cd ~/.m2/repository/org/jitsi

rm -rf libjitsi

3. git clone libjitsi

cd libjitsi

mvn install

4. cd jvb

Change the pom.xml to use 1.0-SNAPSHOT for libjitsi dependency

5. mvn -o compile

6. Import jvb into eclipse, now you can debug local built libjitsi.

Hope this helps.

/Kaiduan

···

On Thu, Mar 2, 2017 at 4:06 PM, Ingo Bauersachs <ingo@jitsi.org> wrote:

> Anyone have a cookbook or even clues on how to:
>
> 1. download the libjitsi source tree to a Windows environment and import
the
> project into Eclipse?

Clone the Git repo, import the pom in Eclipse. You'll need to have the m2e
connector installed so that Eclipse correctly sets up the classpath.
Without m2e, you could run mvn eclipse:eclipse to create a .classpath file

> 2. build the library using Apache Ant and/or Maven in the Eclipse
environment
> (Mars release)?

The ant script isn't really used anymore unless you rebuild the native
libraries. Run the Maven package target.

> 3. Run/debug Jitsi client using the updated libjitsi (I have a need to
tinker
> with some low-level socket handling to test/demo something I'm working
on for
> a client).

Copy the generated libjitsi-1.0-snapshot.jar (which should be about 8MB)
to Jitsi's lib/installer-exclude and change .classpath and build.xml where
it is referenced as something like libjitsi-1.0-20170103.173255-217.jar.
Then run ant make.

> I tried creating a new Maven project in Eclipse and importing the
source, and
> as an alternative, creating a Java project, importing the source, and
using
> the Eclipse Project->Configure->Convert to Maven.
>
> I can follow up with specific problems with the build attempts, but I
> suspect I just do not have the project set up right in Eclipse. Best
> I've gotten is a small libjitsi.jar that was missing most of the
> classes, and Jitsi would not run.

libjitsi.jar without a version number would only be generated by Ant.
Don't use that target.

> Appreciate any pointers, including a pointer to the right forum if this
is
> not the place for this discussion

Ingo

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#4

Actually, the key to my puzzle was revealed in three simple words in Ingo's
suggestion:

1. *clone* the repo rather than just starting with a stable snapshot as I
had done previously
2. *import* the POM into Eclipse (directly with file->import->existing
Maven project, rather than creating a Java or Maven project from scratch.
3. build the Maven target *package* which wasn't obvious from reading the
POM and other instructions.

Doing the above, I attained a project in Eclipse containing the libjitsi
source, was able to make a trivial (visible) local mod, build it, import
the resulting lib to my Jitsi project, build that and run it.

I'm set now. Thanks for all the advice.

···

On Thu, Mar 2, 2017 at 4:35 PM, Kaiduan Xie <kaiduanx@gmail.com> wrote:

I faced the same problem to run jvb with a local build libjitsi, I took
the steps below,

1. Git clone jvb

mvn package to install all the dependencies including libjitsi

2. cd ~/.m2/repository/org/jitsi

rm -rf libjitsi

3. git clone libjitsi

cd libjitsi

mvn install

4. cd jvb

Change the pom.xml to use 1.0-SNAPSHOT for libjitsi dependency

5. mvn -o compile

6. Import jvb into eclipse, now you can debug local built libjitsi.

Hope this helps.

/Kaiduan

On Thu, Mar 2, 2017 at 4:06 PM, Ingo Bauersachs <ingo@jitsi.org> wrote:

> Anyone have a cookbook or even clues on how to:
>
> 1. download the libjitsi source tree to a Windows environment and
import the
> project into Eclipse?

Clone the Git repo, import the pom in Eclipse. You'll need to have the
m2e connector installed so that Eclipse correctly sets up the classpath.
Without m2e, you could run mvn eclipse:eclipse to create a .classpath file

> 2. build the library using Apache Ant and/or Maven in the Eclipse
environment
> (Mars release)?

The ant script isn't really used anymore unless you rebuild the native
libraries. Run the Maven package target.

> 3. Run/debug Jitsi client using the updated libjitsi (I have a need to
tinker
> with some low-level socket handling to test/demo something I'm working
on for
> a client).

Copy the generated libjitsi-1.0-snapshot.jar (which should be about 8MB)
to Jitsi's lib/installer-exclude and change .classpath and build.xml where
it is referenced as something like libjitsi-1.0-20170103.173255-217.jar.
Then run ant make.

> I tried creating a new Maven project in Eclipse and importing the
source, and
> as an alternative, creating a Java project, importing the source, and
using
> the Eclipse Project->Configure->Convert to Maven.
>
> I can follow up with specific problems with the build attempts, but I
> suspect I just do not have the project set up right in Eclipse. Best
> I've gotten is a small libjitsi.jar that was missing most of the
> classes, and Jitsi would not run.

libjitsi.jar without a version number would only be generated by Ant.
Don't use that target.

> Appreciate any pointers, including a pointer to the right forum if this
is
> not the place for this discussion

Ingo

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

--
Ed Jankiewicz