[jira] Updated: (MRELEASE-596) Enhance DefaultVersionInfo getNextVersion to increment version at specified index

2010-09-14 Thread Prashant Bhate (JIRA)

 [ 
http://jira.codehaus.org/browse/MRELEASE-596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Prashant  Bhate updated MRELEASE-596:
-

Attachment: DefaultVersionInfo.java

Attaching DefaultVersionInfo.java FYA

 Enhance DefaultVersionInfo  getNextVersion to increment version at specified 
 index
 --

 Key: MRELEASE-596
 URL: http://jira.codehaus.org/browse/MRELEASE-596
 Project: Maven 2.x Release Plugin
  Issue Type: New Feature
Reporter: Prashant  Bhate
 Attachments: DefaultVersionInfo.java, DefaultVersionInfoTest.java


 Current DefaultVersionInfo always increment either annotationRevision if 
 available or least version from digits. say if 1.2.3 would be incremented to 
 1.2.4 always.
 I am currently implementing fix for 
 http://jira.codehaus.org/browse/MVERSIONS-124 which requires NextVersion with 
 version incremented at specified index. 
 Hence it would be good to include another method shown below that will 
 increment  annotationRevision  if parameter index is -ve. Otherwise it would 
 roll the digit at specified index and reset rest of the digits 
 {code}
   /**
* Increment version at specified index. While incrementing digits set
* remaining segments to zero.
* 
* @param index
*If -ve increment annotationRevision else increment digits 
 at
*index and reset remaining to 0.
* @return new instance of version info
*/
   public VersionInfo getNextVersion(int index) {
   DefaultVersionInfo version = null;
   if (digits != null) {
   List digits = new ArrayList(this.digits);
   String annotationRevision = this.annotationRevision;
   if (index  0) {
   if (StringUtils.isNumeric(annotationRevision)) {
   annotationRevision = 
 incrementVersionString(annotationRevision);
   }
   } else if (index  digits.size()) {
   int next = index;
   digits.set(next, 
 incrementVersionString((String) digits
   .get(next)));
   for (int i = next + 1; i  digits.size(); i++) {
   digits.set(i, 0);
   }
   }
   version = new DefaultVersionInfo(digits, annotation,
   annotationRevision, buildSpecifier, 
 annotationSeparator,
   annotationRevSeparator, buildSeparator);
   }
   return version;
   }
 {code}
 Request some one to validate this and schedule this for checkin if possible
 Regards,
 Prashant

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (MNG-4803) Include few new helpful methods to ArtifactVersion interface

2010-09-09 Thread Prashant Bhate (JIRA)
Include few new helpful methods to  ArtifactVersion interface
-

 Key: MNG-4803
 URL: http://jira.codehaus.org/browse/MNG-4803
 Project: Maven 2  3
  Issue Type: Improvement
Reporter: Prashant  Bhate



It is Useful to include following helpful methods to interface ArtifactVersion 
and corresponding implementation in DefaultArtifactVersion class

getMajorVersion
getNextMinorVersion

Implementation is easy just do currentVersion+1

It would help towards merging functionality of 
org.apache.maven.shared.release.versions.VersionInfo into this
see 
http://maven.apache.org/maven-release/maven-release-manager/xref/org/apache/maven/shared/release/versions/VersionInfo.html

 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (MRELEASE-596) Enhance DefaultVersionInfo getNextVersion to increment version at specified index

2010-09-09 Thread Prashant Bhate (JIRA)
Enhance DefaultVersionInfo  getNextVersion to increment version at specified 
index
--

 Key: MRELEASE-596
 URL: http://jira.codehaus.org/browse/MRELEASE-596
 Project: Maven 2.x Release Plugin
  Issue Type: New Feature
Reporter: Prashant  Bhate
 Attachments: DefaultVersionInfoTest.java

Current DefaultVersionInfo always increment either annotationRevision if 
available or least version from digits. say if 1.2.3 would be incremented to 
1.2.4 always.

I am currently implementing fix for 
http://jira.codehaus.org/browse/MVERSIONS-124 which requires NextVersion with 
version incremented at specified index. 
Hence it would be good to include another method shown below that will 
increment  annotationRevision  if parameter index is -ve. Otherwise it would 
roll the digit at specified index and reset rest of the digits 

{code}
/**
 * Increment version at specified index. While incrementing digits set
 * remaining segments to zero.
 * 
 * @param index
 *If -ve increment annotationRevision else increment digits 
at
 *index and reset remaining to 0.
 * @return new instance of version info
 */
public VersionInfo getNextVersion(int index) {
DefaultVersionInfo version = null;
if (digits != null) {
List digits = new ArrayList(this.digits);
String annotationRevision = this.annotationRevision;
if (index  0) {
if (StringUtils.isNumeric(annotationRevision)) {
annotationRevision = 
incrementVersionString(annotationRevision);
}
} else if (index  digits.size()) {
int next = index;
digits.set(next, 
incrementVersionString((String) digits
.get(next)));
for (int i = next + 1; i  digits.size(); i++) {
digits.set(i, 0);
}
}
version = new DefaultVersionInfo(digits, annotation,
annotationRevision, buildSpecifier, 
annotationSeparator,
annotationRevSeparator, buildSeparator);
}
return version;
}


{code}

Request some one to validate this and schedule this for checkin if possible

Regards,
Prashant

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (MDEP-280) Include parent hierarchy also in tree generated by dependency:tree

2010-08-17 Thread Prashant Bhate (JIRA)
Include parent hierarchy also in tree generated by dependency:tree 
---

 Key: MDEP-280
 URL: http://jira.codehaus.org/browse/MDEP-280
 Project: Maven 2.x Dependency Plugin
  Issue Type: Improvement
  Components: tree
Reporter: Prashant  Bhate
Assignee: Brian Fox


dependency:tree  at the moment does not include parent dependencies. It would 
be good to include this as well in the generated tree.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MNG-3565) Maven shouldn't error if a module appears twice in the reactor

2010-07-22 Thread Prashant Bhate (JIRA)

[ 
http://jira.codehaus.org/browse/MNG-3565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=229527#action_229527
 ] 

Prashant  Bhate commented on MNG-3565:
--

This command would still throw {{Project 'xxx' is duplicated in the reactor}} 
exception if we try to build reactor project with decoupled module project like
{code}
super_parent # this does not define parent1 and parent2 as modules
  parent1
module1
  parent2
module2
{code}
this would still fail if one tries to build it from super_parent with command 
mvn -r .

so why this issue is closed without any explanation !? 

 Maven shouldn't error if a module appears twice in the reactor
 --

 Key: MNG-3565
 URL: http://jira.codehaus.org/browse/MNG-3565
 Project: Maven 2  3
  Issue Type: Improvement
  Components: Bootstrap  Build
Affects Versions: 2.0.9
Reporter: Ittay Dror
 Attachments: MNG-3565-test-case.zip, multiproject-2.patch, 
 multiproject.patch


 parent
   \-child1
   \-child2
   \-- many more modules...
 parent contains child1 and child2 modules
 child1/pom.xm contains 'module../child2/module'
 now if i cd into child1 and build, child2 is built before it. good. but if i 
 run from the top directory i get: 
  Project '..:child2' is duplicated in the reactor
 Note: the reason not to always run from top is that there are many modules, 
 which are not interrelated, so developer shouldn't wait while another set of 
 modules (maintained by another build)  is built (even if nothing gets done, 
 it still takes time).
 Why not just remove duplicates before sorting?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (MENFORCER-101) Enforcer does not allow to restrict based on SNAPSHOT version as version comparison uses artifact.getVersion() instead of artifact.getBaseVersion()

2010-07-15 Thread Prashant Bhate (JIRA)
Enforcer does not allow to restrict based on SNAPSHOT version as version 
comparison uses artifact.getVersion() instead of artifact.getBaseVersion()
---

 Key: MENFORCER-101
 URL: http://jira.codehaus.org/browse/MENFORCER-101
 Project: Maven 2.x Enforcer Plugin
  Issue Type: Bug
  Components: Standard Rules
Affects Versions: 1.0-beta-1
 Environment: Any
Reporter: Prashant  Bhate



When following restriction is given to banned dependency rule, comparison fails 
as it compare with actual snapshot version in the repository (which includes 
timestamp 1.0-20100715.155142-18 ) instead of base version ( which has 
1.0-SNAPSHOT )

{code:xml}
build
plugins
plugin
artifactIdmaven-enforcer-plugin/artifactId
executions 
execution
  idenforce-snapshot-ver/id
  goals
goalenforce/goal
  /goals
  configuration
rules
  bannedDependencies
searchTransitivetrue/searchTransitive
excludes
  excludeorg.apache.maven.enforcer:enforcer-rules/exclude
/excludes
includes
  
includeorg.apache.maven.enforcer:enforcer-rules:[1.0-beta-2-SNAPSHOT]/include
/includes
  /bannedDependencies
/rules
failtrue/fail
  /configuration
/execution
/executions
/plugin
/plugins
..
..
..
dependencies
dependency
  groupIdorg.apache.maven.enforcer/groupId
  artifactIdenforcer-rules/artifactId
  version1.0-beta-2-SNAPSHOT/version
/dependency
/dependencies

{code}



See code snippet below 

{code:title=BannedDependencies.java|borderStyle=solid}

try
{
 result = AbstractVersionEnforcer.containsVersion( 
VersionRange.createFromVersionSpec( pattern[2] ),
new DefaultArtifactVersion(  artifact.getVersion() ) 
  );
}
catch ( InvalidVersionSpecificationException e )
{
throw new EnforcerRuleException( Invalid Version Range: , e );
}
{code}


 replace  
{code}
 new DefaultArtifactVersion(  artifact.getVersion() ) 
{code}
 with 
{code}
 new DefaultArtifactVersion(  artifact.getBaseVersion() )
{code}

will solve this issue

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Created: (MPIR-199) ProjectInfoReportUtils.java : Avoid using blocking call [ url.openStream() ] while opening stream from an URL

2010-07-15 Thread Prashant Bhate (JIRA)
ProjectInfoReportUtils.java : Avoid using blocking call [ url.openStream() ] 
while opening stream from an URL
-

 Key: MPIR-199
 URL: http://jira.codehaus.org/browse/MPIR-199
 Project: Maven 2.x Project Info Reports Plugin
  Issue Type: Bug
  Components: dependencies
Affects Versions: 2.2, 2.1.2, 2.1.1
 Environment: any, with no internet connectivity [=~ intranet , behind 
proxy etc.. ]
Reporter: Prashant  Bhate



This issue is related to  http://jira.codehaus.org/browse/MPIR-150 


it would be nice if  {{url.openStream();}} 
from
{code:title=ProjectInfoReportUtils.java|borderStyle=solid}
InputStream in =null;

try
{
  in = url.openStream();
{code}

can be replaced with 
{code}
//Define constant TIMEOUT with pre set timeout
 
  InputStream in =null;

  try
  {
   URLConnection conn = url.openConnection();
   conn.setConnectTimeout(TIMEOUT);
   conn.setReadTimeout(TIMEOUT);
   in = conn.getInputStream();
{code}

{{url.openStream();}} is a blocking call that makes caller wait forever and 
eventually timeouts at the end

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MPIR-150) the dependency report ignores mirrors

2010-07-15 Thread Prashant Bhate (JIRA)

[ 
http://jira.codehaus.org/browse/MPIR-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=228754#action_228754
 ] 

Prashant  Bhate commented on MPIR-150:
--

Hi,
Raised http://jira.codehaus.org/browse/MPIR-199 

Cheers,
Prashant Bhate

 the dependency report ignores mirrors
 -

 Key: MPIR-150
 URL: http://jira.codehaus.org/browse/MPIR-150
 Project: Maven 2.x Project Info Reports Plugin
  Issue Type: Bug
  Components: dependencies
Affects Versions: 2.1.1
Reporter: Brian Fox
Assignee: Olivier Lamy
 Fix For: 2.2

 Attachments: MPIR-150.patch


 The dependencies report takes forever and running debug i can see it's 
 hitting the same repos over and over and bypassing my repository manager.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Commented: (MPIR-150) the dependency report ignores mirrors

2010-07-13 Thread Prashant Bhate (JIRA)

[ 
http://jira.codehaus.org/browse/MPIR-150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=228186#action_228186
 ] 

Prashant  Bhate commented on MPIR-150:
--

Thanks a lot for this patch, Now site deployment would be much quicker.

it would be nice if  {{url.openStream();}} 

{code}
InputStream in =null;

try
{
  in = url.openStream();
{code}

can be replaced with 
{code}
//Define constant TIMEOUT with pre set timeout
 
  InputStream in =null;

  try
  {
   URLConnection conn = url.openConnection();
   conn.setConnectTimeout(TIMEOUT);
   conn.setReadTimeout(TIMEOUT);
   in = conn.getInputStream();
{code}

{{url.openStream();}} is a blocking call that makes caller wait forever

 the dependency report ignores mirrors
 -

 Key: MPIR-150
 URL: http://jira.codehaus.org/browse/MPIR-150
 Project: Maven 2.x Project Info Reports Plugin
  Issue Type: Bug
  Components: dependencies
Affects Versions: 2.1.1
Reporter: Brian Fox
Assignee: Olivier Lamy
 Fix For: 2.2

 Attachments: MPIR-150.patch


 The dependencies report takes forever and running debug i can see it's 
 hitting the same repos over and over and bypassing my repository manager.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira