You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by 109s <a....@isys-software.de> on 2008/03/06 10:21:21 UTC

Try to run install before eclipse:eclipse

Hi,

for a multiple project it's necessary to run "mvn install" before "mvn
eclipse:eclipse" because of dependencies. I want that install runs
automatically if a developer runs eclipse:eclipse but i don't know how i can
do that. I searched for hours in the internet but i didn't found a solution
to integrate that into the pom-file. The way to do that with the preGoal-Tag
is not possible in maven2. 
I'm very new with maven.
I hope somebody can help me.

Greetings
Andi
-- 
View this message in context: http://www.nabble.com/Try-to-run-install-before-eclipse%3Aeclipse-tp15869344s177p15869344.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Try to run install before eclipse:eclipse

Posted by ni...@planet.nl.
The problem is, that eclipse:eclipse is the invocation of a goal and instead of maven 1 preGoal and postGoal, maven 2 binds goals to phases and you can't chain goals. You could prescribe the dev'ers to execute "mvn install eclipse:eclipse" instead of "mvn eclipse".

Hth,

Nick S.


-----Original Message-----
From: 109s [mailto:a.gantner@isys-software.de]
Sent: Thu 3/6/2008 10:58
To: users@maven.apache.org
Subject: RE: Try to run install before eclipse:eclipse
 

Poor thing. I don't want to describe every developer what they have to do
after getting the sources from CVS. I thought eclipse:eclipse could be
enough.
Is there maybe a way for example to call ant and call back maven with
install in this situation?

Greets
Andi

Nick Stolwijk-4 wrote:
> 
> Hi,
> 
> This is not possible to configure in your pom file. However, it should be
> possible to adjust the maven Eclipse Plugin to execute the install phase.
> (Just like surefire-reports execute the test phase) For this there should
> be a mojo added to the Maven Eclipse Plugin. This sounds like a nice
> feature request.
> 
> What do others think of this? That you can execute eclipse:eclipse just
> like normal, but also a goal like eclipse:eclipse-install to execute an
> install before eclipse:eclipse is run?
> 
> Hth,
> 
> Nick Stolwijk
> 
> 
> -----Original Message-----
> From: 109s [mailto:a.gantner@isys-software.de]
> Sent: Thu 3/6/2008 10:21
> To: users@maven.apache.org
> Subject: Try to run install before eclipse:eclipse
>  
> 
> Hi,
> 
> for a multiple project it's necessary to run "mvn install" before "mvn
> eclipse:eclipse" because of dependencies. I want that install runs
> automatically if a developer runs eclipse:eclipse but i don't know how i
> can
> do that. I searched for hours in the internet but i didn't found a
> solution
> to integrate that into the pom-file. The way to do that with the
> preGoal-Tag
> is not possible in maven2. 
> I'm very new with maven.
> I hope somebody can help me.
> 
> Greetings
> Andi
> -- 
> View this message in context:
> http://www.nabble.com/Try-to-run-install-before-eclipse%3Aeclipse-tp15869344s177p15869344.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Try-to-run-install-before-eclipse%3Aeclipse-tp15869344s177p15869991.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



RE: Try to run install before eclipse:eclipse

Posted by 109s <a....@isys-software.de>.
Poor thing. I don't want to describe every developer what they have to do
after getting the sources from CVS. I thought eclipse:eclipse could be
enough.
Is there maybe a way for example to call ant and call back maven with
install in this situation?

Greets
Andi

Nick Stolwijk-4 wrote:
> 
> Hi,
> 
> This is not possible to configure in your pom file. However, it should be
> possible to adjust the maven Eclipse Plugin to execute the install phase.
> (Just like surefire-reports execute the test phase) For this there should
> be a mojo added to the Maven Eclipse Plugin. This sounds like a nice
> feature request.
> 
> What do others think of this? That you can execute eclipse:eclipse just
> like normal, but also a goal like eclipse:eclipse-install to execute an
> install before eclipse:eclipse is run?
> 
> Hth,
> 
> Nick Stolwijk
> 
> 
> -----Original Message-----
> From: 109s [mailto:a.gantner@isys-software.de]
> Sent: Thu 3/6/2008 10:21
> To: users@maven.apache.org
> Subject: Try to run install before eclipse:eclipse
>  
> 
> Hi,
> 
> for a multiple project it's necessary to run "mvn install" before "mvn
> eclipse:eclipse" because of dependencies. I want that install runs
> automatically if a developer runs eclipse:eclipse but i don't know how i
> can
> do that. I searched for hours in the internet but i didn't found a
> solution
> to integrate that into the pom-file. The way to do that with the
> preGoal-Tag
> is not possible in maven2. 
> I'm very new with maven.
> I hope somebody can help me.
> 
> Greetings
> Andi
> -- 
> View this message in context:
> http://www.nabble.com/Try-to-run-install-before-eclipse%3Aeclipse-tp15869344s177p15869344.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Try-to-run-install-before-eclipse%3Aeclipse-tp15869344s177p15869991.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Try to run install before eclipse:eclipse

Posted by Martin Höller <ma...@xss.co.at>.
Hi!

On Thursday 06 March 2008 Brian E. Fox wrote:
> This seems related to MNG-2277, which was fixed in 2.0.8. Are you seeing
> this on 2.0.8 or earlier?

Actually it was 2.0.7. I'll try it with 2.0.8 as soon as I can and report 
back if there are still problems.

- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Try to run install before eclipse:eclipse

Posted by Martin Höller <ma...@xss.co.at>.
On Thursday 06 March 2008 Brian E. Fox wrote:
> This seems related to MNG-2277, which was fixed in 2.0.8. Are you seeing
> this on 2.0.8 or earlier?

The reported issue still exists with maven 2.0.9 and maven-eclipse-plugin 
2.5.1, so it's probably different to MNG-2277.

Related issues, a sample project and comments can be found here:
http://jira.codehaus.org/browse/MECLIPSE-380
http://jira.codehaus.org/browse/MNG-2277
http://www.nabble.com/%40requiresDependencyResolution,-multi-project-and-reactor-dependencies---a-bug--to13387970.html#a13388483

regards,
- martin

RE: Try to run install before eclipse:eclipse

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
This seems related to MNG-2277, which was fixed in 2.0.8. Are you seeing this on 2.0.8 or earlier?

-----Original Message-----
From: Martin Höller [mailto:martin@xss.co.at] 
Sent: Thursday, March 06, 2008 5:41 AM
To: Maven Users List
Subject: Re: Try to run install before eclipse:eclipse

On Thursday 06 March 2008 simon.kitching@chello.at wrote:
> Making install run before eclipse:eclipse is a bad idea in some cases.

We would need it only in multi-module projects if some artifacts cannot be found in the repository.

> In particular, when a project doesn't compile it is currently possible 
> to still run eclipse:eclipse. Making install a pre-requisite would 
> block that, which would be really anoying.

Good point! A new developer should not only be able to join the team if the project compiles right now.

> I think what the original poster is saying is that
>   eclipse:eclipse
> is correctly generating all of the eclipse projects, but that eclipse 
> then displays build errors because the jars that the newly created 
> eclipse projects point to don't yet exist.

No, mvn eclipse:eclipse fails in a multi-module project, if the artifacts are not in a (local or remote) repository, even if they could have been built.

See also this thread for some more details:
http://www.nabble.com/maven-eclipse-plugin-with-multi-module-projects-to15222495s177.html

hth,
- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Try to run install before eclipse:eclipse

Posted by Martin Höller <ma...@xss.co.at>.
On Thursday 06 March 2008 simon.kitching@chello.at wrote:
> Making install run before eclipse:eclipse is a bad idea in some cases.

We would need it only in multi-module projects if some artifacts cannot be 
found in the repository.

> In particular, when a project doesn't compile it is currently possible
> to still run eclipse:eclipse. Making install a pre-requisite would block
> that, which would be really anoying.

Good point! A new developer should not only be able to join the team if the 
project compiles right now.

> I think what the original poster is saying is that
>   eclipse:eclipse
> is correctly generating all of the eclipse projects, but that eclipse
> then displays build errors because the jars that the newly created
> eclipse projects point to don't yet exist.

No, mvn eclipse:eclipse fails in a multi-module project, if the artifacts 
are not in a (local or remote) repository, even if they could have been 
built.

See also this thread for some more details:
http://www.nabble.com/maven-eclipse-plugin-with-multi-module-projects-to15222495s177.html

hth,
- martin
-- 
Martin Höller                   | martin.hoeller@xss.co.at
*x Software + Systeme           | http://www.xss.co.at/
Karmarschgasse 51/2/20          | Tel: +43-1-6060114-30
A-1100 Vienna, Austria          | Fax: +43-1-6060114-71

Re: Try to run install before eclipse:eclipse

Posted by Stuart McCulloch <st...@jayway.net>.
On 06/03/2008, simon.kitching@chello.at <si...@chello.at> wrote:
>
> Making install run before eclipse:eclipse is a bad idea in some cases.
> In particular, when a project doesn't compile it is currently possible
> to still run eclipse:eclipse. Making install a pre-requisite would block
> that, which would be really anoying.
>
> I think what the original poster is saying is that
>   eclipse:eclipse
> is correctly generating all of the eclipse projects, but that eclipse
> then displays build errors because the jars that the newly created
> eclipse projects point to don't yet exist. I don't see that as a big
> problem myself. The eclipse projects *do* exist.
>
> And anyway, some very basic user training is all that is needed, to
> ensure that people run
>   mvn install eclipse:eclipse
> rather than
>   mvn eclipse:eclipse
>
> If the users are so dumb that they cannot learn that, then the best
> solution would be to provide an eclipse-setup.bat file for them to click
> on (I assume that category of users run Windows :-)
>
> Perhaps binding eclipse:eclipse to the install phase is also a
> possibility. Then
>   mvn install
> would be all that is needed. It would waste time on every build cycle by
> rewriting bits of the eclipse project def, but it's not a big overhead.


you could always bind it inside a profile, then developers could
use "mvn install -Peclipse" to get IDE files on install (perhaps
they could enable by default in their settings.xml?) while build
machines wouldn't have it enabled - something like...

  <profiles>
    <profile>
      <id>eclipse</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-eclipse-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <id>ide-support</id>
                <phase>install</phase>
                <goals>
                  <goal>eclipse</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

 Note that i haven't tried this; there might be problems I haven't
> thought of..
>
> Regards,
> Simon
>
> nicklist@planet.nl schrieb:
>
> > Hi,
> >
> > This is not possible to configure in your pom file. However, it should
> be possible to adjust the maven Eclipse Plugin to execute the install phase.
> (Just like surefire-reports execute the test phase) For this there should be
> a mojo added to the Maven Eclipse Plugin. This sounds like a nice feature
> request.
> >
> > What do others think of this? That you can execute eclipse:eclipse just
> like normal, but also a goal like eclipse:eclipse-install to execute an
> install before eclipse:eclipse is run?
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> >
> > -----Original Message-----
> > From: 109s [mailto:a.gantner@isys-software.de]
> > Sent: Thu 3/6/2008 10:21
> > To: users@maven.apache.org
> > Subject: Try to run install before eclipse:eclipse
> >
> >
> > Hi,
> >
> > for a multiple project it's necessary to run "mvn install" before "mvn
> > eclipse:eclipse" because of dependencies. I want that install runs
> > automatically if a developer runs eclipse:eclipse but i don't know how i
> can
> > do that. I searched for hours in the internet but i didn't found a
> solution
> > to integrate that into the pom-file. The way to do that with the
> preGoal-Tag
> > is not possible in maven2.
> > I'm very new with maven.
> > I hope somebody can help me.
> >
> > Greetings
> > Andi
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Cheers, Stuart

RE: Try to run install before eclipse:eclipse

Posted by ni...@planet.nl.
You have a good point. Maybe it is better to let  eclipse:eclipse do a resolve dependencies. So you're sure to have all the jar files in the repository?

With regards,

Nick S.


-----Original Message-----
From: simon.kitching@chello.at [mailto:simon.kitching@chello.at]
Sent: Thu 3/6/2008 11:15
To: Maven Users List
Subject: Re: Try to run install before eclipse:eclipse
 
Making install run before eclipse:eclipse is a bad idea in some cases.
In particular, when a project doesn't compile it is currently possible
to still run eclipse:eclipse. Making install a pre-requisite would block
that, which would be really anoying.

I think what the original poster is saying is that
  eclipse:eclipse
is correctly generating all of the eclipse projects, but that eclipse
then displays build errors because the jars that the newly created
eclipse projects point to don't yet exist. I don't see that as a big
problem myself. The eclipse projects *do* exist.

And anyway, some very basic user training is all that is needed, to
ensure that people run
  mvn install eclipse:eclipse
rather than
  mvn eclipse:eclipse

If the users are so dumb that they cannot learn that, then the best
solution would be to provide an eclipse-setup.bat file for them to click
on (I assume that category of users run Windows :-)

Perhaps binding eclipse:eclipse to the install phase is also a
possibility. Then
  mvn install
would be all that is needed. It would waste time on every build cycle by
rewriting bits of the eclipse project def, but it's not a big overhead.
Note that i haven't tried this; there might be problems I haven't
thought of..

Regards,
Simon

nicklist@planet.nl schrieb:
> Hi,
>
> This is not possible to configure in your pom file. However, it should be possible to adjust the maven Eclipse Plugin to execute the install phase. (Just like surefire-reports execute the test phase) For this there should be a mojo added to the Maven Eclipse Plugin. This sounds like a nice feature request.
>
> What do others think of this? That you can execute eclipse:eclipse just like normal, but also a goal like eclipse:eclipse-install to execute an install before eclipse:eclipse is run?
>
> Hth,
>
> Nick Stolwijk
>
>
> -----Original Message-----
> From: 109s [mailto:a.gantner@isys-software.de]
> Sent: Thu 3/6/2008 10:21
> To: users@maven.apache.org
> Subject: Try to run install before eclipse:eclipse
>  
>
> Hi,
>
> for a multiple project it's necessary to run "mvn install" before "mvn
> eclipse:eclipse" because of dependencies. I want that install runs
> automatically if a developer runs eclipse:eclipse but i don't know how i can
> do that. I searched for hours in the internet but i didn't found a solution
> to integrate that into the pom-file. The way to do that with the preGoal-Tag
> is not possible in maven2. 
> I'm very new with maven.
> I hope somebody can help me.
>
> Greetings
> Andi
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



Re: Try to run install before eclipse:eclipse

Posted by "simon.kitching@chello.at" <si...@chello.at>.
Making install run before eclipse:eclipse is a bad idea in some cases.
In particular, when a project doesn't compile it is currently possible
to still run eclipse:eclipse. Making install a pre-requisite would block
that, which would be really anoying.

I think what the original poster is saying is that
  eclipse:eclipse
is correctly generating all of the eclipse projects, but that eclipse
then displays build errors because the jars that the newly created
eclipse projects point to don't yet exist. I don't see that as a big
problem myself. The eclipse projects *do* exist.

And anyway, some very basic user training is all that is needed, to
ensure that people run
  mvn install eclipse:eclipse
rather than
  mvn eclipse:eclipse

If the users are so dumb that they cannot learn that, then the best
solution would be to provide an eclipse-setup.bat file for them to click
on (I assume that category of users run Windows :-)

Perhaps binding eclipse:eclipse to the install phase is also a
possibility. Then
  mvn install
would be all that is needed. It would waste time on every build cycle by
rewriting bits of the eclipse project def, but it's not a big overhead.
Note that i haven't tried this; there might be problems I haven't
thought of..

Regards,
Simon

nicklist@planet.nl schrieb:
> Hi,
>
> This is not possible to configure in your pom file. However, it should be possible to adjust the maven Eclipse Plugin to execute the install phase. (Just like surefire-reports execute the test phase) For this there should be a mojo added to the Maven Eclipse Plugin. This sounds like a nice feature request.
>
> What do others think of this? That you can execute eclipse:eclipse just like normal, but also a goal like eclipse:eclipse-install to execute an install before eclipse:eclipse is run?
>
> Hth,
>
> Nick Stolwijk
>
>
> -----Original Message-----
> From: 109s [mailto:a.gantner@isys-software.de]
> Sent: Thu 3/6/2008 10:21
> To: users@maven.apache.org
> Subject: Try to run install before eclipse:eclipse
>  
>
> Hi,
>
> for a multiple project it's necessary to run "mvn install" before "mvn
> eclipse:eclipse" because of dependencies. I want that install runs
> automatically if a developer runs eclipse:eclipse but i don't know how i can
> do that. I searched for hours in the internet but i didn't found a solution
> to integrate that into the pom-file. The way to do that with the preGoal-Tag
> is not possible in maven2. 
> I'm very new with maven.
> I hope somebody can help me.
>
> Greetings
> Andi
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Try to run install before eclipse:eclipse

Posted by ni...@planet.nl.
Hi,

This is not possible to configure in your pom file. However, it should be possible to adjust the maven Eclipse Plugin to execute the install phase. (Just like surefire-reports execute the test phase) For this there should be a mojo added to the Maven Eclipse Plugin. This sounds like a nice feature request.

What do others think of this? That you can execute eclipse:eclipse just like normal, but also a goal like eclipse:eclipse-install to execute an install before eclipse:eclipse is run?

Hth,

Nick Stolwijk


-----Original Message-----
From: 109s [mailto:a.gantner@isys-software.de]
Sent: Thu 3/6/2008 10:21
To: users@maven.apache.org
Subject: Try to run install before eclipse:eclipse
 

Hi,

for a multiple project it's necessary to run "mvn install" before "mvn
eclipse:eclipse" because of dependencies. I want that install runs
automatically if a developer runs eclipse:eclipse but i don't know how i can
do that. I searched for hours in the internet but i didn't found a solution
to integrate that into the pom-file. The way to do that with the preGoal-Tag
is not possible in maven2. 
I'm very new with maven.
I hope somebody can help me.

Greetings
Andi
-- 
View this message in context: http://www.nabble.com/Try-to-run-install-before-eclipse%3Aeclipse-tp15869344s177p15869344.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org