You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Felix Knecht <fe...@apache.org> on 2007/12/05 22:13:17 UTC

Studio Maven Build

Long time ago ... but it's time to ask for some help and I hope that somebody can spare some time :-)

State:

It almost works. I can
- Checkout my sandbox
- Install the studio plugin
- Create project and classpath files
- Build dist
- Run within eclipse

See also http://cwiki.apache.org/confluence/x/CRoB

When I run from eclipse - open plugin.xml file and run 'Launch an Eclipse application in Debug Mode' from Overview tab I
get first a popup saying that in different projects errors exists. When proceeding the application launches and I can at
least create a connection to an LDAP-server and browse.

My problem is now, that I can't find the before mentioned errors. Where can I get them?

I'm using
- eclipse-3.3.1.1 64-bit
- java version "1.6.0_03" 64-bit
- Eclipse RCP 3.2.1

Regards
Felix

Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> Hehe, no pb.
> 
> I knew something was wrong... ;)
> 
> I managed to build everything but I had to do it from the root (/)
> directory. I tried as it is in the documentation (/studio) but I got an
> error.
> 
> I'm going to play with it now and give some feedback on the Mac OS X
> side of the build.

Thanks for doing some tests, feedback is heartily welcome.

As I haven't found in the past much time I tried to focus on the eclipse stuff. I don't think that a built dist will
already work but I'm working on it.

Felix

Re: Studio Maven Build

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hehe, no pb.

I knew something was wrong... ;)

I managed to build everything but I had to do it from the root (/)
directory. I tried as it is in the documentation (/studio) but I got an
error.

I'm going to play with it now and give some feedback on the Mac OS X side of
the build.

Thanks.
Pierre-Arnaud

On Dec 13, 2007 5:56 PM, Felix Knecht <fe...@apache.org> wrote:

> Pierre-Arnaud Marcelot schrieb:
> > Hi Felix,
> >
> > Thanks for answering.
>
> Arghh, my fault, but I can't remember why I added the plugin itself to the
> pom.xml.
>
> Big Sorry,
> Felix
>
>
> >
> > I followed the instructions on this page and I was actually trying to
> > build the maven-studio-plugin when I got the error.
> > I was in the /studio-plugin folder...
> >
> > Thanks,
> > Pierre-Arnaud
> >
> > On Dec 13, 2007 5:08 PM, Felix Knecht <felixk@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     Pierre-Arnaud Marcelot schrieb:
> >     > Hi Guys,
> >     >
> >     > Sorry for the delay in answering, I was quite occupied lately.
> >     >
> >     > I got an error when trying out the mavenized build.
> >     >
> >     > Here's what I've done:
> >     > I've cleaned my local maven repo ($ rm -rf ~/.m2)
> >     > I've run 'mvn clean install' on the latest update of the ApacheDS
> >     trunk
> >     > And then the following commands:
> >     > $ svn co
> https://svn.apache.org/repos/asf/directory/sandbox/felixk/
> >     > < https://svn.apache.org/repos/asf/directory/sandbox/felixk/>
> >     > StudioMavenized
> >     > $ cd StudioMavenized/studio-plugin
> >     > $ mvn install
> >     >
> >     > Here's what I get:
> >     > [INFO] Scanning for projects...
> >     > [INFO]
> >     >
> >
> ----------------------------------------------------------------------------
> >     >
> >     > [INFO] Building Apache Directory Studio Plugin
> >     > [INFO]    task-segment: [clean]
> >     > [INFO]
> >     >
> >
> ----------------------------------------------------------------------------
> >     > [INFO]
> >     >
> >
> ------------------------------------------------------------------------
> >     > [ERROR] BUILD FAILURE
> >     > [INFO]
> >     >
> >
> ------------------------------------------------------------------------
> >     > [INFO] A required plugin was not found: Plugin could not be found
> -
> >     > check that the goal name is correct: Unable to download the
> artifact
> >     > from any repository
> >     >
> >     <snip/>
> >     >
> >     >
> >     > Am I missing something?
> >
> >     Yes, you need to build the maven-studio-plugin first on its own. I
> >     wasn't able until now to integrate it in the overall build. See also
> >     http://cwiki.apache.org/confluence/x/CRoB
> >
> >     Felix
> >
> >
> >
>
>

Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> Hi Felix,
> 
> Thanks for answering.

Arghh, my fault, but I can't remember why I added the plugin itself to the pom.xml.

Big Sorry,
Felix


> 
> I followed the instructions on this page and I was actually trying to
> build the maven-studio-plugin when I got the error.
> I was in the /studio-plugin folder...
> 
> Thanks,
> Pierre-Arnaud
> 
> On Dec 13, 2007 5:08 PM, Felix Knecht <felixk@apache.org
> <ma...@apache.org>> wrote:
> 
>     Pierre-Arnaud Marcelot schrieb:
>     > Hi Guys,
>     >
>     > Sorry for the delay in answering, I was quite occupied lately.
>     >
>     > I got an error when trying out the mavenized build.
>     >
>     > Here's what I've done:
>     > I've cleaned my local maven repo ($ rm -rf ~/.m2)
>     > I've run 'mvn clean install' on the latest update of the ApacheDS
>     trunk
>     > And then the following commands:
>     > $ svn co https://svn.apache.org/repos/asf/directory/sandbox/felixk/
>     > < https://svn.apache.org/repos/asf/directory/sandbox/felixk/>
>     > StudioMavenized
>     > $ cd StudioMavenized/studio-plugin
>     > $ mvn install
>     >
>     > Here's what I get:
>     > [INFO] Scanning for projects...
>     > [INFO]
>     >
>     ----------------------------------------------------------------------------
>     >
>     > [INFO] Building Apache Directory Studio Plugin
>     > [INFO]    task-segment: [clean]
>     > [INFO]
>     >
>     ----------------------------------------------------------------------------
>     > [INFO]
>     >
>     ------------------------------------------------------------------------
>     > [ERROR] BUILD FAILURE
>     > [INFO]
>     >
>     ------------------------------------------------------------------------
>     > [INFO] A required plugin was not found: Plugin could not be found -
>     > check that the goal name is correct: Unable to download the artifact
>     > from any repository
>     >
>     <snip/>
>     >
>     >
>     > Am I missing something?
> 
>     Yes, you need to build the maven-studio-plugin first on its own. I
>     wasn't able until now to integrate it in the overall build. See also
>     http://cwiki.apache.org/confluence/x/CRoB
> 
>     Felix
> 
> 
> 


Re: Studio Maven Build

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Felix,

Thanks for answering.

I followed the instructions on this page and I was actually trying to build
the maven-studio-plugin when I got the error.
I was in the /studio-plugin folder...

Thanks,
Pierre-Arnaud

On Dec 13, 2007 5:08 PM, Felix Knecht <fe...@apache.org> wrote:

> Pierre-Arnaud Marcelot schrieb:
> > Hi Guys,
> >
> > Sorry for the delay in answering, I was quite occupied lately.
> >
> > I got an error when trying out the mavenized build.
> >
> > Here's what I've done:
> > I've cleaned my local maven repo ($ rm -rf ~/.m2)
> > I've run 'mvn clean install' on the latest update of the ApacheDS trunk
> > And then the following commands:
> > $ svn co https://svn.apache.org/repos/asf/directory/sandbox/felixk/
> > <https://svn.apache.org/repos/asf/directory/sandbox/felixk/>
> > StudioMavenized
> > $ cd StudioMavenized/studio-plugin
> > $ mvn install
> >
> > Here's what I get:
> > [INFO] Scanning for projects...
> > [INFO]
> >
> ----------------------------------------------------------------------------
> >
> > [INFO] Building Apache Directory Studio Plugin
> > [INFO]    task-segment: [clean]
> > [INFO]
> >
> ----------------------------------------------------------------------------
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD FAILURE
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] A required plugin was not found: Plugin could not be found -
> > check that the goal name is correct: Unable to download the artifact
> > from any repository
> >
> <snip/>
> >
> >
> > Am I missing something?
>
> Yes, you need to build the maven-studio-plugin first on its own. I
> wasn't able until now to integrate it in the overall build. See also
> http://cwiki.apache.org/confluence/x/CRoB
>
> Felix
>
>
>

Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Pierre-Arnaud Marcelot schrieb:
> Hi Guys,
>
> Sorry for the delay in answering, I was quite occupied lately.
>
> I got an error when trying out the mavenized build.
>
> Here's what I've done:
> I've cleaned my local maven repo ($ rm -rf ~/.m2)
> I've run 'mvn clean install' on the latest update of the ApacheDS trunk
> And then the following commands:
> $ svn co https://svn.apache.org/repos/asf/directory/sandbox/felixk/
> <https://svn.apache.org/repos/asf/directory/sandbox/felixk/>
> StudioMavenized
> $ cd StudioMavenized/studio-plugin
> $ mvn install
>
> Here's what I get:
> [INFO] Scanning for projects...
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Building Apache Directory Studio Plugin
> [INFO]    task-segment: [clean]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] A required plugin was not found: Plugin could not be found -
> check that the goal name is correct: Unable to download the artifact
> from any repository
>
<snip/>
>
>
> Am I missing something?

Yes, you need to build the maven-studio-plugin first on its own. I
wasn't able until now to integrate it in the overall build. See also
http://cwiki.apache.org/confluence/x/CRoB

Felix



Re: Studio Maven Build

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
Hi Guys,

Sorry for the delay in answering, I was quite occupied lately.

I got an error when trying out the mavenized build.

Here's what I've done:
I've cleaned my local maven repo ($ rm -rf ~/.m2)
I've run 'mvn clean install' on the latest update of the ApacheDS trunk
And then the following commands:
$ svn co https://svn.apache.org/repos/asf/directory/sandbox/felixk/StudioMavenized
$ cd StudioMavenized/studio-plugin
$ mvn install

Here's what I get:
[INFO] Scanning for projects...
[INFO]
----------------------------------------------------------------------------
[INFO] Building Apache Directory Studio Plugin
[INFO]    task-segment: [clean]
[INFO]
----------------------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check
that the goal name is correct: Unable to download the artifact from any
repository

Try downloading the file manually from the project website.

Then, install it using the command:
    mvn install:install-file
-DgroupId=org.apache.directory.studio-DartifactId=maven-studio-plugin
\
        -Dversion=1.0-SNAPSHOT -Dpackaging=maven-plugin -Dfile=/path/to/file


  org.apache.directory.studio:maven-studio-plugin:maven-plugin:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

  org.apache.directory.studio:maven-studio-plugin:maven-plugin:1.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)

[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Thu Dec 13 15:59:26 CET 2007
[INFO] Final Memory: 3M/5M
[INFO]
------------------------------------------------------------------------

Am I missing something?

Thanks,
Pierre-Arnaud


On Dec 12, 2007 9:06 AM, Felix Knecht <fe...@apache.org> wrote:

> Stefan Seelmann schrieb:
> > Hi Felix,
> >
> > Felix Knecht schrieb:
> >
> >
> >> I do now have some strange effects (but I do have them with the ant/ivy
> build as well):
> >>
> >> - Do a checkout (trunk/sandbox)
> >> - Build the necessary eclipse stuff (ant resolve/mvn eclipse:clean
> studio:clean eclipse:eclipse studio:eclipse)
> >> - Import the projects to eclipse
> >> - Change in eclipse to the studio-ldapbrowser-ui project
> >> - Open the plugin.xml and 'Launch an Eclipse application in Debug
> mode'.
> >>
> >> I need several tries until I get the app running without popping up any
> errors. The strange thing is that every time I
> >> launch the application I get less errors (then I cancel the start)
> until all errors are gone. I do have this behaviour
> >> for both builds (ant / mvn). Is this normal?
> >>
> >>
> >
> > No, I don't have these problems. Now your maven build works very fine
> > for me :-)
> >
>
> Sounds good :-).
>
> Do you think this is a way we can follow to complete the maven-build for
> the studio?
>
> > I do the following now:
> > - Do a checkout from your sandbox
> > - mvn eclipse:clean studio:clean eclipse:eclipse studio:eclipse
> > - Delete the .project file in the root directory (otherwise the eclipse
> > importer only finds the maven-studio project)
> > - Launching the Eclipse application
> >
> > What are the error messages you get? Do you have any error messages in
> > the "Problems view"?
> >
> > What you could check is the target platform and plugins: Go to
> > Window->Preferences->Plug-in Development->Target Platform. Choose the
> > target platform, either Eclipse 3.2 or 3.3. Ensure to deselect all
> > "org.apache.directory" plugins that are installed in the target
> platform.
> >
> >
>
> I'll try this as soon as I find some time at home. Thanks for hints.
>
> Felix
>
>

Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Stefan Seelmann schrieb:
> Hi Felix,
>
> Felix Knecht schrieb:
>
>   
>> I do now have some strange effects (but I do have them with the ant/ivy build as well):
>>
>> - Do a checkout (trunk/sandbox)
>> - Build the necessary eclipse stuff (ant resolve/mvn eclipse:clean studio:clean eclipse:eclipse studio:eclipse)
>> - Import the projects to eclipse
>> - Change in eclipse to the studio-ldapbrowser-ui project
>> - Open the plugin.xml and 'Launch an Eclipse application in Debug mode'.
>>
>> I need several tries until I get the app running without popping up any errors. The strange thing is that every time I
>> launch the application I get less errors (then I cancel the start) until all errors are gone. I do have this behaviour
>> for both builds (ant / mvn). Is this normal?
>>
>>     
>
> No, I don't have these problems. Now your maven build works very fine
> for me :-)
>   

Sounds good :-).

Do you think this is a way we can follow to complete the maven-build for
the studio?

> I do the following now:
> - Do a checkout from your sandbox
> - mvn eclipse:clean studio:clean eclipse:eclipse studio:eclipse
> - Delete the .project file in the root directory (otherwise the eclipse
> importer only finds the maven-studio project)
> - Launching the Eclipse application
>
> What are the error messages you get? Do you have any error messages in
> the "Problems view"?
>
> What you could check is the target platform and plugins: Go to
> Window->Preferences->Plug-in Development->Target Platform. Choose the
> target platform, either Eclipse 3.2 or 3.3. Ensure to deselect all
> "org.apache.directory" plugins that are installed in the target platform.
>
>   

I'll try this as soon as I find some time at home. Thanks for hints.

Felix


Re: Studio Maven Build

Posted by Stefan Seelmann <se...@apache.org>.
Hi Felix,

Felix Knecht schrieb:

> 
> I do now have some strange effects (but I do have them with the ant/ivy build as well):
> 
> - Do a checkout (trunk/sandbox)
> - Build the necessary eclipse stuff (ant resolve/mvn eclipse:clean studio:clean eclipse:eclipse studio:eclipse)
> - Import the projects to eclipse
> - Change in eclipse to the studio-ldapbrowser-ui project
> - Open the plugin.xml and 'Launch an Eclipse application in Debug mode'.
> 
> I need several tries until I get the app running without popping up any errors. The strange thing is that every time I
> launch the application I get less errors (then I cancel the start) until all errors are gone. I do have this behaviour
> for both builds (ant / mvn). Is this normal?
> 

No, I don't have these problems. Now your maven build works very fine
for me :-)

I do the following now:
- Do a checkout from your sandbox
- mvn eclipse:clean studio:clean eclipse:eclipse studio:eclipse
- Delete the .project file in the root directory (otherwise the eclipse
importer only finds the maven-studio project)
- Launching the Eclipse application

What are the error messages you get? Do you have any error messages in
the "Problems view"?

What you could check is the target platform and plugins: Go to
Window->Preferences->Plug-in Development->Target Platform. Choose the
target platform, either Eclipse 3.2 or 3.3. Ensure to deselect all
"org.apache.directory" plugins that are installed in the target platform.

Regards,
Stefan



Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Stefan Seelmann schrieb:
> 
> There are some issues with the .classpath file:
> 
> 1)
> Not all .classpath files contain the following entry:
> 
> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
> 
> It is used within Eclipse to create the "Plug-in Dependencies" from
> MANIFEST.MF#Require-Bundle.
> 

This helped a lot, thanks.

> 
> 2)
> On the other hand the .classpath files contain references to M2_REPO. I
> think they are not necessary because with 1) the plug-in dependencies
> are resolved automatically within eclipse from the manifest file.
> 

I could solve this by adding the <pde>true</pde> tag

> 
> 3)
> There are duplicate classpath entries, e.g. in studio-connection-core.
> The .classpath file contains
> 
> <classpathentry kind="src"
> path="/org.apache.directory.studio.ldifparser"></classpathentry>
> 
> but this dependency is already there in MANIFEST.MF#Require-Bundle.
> 

I do now have some strange effects (but I do have them with the ant/ivy build as well):

- Do a checkout (trunk/sandbox)
- Build the necessary eclipse stuff (ant resolve/mvn eclipse:clean studio:clean eclipse:eclipse studio:eclipse)
- Import the projects to eclipse
- Change in eclipse to the studio-ldapbrowser-ui project
- Open the plugin.xml and 'Launch an Eclipse application in Debug mode'.

I need several tries until I get the app running without popping up any errors. The strange thing is that every time I
launch the application I get less errors (then I cancel the start) until all errors are gone. I do have this behaviour
for both builds (ant / mvn). Is this normal?

Thanks
Felix

Re: Studio Maven Build

Posted by Stefan Seelmann <se...@apache.org>.
Hi Felix,

> 
>>> When I run from eclipse - open plugin.xml file and run 'Launch an Eclipse application in Debug Mode' from Overview tab I
>>> get first a popup saying that in different projects errors exists. When proceeding the application launches and I can at
>>> least create a connection to an LDAP-server and browse.
>>>
>>> My problem is now, that I can't find the before mentioned errors. Where can I get them?
>>>
>>>     
>> In Eclipse I got a lot of errors in the "Problems view". Most of them are:
>> - MANIFEST.MF: Manifest has no main section
>> - Missing dependencies
>> - Missing source foldes
>>   
> 
> Which /studio/studio-* can I use to see it?
>

There are some issues with the .classpath file:

1)
Not all .classpath files contain the following entry:

<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

It is used within Eclipse to create the "Plug-in Dependencies" from
MANIFEST.MF#Require-Bundle.


2)
On the other hand the .classpath files contain references to M2_REPO. I
think they are not necessary because with 1) the plug-in dependencies
are resolved automatically within eclipse from the manifest file.


3)
There are duplicate classpath entries, e.g. in studio-connection-core.
The .classpath file contains

<classpathentry kind="src"
path="/org.apache.directory.studio.ldifparser"></classpathentry>

but this dependency is already there in MANIFEST.MF#Require-Bundle.


Regards,
Stefan




Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Felix Knecht schrieb:
> Stefan Seelmann schrieb:
>> Hi Felix,
>>
>>> mvn
>>> - 'install' is needed because some plugin projects are referencing
>>> studio-dsml-parser witch doesn't already exists in local mvn repository
>>> on first run.
>>> - 'eclipse:eclipse' creates the .project and .classpath files in the
>>> module folders
>>> - 'studio.eclipse' adapts the .classpath to have entries like
>>> <classpathentry path="lib/commons-io-1.3.1.jar" exported="true"
>>> kind="lib"/> and adapts the 'Bundle-ClassPath' entry in the manifest.mf
>>>
>> I just found one option for the eclipse:eclipse goal:
>>
>> <pde>true</pde>
>> http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#pde
>>
>> It seems it makes something similar like the studio:eclipse goal.
>>
> 
> Almost yes. I played with it too, but I wasn't able to add the 'lib' directory prefix. To copy the needed dependencies
> to the studio/{plugin}/lib directory we can use the maven-dependency-plugin as a workaround but to add then the right
> path to the MANIFEST.MF I haven't found any solution using the pde option.
> That's why I created the goal studio:eclipse - copy the nonscoped 'provided' dependencies to the lib directory (instead
> of using the workaround) and adapt the Bundle-ClassPath in the Manifest file. I prefere a solution where you only need
> to change the dependencies in the pom instead of one you need to make the changes as well in the manifest file. And even
> then is still the open point what to do with the prefixing directory 'lib'. We can skip it and have the jar files in the
> root of the created jar file like e.g. for studio-jars:

Maybe the new bundle-plugin can help to solve this:
http://cwiki.apache.org/confluence/display/FELIX/Maven+Bundle+Plugin+%28BND%29

> 
> felix@donar ~/svn/apache/directory/maven-studio/studio-jars $ jar ft target/org.apache.directory.studio.jars-1.0.0.jar
> META-INF/
> META-INF/MANIFEST.MF
> antlr-2.7.7.jar
> shared-ldap-0.9.8-SNAPSHOT.jar
> shared-ldap-constants-0.9.8-SNAPSHOT.jar
> studio-dsml-parser-0.4.1.jar
> shared-asn1-0.9.8-SNAPSHOT.jar
> commons-collections-3.2.jar
> dom4j-1.6.1.jar
> nlog4j-1.2.25.jar
> xpp3-1.1.3.4.O.jar
> META-INF/LICENSE
> META-INF/NOTICE
> 
> instead of the now existing
> 
> felix@donar ~/svn/apache/directory/maven-studio/studio-jars $ jar ft target/org.apache.directory.studio.jars-1.0.0.jar
> META-INF/
> META-INF/MANIFEST.MF
> lib/
> lib/antlr-2.7.7.jar
> lib/shared-ldap-0.9.8-SNAPSHOT.jar
> lib/shared-ldap-constants-0.9.8-SNAPSHOT.jar
> lib/studio-dsml-parser-0.4.1.jar
> lib/shared-asn1-0.9.8-SNAPSHOT.jar
> lib/commons-collections-3.2.jar
> lib/dom4j-1.6.1.jar
> lib/nlog4j-1.2.25.jar
> lib/xpp3-1.1.3.4.O.jar
> META-INF/LICENSE
> META-INF/NOTICE
> 
> 
> If the lib prefix isn't absolutely needed or if you find a solution to prefix using the pde option  I'm absolutely +1
> using the pde option and not having our own plugin for this.
> 
> Felix
> 
> 
>> I'll experiment with it a bit...
>>
>> Regards,
>> Stefan
>>
> 


Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
Stefan Seelmann schrieb:
> Hi Felix,
> 
>> mvn
>> - 'install' is needed because some plugin projects are referencing
>> studio-dsml-parser witch doesn't already exists in local mvn repository
>> on first run.
>> - 'eclipse:eclipse' creates the .project and .classpath files in the
>> module folders
>> - 'studio.eclipse' adapts the .classpath to have entries like
>> <classpathentry path="lib/commons-io-1.3.1.jar" exported="true"
>> kind="lib"/> and adapts the 'Bundle-ClassPath' entry in the manifest.mf
>>
> 
> I just found one option for the eclipse:eclipse goal:
> 
> <pde>true</pde>
> http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#pde
> 
> It seems it makes something similar like the studio:eclipse goal.
> 

Almost yes. I played with it too, but I wasn't able to add the 'lib' directory prefix. To copy the needed dependencies
to the studio/{plugin}/lib directory we can use the maven-dependency-plugin as a workaround but to add then the right
path to the MANIFEST.MF I haven't found any solution using the pde option.
That's why I created the goal studio:eclipse - copy the nonscoped 'provided' dependencies to the lib directory (instead
of using the workaround) and adapt the Bundle-ClassPath in the Manifest file. I prefere a solution where you only need
to change the dependencies in the pom instead of one you need to make the changes as well in the manifest file. And even
then is still the open point what to do with the prefixing directory 'lib'. We can skip it and have the jar files in the
root of the created jar file like e.g. for studio-jars:

felix@donar ~/svn/apache/directory/maven-studio/studio-jars $ jar ft target/org.apache.directory.studio.jars-1.0.0.jar
META-INF/
META-INF/MANIFEST.MF
antlr-2.7.7.jar
shared-ldap-0.9.8-SNAPSHOT.jar
shared-ldap-constants-0.9.8-SNAPSHOT.jar
studio-dsml-parser-0.4.1.jar
shared-asn1-0.9.8-SNAPSHOT.jar
commons-collections-3.2.jar
dom4j-1.6.1.jar
nlog4j-1.2.25.jar
xpp3-1.1.3.4.O.jar
META-INF/LICENSE
META-INF/NOTICE

instead of the now existing

felix@donar ~/svn/apache/directory/maven-studio/studio-jars $ jar ft target/org.apache.directory.studio.jars-1.0.0.jar
META-INF/
META-INF/MANIFEST.MF
lib/
lib/antlr-2.7.7.jar
lib/shared-ldap-0.9.8-SNAPSHOT.jar
lib/shared-ldap-constants-0.9.8-SNAPSHOT.jar
lib/studio-dsml-parser-0.4.1.jar
lib/shared-asn1-0.9.8-SNAPSHOT.jar
lib/commons-collections-3.2.jar
lib/dom4j-1.6.1.jar
lib/nlog4j-1.2.25.jar
lib/xpp3-1.1.3.4.O.jar
META-INF/LICENSE
META-INF/NOTICE


If the lib prefix isn't absolutely needed or if you find a solution to prefix using the pde option  I'm absolutely +1
using the pde option and not having our own plugin for this.

Felix


> I'll experiment with it a bit...
> 
> Regards,
> Stefan
> 


Re: Studio Maven Build

Posted by Stefan Seelmann <se...@apache.org>.
Hi Felix,

> mvn
> - 'install' is needed because some plugin projects are referencing
> studio-dsml-parser witch doesn't already exists in local mvn repository
> on first run.
> - 'eclipse:eclipse' creates the .project and .classpath files in the
> module folders
> - 'studio.eclipse' adapts the .classpath to have entries like
> <classpathentry path="lib/commons-io-1.3.1.jar" exported="true"
> kind="lib"/> and adapts the 'Bundle-ClassPath' entry in the manifest.mf
> 

I just found one option for the eclipse:eclipse goal:

<pde>true</pde>
http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html#pde

It seems it makes something similar like the studio:eclipse goal.

I'll experiment with it a bit...

Regards,
Stefan

Re: Studio Maven Build

Posted by Felix Knecht <fe...@apache.org>.
HI Stefan
> Hi Felix,
>
> great, many thanks for your efforts :-)
>   

Thanks for testing.

> Felix Knecht schrieb:
>   
>> Long time ago ... but it's time to ask for some help and I hope that somebody can spare some time :-)
>>
>> State:
>>
>> It almost works. I can
>> - Checkout my sandbox
>> - Install the studio plugin
>> - Create project and classpath files
>> - Build dist
>> - Run within eclipse
>>
>> See also http://cwiki.apache.org/confluence/x/CRoB
>>     
>
> Where do I have to execute this?
>   mvn install eclipse:eclipse studio:eclipse -Dmaven.test.skip=true
>
> in the /studio/studio folder (the sibling of /studio/studio-plugin)
> or
> in /studio folder which contains all plugin subfolders
>   

In the /studio folder. The /studio/studio folder contains the
'distribution' stuff. Do you have set the M2_REPO variable in eclipse?

mvn
- 'install' is needed because some plugin projects are referencing
studio-dsml-parser witch doesn't already exists in local mvn repository
on first run.
- 'eclipse:eclipse' creates the .project and .classpath files in the
module folders
- 'studio.eclipse' adapts the .classpath to have entries like
<classpathentry path="lib/commons-io-1.3.1.jar" exported="true"
kind="lib"/> and adapts the 'Bundle-ClassPath' entry in the manifest.mf


>> When I run from eclipse - open plugin.xml file and run 'Launch an Eclipse application in Debug Mode' from Overview tab I
>> get first a popup saying that in different projects errors exists. When proceeding the application launches and I can at
>> least create a connection to an LDAP-server and browse.
>>
>> My problem is now, that I can't find the before mentioned errors. Where can I get them?
>>
>>     
>
> In Eclipse I got a lot of errors in the "Problems view". Most of them are:
> - MANIFEST.MF: Manifest has no main section
> - Missing dependencies
> - Missing source foldes
>   

Which /studio/studio-* can I use to see it?


Regards
Felix
> I'll try to go back to this at the weekend.
>
> Regards,
> Stefan
>
>   


Re: Studio Maven Build

Posted by Stefan Seelmann <se...@apache.org>.
Hi Felix,

great, many thanks for your efforts :-)

Felix Knecht schrieb:
> Long time ago ... but it's time to ask for some help and I hope that somebody can spare some time :-)
> 
> State:
> 
> It almost works. I can
> - Checkout my sandbox
> - Install the studio plugin
> - Create project and classpath files
> - Build dist
> - Run within eclipse
> 
> See also http://cwiki.apache.org/confluence/x/CRoB

Where do I have to execute this?
  mvn install eclipse:eclipse studio:eclipse -Dmaven.test.skip=true

in the /studio/studio folder (the sibling of /studio/studio-plugin)
or
in /studio folder which contains all plugin subfolders

> 
> When I run from eclipse - open plugin.xml file and run 'Launch an Eclipse application in Debug Mode' from Overview tab I
> get first a popup saying that in different projects errors exists. When proceeding the application launches and I can at
> least create a connection to an LDAP-server and browse.
> 
> My problem is now, that I can't find the before mentioned errors. Where can I get them?
> 

In Eclipse I got a lot of errors in the "Problems view". Most of them are:
- MANIFEST.MF: Manifest has no main section
- Missing dependencies
- Missing source foldes

I'll try to go back to this at the weekend.

Regards,
Stefan