I just recalled that maven itself is able to generate generic Eclipse
project files. So instead of using the Maven Eclipse plugin, I

   - removed the projects from Eclipse
   - did the "git clean" with -d and -x to clear all files and directories
   that are not in the git repository
   - ran "mvn eclipse:eclipse"
      - some folders were missing. I created them with

find -type f | grep .project | grep -v .git > _pf

for pf in $(cat _pf); do

 base=$(dirname $pf)

 mkdir -p $base/src/main/java $base/src/test/java $base/src/main/resources
$base/src/test/resources

done

rm _pf


   - then, ran again "mvn eclipse:eclipse"
   - Imported all these porjects as normal Eclipse projects ; not using the
   maven pluging at all

After doing that, I still got a few projects not building, but I don't
think I need those.
I also tried running the unit tests in Eclipse for "james-server-data-jpa",
but that is failing because it is expecting a post process on it (*This
configuration disallows runtime optimization, but the following listed
types were not enhanced at build time or at class load time with a
javaagent: "org.apache.james.domainlist.jpa.model.JPADomain*), so I will
have to run them from outside Eclipse.



On Thu, 14 Mar 2019 at 16:15, Simon Levesque <si...@simonlevesque.com>
wrote:

> Hi Garry,
>
> I only use Linux and m2e pluging is complaining.
>
> On Thu, 14 Mar 2019 at 09:25, Garry Hurley <garry.hurley...@gmail.com>
> wrote:
>
>> Vincent you are absolutely right. One additional note I found: if you are
>> running eclipse on Windows, pretty much forget about using it to compile
>> the code, even with the maven plugin. the m2e plugin in the latest version
>> of eclipse really sucks. Go and get maven for Windows. The latest version
>> of source does compile with mvn -DskipTests=true install
>> You can use other options, but to get an installable version, that is
>> what I do. If you have a Linux system handy, just build there and use the
>> remoteSystemExplorer in eclipse to view and edit the source code. That way
>> you don’t have to spend hours configuring your build tools in Windows and
>> dealing with the docker images (which are only for testing anyhow).
>>
>> Sent from my iPhone
>>
>> > On Mar 14, 2019, at 8:37 AM, Vincent Pang <vincent.x.p...@gmail.com>
>> wrote:
>> >
>> > Hi Simon,
>> > You should use maven to build. The easiest way is to use Eclipse or
>> > NetBeans to import maven project directly and choose projects you want
>> > to debug in your IDE.
>> > It is easy to build these projects by maven.
>> >
>> > Vincent
>> >
>> >> On Thu, Mar 14, 2019 at 8:19 AM Simon Levesque <suriv...@gmail.com>
>> wrote:
>> >>
>> >> Hi all,
>> >>
>> >> I spend a lots of days trying to set up an environment to run James in
>> an
>> >> IDE to be able to debug and fix things, but I didn't succeed.
>> >>
>> >>   1. Import James in Eclipse
>> >>      1. Eclipse is complaining that there are Maven features that are
>> not
>> >>      supported
>> >>      2. Some projects do not compile (I guess because of previous
>> point)
>> >>   2. Import in Intellij
>> >>      1. No complains
>> >>      2. When trying to start, build errors due to missing imports
>> >>   3. Start a fresh Java application, depend on the James libraries
>> >>      1. I made it start like the main James spring application you have
>> >>      2. It is starting, the database gets the tables
>> >>      3. Then, OpenJPA is trying to get a javax transaction manager via
>> >>      JNDI and complains that JNDI is not initialized
>> >>         1. Even in Spring, there is no javax transaction manager
>> >>         2. If I try to configure JNDI to use any of the 2
>> implementations
>> >>         I found in the classpath (ActiveMQ and Camel), both are fine,
>> but
>> >>         complainings they don't know about the "java" namespace
>> >>         3. In James code, I cannot find anywhere you actually configure
>> >>         JNDI by searching "jndi" (case insensitive)
>> >>
>> >> So, besides using Notepad and compiling from command line, is there
>> any way
>> >> to import that project in a recent Java IDE?
>> >>
>> >> thanks
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
>> > For additional commands, e-mail: server-dev-h...@james.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
>> For additional commands, e-mail: server-dev-h...@james.apache.org
>>
>>

Reply via email to