[jira] [Commented] (NPANDAY-386) Switch to Maven 3 and bootstrap NPanday using itself (within the same reactor)

2011-04-01 Thread Lars Corneliussen (JIRA)

[ 
https://issues.apache.org/jira/browse/NPANDAY-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014770#comment-13014770
 ] 

Lars Corneliussen commented on NPANDAY-386:
---

This is much harder than I thought :(

So here is what I found out.

* This has nothing to do with MVN 3. It is even harder in MVN 3.
* Both Maven 2 and 3 suffer from MNG-1911. Bootstrapping a new version with 
itself is not possible in one single command.
* Using project.version is possible, only if the maven-compile-plugin ALREADY 
has been installed to the local repo. But it will then use the latest version 
of the npanday plugins built and installed within the reactor for all 
subsequent projects.

*Solution*
Both Maven 2 and 3 support building a single project and all its dependencies 
within one reactor. Building just the maven-compile-plugin can be done by this 
command line:

{code}mvn install --projects npanday.plugin:maven-compile-plugin 
--also-make{code}

*BUT in MVN 3* this does not work, because MVN 3 tries to resolve extensions 
much earlier than MVN 2 did. In order to bootstrap using MVN 3, you have to 
temporarily remove the 'dotnet'-module, build the compile-plugin using the 
specified command above, reintegrate 'dotnet' and then build alltogether using 
mvn install.

I created two batch files, that should help with this issue. They are checked 
in beside the pom.

Now I think we should only "bootstrap" NPanday, when we need new features to 
build ourselves. On my machine this is the case. I can't manage to build either 
against 1.2.1 or 1.3-incubating - neigher with MVN 2.2.1 nor with MVN 3. The 
errors are many different ones :(

Some of the errors I get:

* MVN 2/3, against 1.3-incubating, .NET 2.0 SDK 64bit Prompt: Unable to cast 
object of type 'NPanday.Plugin.FieldAttribute' to type 
'NPanday.Plugin.FieldAttribute'
  * The MojoGenerator uses 1.3.0.0 of NPanday.Plugin, while NPanday.Adding 
(where it fails) is referencing 1.3.1.0
* MVN 2/3, against 1.3-incubating, VS 2010 Prompt: Unhandled Exception: 
System.BadImageFormatException: Could not load file or assembly 
'NPanday.Plugin.Addin' or one of its dependencies. This assembly is built by a 
runtime newer than the currently loaded runtime and cannot be loaded.
  * this must have to do with 4.0...

*Actually* the first of the two errors might also arise when building 1.3.2 
against 1.3.1... So we might have to look closer into that.

> Switch to Maven 3 and bootstrap NPanday using itself (within the same reactor)
> --
>
> Key: NPANDAY-386
> URL: https://issues.apache.org/jira/browse/NPANDAY-386
> Project: NPanday
>  Issue Type: Improvement
>  Components: Development Setup
>Reporter: Lars Corneliussen
> Fix For: 1.3.1-incubating
>
>
> Suggestion:
> 1) Bootstrapping NPanday with current NPanday. (not possible on MVN 2.2.x)
> 2) Require Maven>= 3 for *building* NPanday>= 1.3.1
> We should still make sure, that NPanday does work with Maven 2.2.x, though.
> Integration tests should run both in Maven 2.2.1 and Maven 3.0.2 or 3.0.3
> *TODO:*
> * -Add a Jira-Issue-
> * -change npanday.stable.version to npanday.bootstrap.version-
> * preconfigure npanday.bootstrap.version with ${project.version}
> * update docs 
> (http://incubator.apache.org/npanday/docs/1.3-incubating/developers/building.html)
> * document how to do the first build (when npanday-settings.xml not yet 
> exists)
> *Helpers on Windows for rapid switching of maven versions:*
> {code:title=mvn3.bat (somewhere on the PATH)}
> set M2=C:\Program Files\Apache\apache-maven-3.0.2\bin
> set M2_HOME=C:\Program Files\Apache\apache-maven-3.0.2
> set PATH=C:\Program Files\Apache\apache-maven-3.0.2\bin;%PATH%
> mvn --version
> {code}
> {code:title=mvn2.bat (somewhere on the PATH)}
> set M2=C:\Program Files\Apache\apache-maven-2.2.1\bin
> set M2_HOME=C:\Program Files\Apache\apache-maven-2.2.1
> set PATH=C:\Program Files\Apache\apache-maven-2.2.1\bin;%PATH%
> mvn --version
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (NPANDAY-386) Switch to Maven 3 and bootstrap NPanday using itself (within the same reactor)

2011-04-01 Thread Lars Corneliussen (JIRA)

[ 
https://issues.apache.org/jira/browse/NPANDAY-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014459#comment-13014459
 ] 

Lars Corneliussen commented on NPANDAY-386:
---

Hi. You are right.

The artifacts have to be in the repo already. Using "mvn install", the 
SNAPSHOTS are deployed to the repo in the right order ... then the most current 
snapshot is resolved as plugins.

So bootstrapping will not work for releasing versions.

> Switch to Maven 3 and bootstrap NPanday using itself (within the same reactor)
> --
>
> Key: NPANDAY-386
> URL: https://issues.apache.org/jira/browse/NPANDAY-386
> Project: NPanday
>  Issue Type: Improvement
>  Components: Development Setup
>Reporter: Lars Corneliussen
> Fix For: 1.3.1-incubating
>
>
> Suggestion:
> 1) Bootstrapping NPanday with current NPanday. (not possible on MVN 2.2.x)
> 2) Require Maven>= 3 for *building* NPanday>= 1.3.1
> We should still make sure, that NPanday does work with Maven 2.2.x, though.
> Integration tests should run both in Maven 2.2.1 and Maven 3.0.2 or 3.0.3
> *TODO:*
> * -Add a Jira-Issue-
> * change npanday.stable.version to npanday.bootstrap.version
> * preconfigure npanday.bootstrap.version with ${project.version}
> * update docs 
> (http://incubator.apache.org/npanday/docs/1.3-incubating/developers/building.html)
> * remove all .NET-PATHes from the PATH environment
> * document how to do the first build (when npanday-settings.xml not yet 
> exists)
> *Helpers on Windows for rapid switching of maven versions:*
> {code:title=mvn3.bat (somewhere on the PATH)}
> set M2=C:\Program Files\Apache\apache-maven-3.0.2\bin
> set M2_HOME=C:\Program Files\Apache\apache-maven-3.0.2
> set PATH=C:\Program Files\Apache\apache-maven-3.0.2\bin;%PATH%
> mvn --version
> {code}
> {code:title=mvn2.bat (somewhere on the PATH)}
> set M2=C:\Program Files\Apache\apache-maven-2.2.1\bin
> set M2_HOME=C:\Program Files\Apache\apache-maven-2.2.1
> set PATH=C:\Program Files\Apache\apache-maven-2.2.1\bin;%PATH%
> mvn --version
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (NPANDAY-386) Switch to Maven 3 and bootstrap NPanday using itself (within the same reactor)

2011-04-01 Thread Brett Porter (JIRA)

[ 
https://issues.apache.org/jira/browse/NPANDAY-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13014447#comment-13014447
 ] 

Brett Porter commented on NPANDAY-386:
--

I'm still having problems with Maven 3 building this, see:
http://jira.codehaus.org/browse/MNG-1911

I'll take a closer look.

> Switch to Maven 3 and bootstrap NPanday using itself (within the same reactor)
> --
>
> Key: NPANDAY-386
> URL: https://issues.apache.org/jira/browse/NPANDAY-386
> Project: NPanday
>  Issue Type: Improvement
>  Components: Development Setup
>Reporter: Lars Corneliussen
> Fix For: 1.3.1-incubating
>
>
> Suggestion:
> 1) Bootstrapping NPanday with current NPanday. (not possible on MVN 2.2.x)
> 2) Require Maven>= 3 for *building* NPanday>= 1.3.1
> We should still make sure, that NPanday does work with Maven 2.2.x, though.
> Integration tests should run both in Maven 2.2.1 and Maven 3.0.2 or 3.0.3
> *TODO:*
> * -Add a Jira-Issue-
> * change npanday.stable.version to npanday.bootstrap.version
> * preconfigure npanday.bootstrap.version with ${project.version}
> * update docs 
> (http://incubator.apache.org/npanday/docs/1.3-incubating/developers/building.html)
> * remove all .NET-PATHes from the PATH environment
> * document how to do the first build (when npanday-settings.xml not yet 
> exists)
> *Helpers on Windows for rapid switching of maven versions:*
> {code:title=mvn3.bat (somewhere on the PATH)}
> set M2=C:\Program Files\Apache\apache-maven-3.0.2\bin
> set M2_HOME=C:\Program Files\Apache\apache-maven-3.0.2
> set PATH=C:\Program Files\Apache\apache-maven-3.0.2\bin;%PATH%
> mvn --version
> {code}
> {code:title=mvn2.bat (somewhere on the PATH)}
> set M2=C:\Program Files\Apache\apache-maven-2.2.1\bin
> set M2_HOME=C:\Program Files\Apache\apache-maven-2.2.1
> set PATH=C:\Program Files\Apache\apache-maven-2.2.1\bin;%PATH%
> mvn --version
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira