[jira] (MDEPLOY-173) Enhance the Maven Deploy Plugin to support Flat POM

2013-12-05 Thread Jack Jia (JIRA)

 [ 
https://jira.codehaus.org/browse/MDEPLOY-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jack Jia updated MDEPLOY-173:
-

Description: 
*Problem*
The pom.xml has dual purpose.

1. Building and distributing a jar
2. Used by another project for dependency management.

For #1 build and distribution, pom.xml makes good sense with many sections and 
hierarchies. In this case the main objective is dealing with sources and 
various aspects of build.

For #2, lets say project B needs the jar produced by project A ( #1), the only 
things B needs from A  are,

1. jar files
2. dependencies of this jar file

For #2 use-case, none of the sections or hierarchies of pom.xml make sense, 
except for .sections and GAV.

Unfortunately maven simply copies the same pom.xml used for build to the 
repository for distribution.

This problem gets complicated when there are pom hierarchies and 
 sections

In such cases, to resolve the dependencies of an artifact, maven needs to use 
more than one pom.xml. This results in complex release and patch process and 
potential build time issues.

*Solution*
Enhance the maven deploy plugin to deploy a "flattened" pom that contains only 
GAV and  section.

The  section contains, properly resolved direct dependencies of 
the artifact, which are the same of "pom hierarchy" direct dependencies.

"flattened" pom means it cannot have any parent or any other sections that are 
not necessary while deploying the artifact.

Note that we may need to add removeMetadata method to 
org.apache.maven.artifact.Artifact interface to remove the original pom 
metadata and then add the "flattened" pom metadata. I have created jira issue 
http://jira.codehaus.org/browse/MNG-5544 for this function

*Acceptance Criteria*
1. "mvn deploy" could deploy "flatten" pom onto maven repo and its "flatten" 
pom's dependencies version should be the same as versions of "pom hierachy".
2. "flatten" pom only contains GAV and  section.
3. "flatten" pom only contains original direct dependencies, not including 
transitive dependencies.
4. "flatten" pom won't inherit from any parent pom.


  was:
*Problem*
The pom.xml has dual purpose.

Building and distributing a jar
Used by another project for dependency management.
For #1 build and distribution, pom.xml makes good sense with many sections and 
hierarchies. In this case the main objective is dealing with sources and 
various aspects of build.

For #2, lets say project B needs the jar produced by project A ( #1), the only 
things B needs from A  are,

jar files
dependencies of this jar file
For #2 use-case, none of the sections or hierarchies of pom.xml make sense, 
except for .sections and GAV.

Unfortunately maven simply copies the same pom.xml used for build to the 
repository for distribution.

This problem gets complicated when there are pom hierarchies and 
 sections

In such cases, to resolve the dependencies of an artifact, maven needs to use 
more than one pom.xml. This results in complex release and patch process and 
potential build time issues.

*Solution*
Enhance the maven deploy plugin to deploy a "flattened" pom that contains only 
GAV and  section.

The  section contains, properly resolved direct dependencies of 
the artifact, which are the same of "pom hierarchy" direct dependencies.

"flattened" pom means it cannot have any parent or any other sections that are 
not necessary while deploying the artifact.

Note that we may need to add removeMetadata method to 
org.apache.maven.artifact.Artifact interface to remove the original pom 
metadata and then add the "flattened" pom metadata. I have created jira issue 
http://jira.codehaus.org/browse/MNG-5544 for this function

*Acceptance Criteria*
1. "mvn deploy" could deploy "flatten" pom onto maven repo and its "flatten" 
pom's dependencies version should be the same as versions of "pom hierachy".
2. "flatten" pom only contains GAV and  section.
3. "flatten" pom only contains original direct dependencies, not including 
transitive dependencies.
4. "flatten" pom won't inherit from any parent pom.



> Enhance the Maven Deploy Plugin to support Flat POM
> ---
>
> Key: MDEPLOY-173
> URL: https://jira.codehaus.org/browse/MDEPLOY-173
> Project: Maven Deploy Plugin
>  Issue Type: New Feature
>  Components: deploy:deploy
>Reporter: Jack Jia
>
> *Problem*
> The pom.xml has dual purpose.
> 1. Building and distributing a jar
> 2. Used by another project for dependency management.
> For #1 build and distribution, pom.xml makes good sense with many sections 
> and hierarchies. In this case the main objective is dealing with sources and 
> various aspects of build.
> For #2, lets say project B needs the jar produced by project A ( #1), the 
> only things B needs from A  are,
> 1. jar files
> 2. dependencies of t

[jira] (MRELEASE-859) release:prepare fails to commit before tagging when using git 1.8.5

2013-12-05 Thread Dimitri Koussa (JIRA)
Dimitri Koussa created MRELEASE-859:
---

 Summary: release:prepare fails to commit before tagging when using 
git 1.8.5
 Key: MRELEASE-859
 URL: https://jira.codehaus.org/browse/MRELEASE-859
 Project: Maven Release Plugin
  Issue Type: Bug
  Components: Git, prepare
Affects Versions: 2.4.2, 2.3.2
Reporter: Dimitri Koussa


When we run mvn release:prepare using git 1.8.5 the pom.xml has changes that 
are NOT committed and are not part of the tag.

If we run mvn release:perform a snapshot version is deployed.

This is caused by SCM-738.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (SCM-738) GitStatusConsumer fails to correctly parse git 1.8.5 status output

2013-12-05 Thread Dimitri Koussa (JIRA)
Dimitri Koussa created SCM-738:
--

 Summary: GitStatusConsumer fails to correctly parse git 1.8.5 
status output
 Key: SCM-738
 URL: https://jira.codehaus.org/browse/SCM-738
 Project: Maven SCM
  Issue Type: Bug
  Components: maven-scm-provider-git
Affects Versions: 1.7
Reporter: Dimitri Koussa


GitStatusConsumer has
{code:java}
private static final String MODIFIED_PATTERN = "^#\\s*modified:\\s*(.*)";
{code}

git status output from 1.8.4.3
{noformat}
# On branch master
# Changes not staged for commit:
#   (use "git add ..." to update what will be committed)
#   (use "git checkout -- ..." to discard changes in working directory)
#
#   modified:   fileAbc
#
no changes added to commit (use "git add" and/or "git commit -a")

{noformat}


git status output from 1.8.5
{noformat}
On branch master
Your branch is ahead of 'origin/master' by 7 commits.
  (use "git push" to publish your local commits)

Changes to be committed:
  (use "git reset HEAD ..." to unstage)

new file:   fileAbc
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MCHECKSTYLE-205) NPE in CheckstyleReportGenerator.doFilesSummary:654 version 2.11 regression

2013-12-05 Thread Bob Fields (JIRA)
Bob Fields created MCHECKSTYLE-205:
--

 Summary: NPE in CheckstyleReportGenerator.doFilesSummary:654 
version 2.11 regression
 Key: MCHECKSTYLE-205
 URL: https://jira.codehaus.org/browse/MCHECKSTYLE-205
 Project: Maven Checkstyle Plugin
  Issue Type: Bug
Affects Versions: 2.11, 2.12
 Environment: maven-checkstyle-plugin v2.11 and 2.12-SNAPSHOT (as of 
12/5/13). Windows 7, JDK7.45 64 bit, maven 3.1
Reporter: Bob Fields


This worked in release 2.10, no longer works in 2.11. Running mvn site against 
a large project with a parent pom with many subprojects (though no code in the 
parent project) (andromda v3.5-SNAPSHOT, from sourceforge). Maven output:
[INFO] Generating "Checkstyle" report--- 
maven-checkstyle-plugin:2.12-SNAPSHOT
[INFO] Starting audit...
... About 6000 files ...
Audit done.

[INFO] There are 4777 checkstyle errors.
 And no additional troubleshooting information, even in debug mode ...
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project 
andromda: Execution default-site of goal 
org.apache.maven.plugins:maven-site-plugin:3.3:site failed. 
NullPointerException -> [Help 1]

Caused by: java.lang.NullPointerException
at java.lang.String.compareTo(String.java:1139)
at java.lang.String.compareTo(String.java:108)
at 
java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:290)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:171)
at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
at java.util.Arrays.sort(Arrays.java:472)
at java.util.Collections.sort(Collections.java:155)
at 
org.apache.maven.plugin.checkstyle.CheckstyleReportGenerator.doFilesSummary(CheckstyleReportGenerator.java:654)
at 
org.apache.maven.plugin.checkstyle.CheckstyleReportGenerator.generateReport(CheckstyleReportGenerator.java:134)

I built version 2.12-SNAPSHOT locally, the NPE still exists. Running with 
version 2.10 - no NPE. The code attempts to run Collections.sort on a null key 
in the ArrayList from checkstyle results.getFiles().keySet(). This area of code 
was not modified in any of the previous revisions going into release 2.11. The 
results Collection is populated from DefaultCheckstyleExecutor.executeChecks 
calling sinkListener.addDirectory, but that method code also did not change 
over the last year.

This bug prevents us from using the latest checkstyle version. If the stack 
trace isn't enough to be able to add an extra null value check in 
executeChecks, I could run in debug mode and figure where the difference in 
values from 2.10 and 2.11 comes from, but it may be a little while before I can 
get to that.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MDEPLOY-173) Enhance the Maven Deploy Plugin to support Flat POM

2013-12-05 Thread Robert Scholte (JIRA)

[ 
https://jira.codehaus.org/browse/MDEPLOY-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336859#comment-336859
 ] 

Robert Scholte commented on MDEPLOY-173:


We're calling it the consumer pom, read [this 
thread|http://maven.markmail.org/thread/zrqlgviolxvqdkiz] about the 
impact/discussion.

> Enhance the Maven Deploy Plugin to support Flat POM
> ---
>
> Key: MDEPLOY-173
> URL: https://jira.codehaus.org/browse/MDEPLOY-173
> Project: Maven Deploy Plugin
>  Issue Type: New Feature
>  Components: deploy:deploy
>Reporter: Jack Jia
>
> *Problem*
> The pom.xml has dual purpose.
> Building and distributing a jar
> Used by another project for dependency management.
> For #1 build and distribution, pom.xml makes good sense with many sections 
> and hierarchies. In this case the main objective is dealing with sources and 
> various aspects of build.
> For #2, lets say project B needs the jar produced by project A ( #1), the 
> only things B needs from A  are,
> jar files
> dependencies of this jar file
> For #2 use-case, none of the sections or hierarchies of pom.xml make sense, 
> except for .sections and GAV.
> Unfortunately maven simply copies the same pom.xml used for build to the 
> repository for distribution.
> This problem gets complicated when there are pom hierarchies and 
>  sections
> In such cases, to resolve the dependencies of an artifact, maven needs to use 
> more than one pom.xml. This results in complex release and patch process and 
> potential build time issues.
> *Solution*
> Enhance the maven deploy plugin to deploy a "flattened" pom that contains 
> only GAV and  section.
> The  section contains, properly resolved direct dependencies of 
> the artifact, which are the same of "pom hierarchy" direct dependencies.
> "flattened" pom means it cannot have any parent or any other sections that 
> are not necessary while deploying the artifact.
> Note that we may need to add removeMetadata method to 
> org.apache.maven.artifact.Artifact interface to remove the original pom 
> metadata and then add the "flattened" pom metadata. I have created jira issue 
> http://jira.codehaus.org/browse/MNG-5544 for this function
> *Acceptance Criteria*
> 1. "mvn deploy" could deploy "flatten" pom onto maven repo and its "flatten" 
> pom's dependencies version should be the same as versions of "pom hierachy".
> 2. "flatten" pom only contains GAV and  section.
> 3. "flatten" pom only contains original direct dependencies, not including 
> transitive dependencies.
> 4. "flatten" pom won't inherit from any parent pom.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MNG-5543) NoClassDefFoundError when using executions in maven

2013-12-05 Thread Robert Scholte (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-5543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336856#comment-336856
 ] 

Robert Scholte commented on MNG-5543:
-

Maven3 is faster compared to Maven2, this proofs it ;)

> NoClassDefFoundError when using executions in maven
> ---
>
> Key: MNG-5543
> URL: https://jira.codehaus.org/browse/MNG-5543
> Project: Maven 2 & 3
>  Issue Type: Bug
>  Components: Integration Tests
>Affects Versions: 3.1.1
> Environment: Apache Maven 3.1.1 
> (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 16:22:22+0100)
> Maven home: /opt/apache-maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_45/jre
> Default locale: en_IE, platform encoding: UTF-8
> OS name: "linux", version: "3.11.0-13-generic", arch: "amd64", family: "unix"
>Reporter: John Farrelly
>
> *I've created the smallest maven POM file I can to highlight the problem (see 
> below)*.
> I'm using an email server plugin (for integration testing).  I can launch the 
> plugin no problem:
> {noformat}
> mvn emailserver:run
> [INFO] --- emailserver-maven-plugin:1.1.1:run (default-cli) @ project ---
> [INFO] Starting Greenmail mail server...
> [INFO] Started Greenmail mail server
> [INFO] Waiting for command from client
> {noformat}
> However, I have configured the plugin to run before the `integration-test` 
> lifecycle.  When run this way, I get a `NoClassDefFoundError`:
> {noformat}
> mvn integration-test
> Exception in thread "Thread-1" java.lang.NoClassDefFoundError: 
> com/icegreen/greenmail/util/ServerSetup
> {noformat}
> When I execute maven with `-X` to see what's happening, in both cases it 
> shows the same dependency tree as far as I can see, so I'm at a bit of a loss 
> as to why I'm getting an exception which it's launched through lifecycle 
> phases.  Hopefully someone can help!
> {code:xml}
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
> 4.0.0
> com.mytest
> project
> jar
> 1.0
> Test Project
> 
> 
> 
> com.btmatthews.maven.plugins
> emailserver-maven-plugin
> 
> emailserver
> 10025
> greenmail
> 13000
> false
> 
> 
> 
> run-mail
> 
> run
> 
> pre-integration-test
> 
> true
> 
> 
> 
> stop-mail
> 
> stop
> 
> post-integration-test
> 
> 
> 
> 
> 
> 
> {code}
> {noformat}
> Maven information:
> > mvn -v
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
> 16:22:22+0100)
> Maven home: /opt/apache-maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_45/jre
> Default locale: en_IE, platform encoding: UTF-8
> OS name: "linux", version: "3.11.0-13-generic", arch: "amd64", family: 
> "unix"
> {noformat}
> *NOTE*
> This appears to be a problem on 3.1.1 only.  I downloaded 3.0.5 and it worked 
> as expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MPLUGINTESTING-32) lookupConfiguredMojo prefers mojo config over pom.xml

2013-12-05 Thread Igor Fedorenko (JIRA)

 [ 
https://jira.codehaus.org/browse/MPLUGINTESTING-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Fedorenko closed MPLUGINTESTING-32.


   Resolution: Fixed
Fix Version/s: 3.0.0
 Assignee: Igor Fedorenko

Fixed in master, will restage 3.0.0

https://git-wip-us.apache.org/repos/asf?p=maven-plugin-testing.git;a=commit;h=8e54f4ca5cad2233888a35207167ce4453447eef

> lookupConfiguredMojo prefers mojo config over pom.xml
> -
>
> Key: MPLUGINTESTING-32
> URL: https://jira.codehaus.org/browse/MPLUGINTESTING-32
> Project: Maven Plugin Testing
>  Issue Type: Bug
>  Components: plugin-testing-harness
>Reporter: Igor Fedorenko
>Assignee: Igor Fedorenko
> Fix For: 3.0.0
>
> Attachments: mojo-config-merge.zip
>
>
> AbstractMojoTestCase#lookupConfiguredMojo incorrectly merges plugin parameter 
> configuration defined in mojos with configuration in pom.xml. As a result, 
> pom.xml configuration is ignored in some cases. I've attached a small 
> standalone project to demonstrate the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MNG-5545) NoClassDefFoundError: org/sonatype/aether/resolution/ArtifactResolutionException

2013-12-05 Thread Sascha Vujevic (JIRA)
Sascha Vujevic created MNG-5545:
---

 Summary: NoClassDefFoundError: 
org/sonatype/aether/resolution/ArtifactResolutionException
 Key: MNG-5545
 URL: https://jira.codehaus.org/browse/MNG-5545
 Project: Maven 2 & 3
  Issue Type: Bug
  Components: Dependencies, Plugin API, POM
Affects Versions: 3.1.0
 Environment: Windows XP
Reporter: Sascha Vujevic
 Attachments: build.log, examplemojo.zip, mojocaller.zip

Hello maven-developers,

i hope this is the right tracker.

I am implementing a mojo which uses classes from org.sonatype.aether.
With maven 3.0.x the build succeeds, with maven 3.1.0 it breaks with error 
shown in the log-file.
My question is, why the maven-build uses the org.eclipse.aether (still 
milestone) from the maven-installation (where org.sonatype.aether is not 
included) instead of useing it from the pluging.xml.
The parameter @requiresDependencyResolution runtime seems not to work.

I have attached the log-file and 2 projects, examplemojo is the mojo and 
mojocaller is the caller.

Just install examplemojo and call "mvn call package on" mojocaller.

Thank you for your help.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MPLUGINTESTING-32) lookupConfiguredMojo prefers mojo config over pom.xml

2013-12-05 Thread Igor Fedorenko (JIRA)
Igor Fedorenko created MPLUGINTESTING-32:


 Summary: lookupConfiguredMojo prefers mojo config over pom.xml
 Key: MPLUGINTESTING-32
 URL: https://jira.codehaus.org/browse/MPLUGINTESTING-32
 Project: Maven Plugin Testing
  Issue Type: Bug
  Components: plugin-testing-harness
Reporter: Igor Fedorenko
 Attachments: mojo-config-merge.zip

AbstractMojoTestCase#lookupConfiguredMojo incorrectly merges plugin parameter 
configuration defined in mojos with configuration in pom.xml. As a result, 
pom.xml configuration is ignored in some cases. I've attached a small 
standalone project to demonstrate the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MNG-5543) NoClassDefFoundError when using executions in maven

2013-12-05 Thread John Farrelly (JIRA)

 [ 
https://jira.codehaus.org/browse/MNG-5543?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Farrelly closed MNG-5543.
--

Resolution: Not A Bug

Closed since this does not cause an issue when the integration-test phase is 
long enough for the emailserver to start.

> NoClassDefFoundError when using executions in maven
> ---
>
> Key: MNG-5543
> URL: https://jira.codehaus.org/browse/MNG-5543
> Project: Maven 2 & 3
>  Issue Type: Bug
>  Components: Integration Tests
>Affects Versions: 3.1.1
> Environment: Apache Maven 3.1.1 
> (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 16:22:22+0100)
> Maven home: /opt/apache-maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_45/jre
> Default locale: en_IE, platform encoding: UTF-8
> OS name: "linux", version: "3.11.0-13-generic", arch: "amd64", family: "unix"
>Reporter: John Farrelly
>
> *I've created the smallest maven POM file I can to highlight the problem (see 
> below)*.
> I'm using an email server plugin (for integration testing).  I can launch the 
> plugin no problem:
> {noformat}
> mvn emailserver:run
> [INFO] --- emailserver-maven-plugin:1.1.1:run (default-cli) @ project ---
> [INFO] Starting Greenmail mail server...
> [INFO] Started Greenmail mail server
> [INFO] Waiting for command from client
> {noformat}
> However, I have configured the plugin to run before the `integration-test` 
> lifecycle.  When run this way, I get a `NoClassDefFoundError`:
> {noformat}
> mvn integration-test
> Exception in thread "Thread-1" java.lang.NoClassDefFoundError: 
> com/icegreen/greenmail/util/ServerSetup
> {noformat}
> When I execute maven with `-X` to see what's happening, in both cases it 
> shows the same dependency tree as far as I can see, so I'm at a bit of a loss 
> as to why I'm getting an exception which it's launched through lifecycle 
> phases.  Hopefully someone can help!
> {code:xml}
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
> 4.0.0
> com.mytest
> project
> jar
> 1.0
> Test Project
> 
> 
> 
> com.btmatthews.maven.plugins
> emailserver-maven-plugin
> 
> emailserver
> 10025
> greenmail
> 13000
> false
> 
> 
> 
> run-mail
> 
> run
> 
> pre-integration-test
> 
> true
> 
> 
> 
> stop-mail
> 
> stop
> 
> post-integration-test
> 
> 
> 
> 
> 
> 
> {code}
> {noformat}
> Maven information:
> > mvn -v
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
> 16:22:22+0100)
> Maven home: /opt/apache-maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_45/jre
> Default locale: en_IE, platform encoding: UTF-8
> OS name: "linux", version: "3.11.0-13-generic", arch: "amd64", family: 
> "unix"
> {noformat}
> *NOTE*
> This appears to be a problem on 3.1.1 only.  I downloaded 3.0.5 and it worked 
> as expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MNG-5543) NoClassDefFoundError when using executions in maven

2013-12-05 Thread John Farrelly (JIRA)

[ 
https://jira.codehaus.org/browse/MNG-5543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336823#comment-336823
 ] 

John Farrelly commented on MNG-5543:


It appears that the NoClassDefFoundError only happens if the email server is 
still starting when maven enters the post-integration-test phase - which is why 
I don't get an exception when I have a sleep as the integration-test.  It's 
strange that I don't get this error with maven < 3.1.1, but I wouldn't class 
this as a bug, since in a real-world scenario the integration-test phase should 
be long enough for my emailserver to start.

> NoClassDefFoundError when using executions in maven
> ---
>
> Key: MNG-5543
> URL: https://jira.codehaus.org/browse/MNG-5543
> Project: Maven 2 & 3
>  Issue Type: Bug
>  Components: Integration Tests
>Affects Versions: 3.1.1
> Environment: Apache Maven 3.1.1 
> (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 16:22:22+0100)
> Maven home: /opt/apache-maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_45/jre
> Default locale: en_IE, platform encoding: UTF-8
> OS name: "linux", version: "3.11.0-13-generic", arch: "amd64", family: "unix"
>Reporter: John Farrelly
>
> *I've created the smallest maven POM file I can to highlight the problem (see 
> below)*.
> I'm using an email server plugin (for integration testing).  I can launch the 
> plugin no problem:
> {noformat}
> mvn emailserver:run
> [INFO] --- emailserver-maven-plugin:1.1.1:run (default-cli) @ project ---
> [INFO] Starting Greenmail mail server...
> [INFO] Started Greenmail mail server
> [INFO] Waiting for command from client
> {noformat}
> However, I have configured the plugin to run before the `integration-test` 
> lifecycle.  When run this way, I get a `NoClassDefFoundError`:
> {noformat}
> mvn integration-test
> Exception in thread "Thread-1" java.lang.NoClassDefFoundError: 
> com/icegreen/greenmail/util/ServerSetup
> {noformat}
> When I execute maven with `-X` to see what's happening, in both cases it 
> shows the same dependency tree as far as I can see, so I'm at a bit of a loss 
> as to why I'm getting an exception which it's launched through lifecycle 
> phases.  Hopefully someone can help!
> {code:xml}
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
> http://maven.apache.org/maven-v4_0_0.xsd";>
> 4.0.0
> com.mytest
> project
> jar
> 1.0
> Test Project
> 
> 
> 
> com.btmatthews.maven.plugins
> emailserver-maven-plugin
> 
> emailserver
> 10025
> greenmail
> 13000
> false
> 
> 
> 
> run-mail
> 
> run
> 
> pre-integration-test
> 
> true
> 
> 
> 
> stop-mail
> 
> stop
> 
> post-integration-test
> 
> 
> 
> 
> 
> 
> {code}
> {noformat}
> Maven information:
> > mvn -v
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
> 16:22:22+0100)
> Maven home: /opt/apache-maven
> Java version: 1.7.0_45, vendor: Oracle Corporation
> Java home: /opt/jdk1.7.0_45/jre
> Default locale: en_IE, platform encoding: UTF-8
> OS name: "linux", version: "3.11.0-13-generic", arch: "amd64", family: 
> "unix"
> {noformat}
> *NOTE*
> This appears to be a problem on 3.1.1 only.  I downloaded 3.0.5 and it worked 
> as expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] (MDEPLOY-173) Enhance the Maven Deploy Plugin to support Flat POM

2013-12-05 Thread Jack Jia (JIRA)

 [ 
https://jira.codehaus.org/browse/MDEPLOY-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jack Jia updated MDEPLOY-173:
-

Description: 
*Problem*
The pom.xml has dual purpose.

Building and distributing a jar
Used by another project for dependency management.
For #1 build and distribution, pom.xml makes good sense with many sections and 
hierarchies. In this case the main objective is dealing with sources and 
various aspects of build.

For #2, lets say project B needs the jar produced by project A ( #1), the only 
things B needs from A  are,

jar files
dependencies of this jar file
For #2 use-case, none of the sections or hierarchies of pom.xml make sense, 
except for .sections and GAV.

Unfortunately maven simply copies the same pom.xml used for build to the 
repository for distribution.

This problem gets complicated when there are pom hierarchies and 
 sections

In such cases, to resolve the dependencies of an artifact, maven needs to use 
more than one pom.xml. This results in complex release and patch process and 
potential build time issues.

*Solution*
Enhance the maven deploy plugin to deploy a "flattened" pom that contains only 
GAV and  section.

The  section contains, properly resolved direct dependencies of 
the artifact, which are the same of "pom hierarchy" direct dependencies.

"flattened" pom means it cannot have any parent or any other sections that are 
not necessary while deploying the artifact.

Note that we may need to add removeMetadata method to 
org.apache.maven.artifact.Artifact interface to remove the original pom 
metadata and then add the "flattened" pom metadata. I have created jira issue 
http://jira.codehaus.org/browse/MNG-5544 for this function

*Acceptance Criteria*
1. "mvn deploy" could deploy "flatten" pom onto maven repo and its "flatten" 
pom's dependencies version should be the same as versions of "pom hierachy".
2. "flatten" pom only contains GAV and  section.
3. "flatten" pom only contains original direct dependencies, not including 
transitive dependencies.
4. "flatten" pom won't inherit from any parent pom.


  was:
*Problem*
The pom.xml has dual purpose.

Building and distributing a jar
Used by another project for dependency management.
For #1 build and distribution, pom.xml makes good sense with many sections and 
hierarchies. In this case the main objective is dealing with sources and 
various aspects of build.

For #2, lets say project B needs the jar produced by project A ( #1), the only 
things B needs from A  are,

jar files
dependencies of this jar file
For #2 use-case, none of the sections or hierarchies of pom.xml make sense, 
except for .sections and GAV.

Unfortunately maven simply copies the same pom.xml used for build to the 
repository for distribution.

This problem gets complicated when there are pom hierarchies and 
 sections

In such cases, to resolve the dependencies of an artifact, maven needs to use 
more than one pom.xml. This results in complex release and patch process and 
potential build time issues.

*Solution*
Enhance the maven deploy plugin to deploy a "flattened" pom that contains only 
GAV and  section.

The  section contains, properly resolved direct dependencies of 
the artifact, which are the same of "pom hierarchy" direct dependencies.

"flattened" pom means it cannot have any parent or any other sections that are 
not necessary while deploying the artifact.

Note that we may need to add removeMetadata method to 
org.apache.maven.artifact.Artifact interface to remove the original pom 
metadata and then add the "flattened" pom metadata. I have created jira issue 
http://jira.codehaus.org/browse/MNG-5544 for this function

*Acceptance Criteria*
1. "mvn deploy" could deploy "flatten" pom onto maven repo and its "flatten" 
pom's dependencies version should be same to versions of "pom hierachy".
2. "flatten" pom only contains GAV and  section.
3. "flatten" pom only contains original direct dependencies, not including 
transitive dependencies.
4. "flatten" pom won't inherit from any parent pom.



> Enhance the Maven Deploy Plugin to support Flat POM
> ---
>
> Key: MDEPLOY-173
> URL: https://jira.codehaus.org/browse/MDEPLOY-173
> Project: Maven Deploy Plugin
>  Issue Type: New Feature
>  Components: deploy:deploy
>Reporter: Jack Jia
>
> *Problem*
> The pom.xml has dual purpose.
> Building and distributing a jar
> Used by another project for dependency management.
> For #1 build and distribution, pom.xml makes good sense with many sections 
> and hierarchies. In this case the main objective is dealing with sources and 
> various aspects of build.
> For #2, lets say project B needs the jar produced by project A ( #1), the 
> only things B needs from A  are,
> jar files
> dependencies of this jar file
> For #2 use-case, none of the sections or hierar

[jira] (ARCHETYPE-241) Filtering of directory name same as filenames

2013-12-05 Thread prabal kumar (JIRA)

[ 
https://jira.codehaus.org/browse/ARCHETYPE-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=336821#comment-336821
 ] 

prabal kumar commented on ARCHETYPE-241:


I am facing the same issue. Have you resolved this? Please provide me the 
solution or link. Thanks.

> Filtering of directory name same as filenames
> -
>
> Key: ARCHETYPE-241
> URL: https://jira.codehaus.org/browse/ARCHETYPE-241
> Project: Maven Archetype
>  Issue Type: Improvement
>  Components: Generator
>Affects Versions: 2.0-alpha-4
>Reporter: Roy van Rijn
>Priority: Minor
>
> Currently I have the following setup:
> target\generated-sources\archetype\src\main\resources\archetype-resources:
> - __rootArtifactId__-test1
>- src
>   - main
>  - java
> - __projectName__-test2
>- src
>   - main
>  - java
> - Test-__projectName__.java
>"This is ${projectName}!"
> When I use this archetype with the required property "projectName" set to 
> "myName" it generates:
> - myArtifactId-test1
>- src
>   - main
>  - java
> - __projectName__-test2
>- src
>   - main
>  - java
> - Test-myName.java
>"This is myName!"
> This project builds as expected, but as you can see, the property is changed 
> in all the filenames (thanks to ARCHETYPE-191) and Velocity changes the 
> property in the files, but the directory isn't renamed. I would expect that 
> the directory and module would also accept custom properties besides the 
> usual rootArtifactId?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira