Bug 178291

Summary: devel/pmd update and take maintainership
Product: Ports & Packages Reporter: Danilo Egêa Gondolfo <danilogondolfo>
Component: Individual Port(s)Assignee: Antoine Brodin <antoine>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Danilo Egêa Gondolfo 2013-05-02 05:10:00 UTC
devel/pmd update.

Changes:
- Updated from 3.7 to 5.0.4 (almost a new port)
- Take maintainership
- Added DOCS option
- files directory removed

Link to the patch (>100K): https://dl.dropboxusercontent.com/u/23276705/Patches/pmd.txt
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-05-02 05:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bdrewery

bdrewery@ wants this submitter's PRs (via the GNATS Auto Assign Tool)
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2013-05-06 20:13:44 UTC
Responsible Changed
From-To: bdrewery->freebsd-ports-bugs

To pool
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2013-05-26 15:23:46 UTC
Responsible Changed
From-To: freebsd-ports-bugs->antoine

I will have a look at this.
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2013-05-26 21:12:44 UTC
State Changed
From-To: open->feedback

Hello, 

This ports attempts to download things during build. 


=======================<phase: build          >============================ 
===>  Building for pmd-5.0.4 
cd /wrkdirs/usr/ports/devel/pmd/work/pmd-src-5.0.4 && mvn  compile 
[INFO] Scanning for projects... 
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom 

[ERROR] The build could not read 1 project -> [Help 1] 
[ERROR]    
[ERROR]   The project net.sourceforge.pmd:pmd:5.0.4 (/wrkdirs/usr/ports/devel/pmd/work/pmd-src-5.0.4/pom.xml) has 1 error 
[ERROR]     Non-resolvable parent POM: Could not transfer artifact org.sonatype.oss:oss-parent:pom:7 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org and 'parent.relativePath' points at wrong local POM @ line 9, column 13: Unknown host repo.maven.apache.org -> [Help 2] 
[ERROR]  
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR]  
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException 
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException 
*** [do-build] Error code 1 

Stop in /usr/ports/devel/pmd. 


I saw that they distribute pmd-bin-5.0.4.zip which doesn't require compilation and maven,  and only requires installation. 
What do you think?
Comment 5 Antoine Brodin freebsd_committer freebsd_triage 2013-05-26 21:53:24 UTC
Proposed patch using the binaries from pmd project:
http://people.freebsd.org/~antoine/ports/25/pmd.diff
Comment 6 Danilo Egêa Gondolfo 2013-05-26 22:00:31 UTC
Hello, Antoine.

I noticed that the port build fail inside tinderbox/redports but it 
works with a normal "make", as you can see here 
https://dl.dropboxusercontent.com/u/23276705/pmd.txt.

I can change it to use the binary package, no problem. Do you think this 
is really necessary?

Thanks.



On 5/26/13 5:53 PM, Antoine Brodin wrote:
> Proposed patch using the binaries from pmd project:
> http://people.freebsd.org/~antoine/ports/25/pmd.diff
>
Comment 7 Antoine Brodin freebsd_committer freebsd_triage 2013-05-26 22:28:09 UTC
All the things that are downloaded from internet must be downloaded
during the fetch phase and must be checked against a checksum.

If you really want to compile from source,  I think it is possible
using "mvn -Dmaven.repo.local=${SOMETHING} --offline "
archivers/snappy-java uses this technique,  but you have to generate a
tarball of the maven repository.
I am not sure it is worth it,  since pmd provides jar files?
Comment 8 Danilo Egêa Gondolfo 2013-05-27 19:13:26 UTC
Hmmm, ok, I agree.

Do you think the installation of docs is not necessary? Otherwise you 
can commit your patch.

Thanks for your help.
Comment 9 Antoine Brodin freebsd_committer freebsd_triage 2013-05-27 20:07:31 UTC
Using "PORTDOCS=*",  the plist for DOCS is automatically generated
(this prevents having a 300+kB plist)
Comment 10 Danilo Egêa Gondolfo 2013-05-27 20:47:22 UTC
Oops, you are right. I'm sorry.
Comment 11 dfilter service freebsd_committer freebsd_triage 2013-05-28 20:42:06 UTC
Author: antoine
Date: Tue May 28 19:41:51 2013
New Revision: 319325
URL: http://svnweb.freebsd.org/changeset/ports/319325

Log:
  Update pmd to 5.0.4
  Pass maintainership to submitter
  
  PR:		ports/173241
  PR:		ports/177236
  PR:		ports/178291
  Submitted by:	Danilo Egea Gondolfo
  Approved by:	miwi (mentor)

Deleted:
  head/devel/pmd/files/
Modified:
  head/devel/pmd/Makefile
  head/devel/pmd/distinfo
  head/devel/pmd/pkg-plist

Modified: head/devel/pmd/Makefile
==============================================================================
--- head/devel/pmd/Makefile	Tue May 28 19:38:34 2013	(r319324)
+++ head/devel/pmd/Makefile	Tue May 28 19:41:51 2013	(r319325)
@@ -2,53 +2,38 @@
 # $FreeBSD$
 
 PORTNAME=	pmd
-PORTVERSION=	3.7
-PORTREVISION=	2
+PORTVERSION=	5.0.4
 CATEGORIES=	devel java
-MASTER_SITES=	SF/${PORTNAME}/OldFiles
-DISTNAME=	${PORTNAME}-src-${PORTVERSION}
+MASTER_SITES=	SF
+DISTNAME=	${PORTNAME}-bin-${PORTVERSION}
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	danilogondolfo@gmail.com
 COMMENT=	Static analysis tool for Java source code
 
-BUILD_DEPENDS=	${JAVALIBDIR}/junit.jar:${PORTSDIR}/java/junit
+LICENSE=	BSD
 
 USE_ZIP=	yes
 USE_JAVA=	yes
 JAVA_VERSION=	1.6+
-USE_ANT=	yes
-
-MAKE_ARGS=	-cp ${JAVALIBDIR}/junit.jar
-
+NO_BUILD=	yes
 DATADIR=	${JAVASHAREDIR}/${PORTNAME}
+PORTDOCS=	*
 
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE=	DOCS
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-BUILD_WRKSRC=	${WRKSRC}/bin
+post-patch:
+	@${REINPLACE_CMD} -e 's|#!/bin/bash|#!/bin/sh|' \
+		-e 's|LIB_DIR=$$(pwd -P)|LIB_DIR=${DATADIR}|' ${WRKSRC}/bin/run.sh
 
-.if !defined(NOPORTDOCS)
-PORTDOCS=	*
-.endif
+.include <bsd.port.options.mk>
 
 do-install:
-.for script in bgastviewer.sh cpd.sh designer.sh pmd.sh
-	${REINPLACE_CMD} -e "s|%%DATADIR%%|${DATADIR}|" \
-	  -e "s|%%JAVA_VERSION%%|${JAVA_VERSION}|" \
-	  -e "s|%%LOCALBASE%%|${LOCALBASE}|" \
-	  ${INSTALL_WRKSRC}/bin/${script}
-.endfor
-	${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/bgastviewer.sh ${PREFIX}/bin/bgastviewer
-	${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/cpd.sh ${PREFIX}/bin/cpd
-	${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/designer.sh ${PREFIX}/bin/pmd_designer
-	${INSTALL_SCRIPT} ${INSTALL_WRKSRC}/bin/pmd.sh ${PREFIX}/bin/pmd
-	${MKDIR} ${DATADIR}
-	cd ${INSTALL_WRKSRC}/lib \
-	  && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${DATADIR}/ \;
-.if !defined(NOPORTDOCS)
-	cd ${INSTALL_WRKSRC}/docs \
-	  && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/\{} \; \
-	  && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${DOCSDIR}/\{} \;
+	${INSTALL_SCRIPT} ${WRKSRC}/bin/run.sh ${PREFIX}/bin/pmd
+	@${MKDIR} ${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/lib/* ${DATADIR}
+.if ${PORT_OPTIONS:MDOCS}
+	@${MKDIR} ${DOCSDIR}
+	cd ${WRKSRC}/docs && ${COPYTREE_SHARE} . ${DOCSDIR}
 .endif
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/devel/pmd/distinfo
==============================================================================
--- head/devel/pmd/distinfo	Tue May 28 19:38:34 2013	(r319324)
+++ head/devel/pmd/distinfo	Tue May 28 19:41:51 2013	(r319325)
@@ -1,2 +1,2 @@
-SHA256 (pmd-src-3.7.zip) = a35de76cd8049fd91b3c4e2031b7b03f849e03e2facba1e32ea1cb27cacdb5ff
-SIZE (pmd-src-3.7.zip) = 10756798
+SHA256 (pmd-bin-5.0.4.zip) = 7a95be0f5ff208ff1b9d028d70f1db9530403f98d47fb579b6b977d17ac7ef9d
+SIZE (pmd-bin-5.0.4.zip) = 19023399

Modified: head/devel/pmd/pkg-plist
==============================================================================
--- head/devel/pmd/pkg-plist	Tue May 28 19:38:34 2013	(r319324)
+++ head/devel/pmd/pkg-plist	Tue May 28 19:41:51 2013	(r319325)
@@ -1,11 +1,21 @@
-bin/bgastviewer
-bin/cpd
 bin/pmd
-bin/pmd_designer
-%%DATADIR%%/jakarta-oro-2.0.8.jar
-%%DATADIR%%/jaxen-1.1-beta-7.jar
-%%DATADIR%%/pmd-3.7.jar
-%%DATADIR%%/pmd-src-3.7.jar
-%%DATADIR%%/xercesImpl-2.6.2.jar
+%%DATADIR%%/ant-1.8.1.jar
+%%DATADIR%%/ant-launcher-1.8.1.jar
+%%DATADIR%%/ant-testutil-1.7.1.jar
+%%DATADIR%%/asm-3.2.jar
+%%DATADIR%%/commons-io-2.2.jar
+%%DATADIR%%/dom4j-1.6.1.jar
+%%DATADIR%%/javacc-4.1.jar
+%%DATADIR%%/jaxen-1.1.1.jar
+%%DATADIR%%/jcommander-1.27.jar
+%%DATADIR%%/jdom-1.0.jar
+%%DATADIR%%/junit-4.4.jar
+%%DATADIR%%/pmd-5.0.4.jar
+%%DATADIR%%/rhino-1.7R3.jar
+%%DATADIR%%/saxon-9.1.0.8-dom.jar
+%%DATADIR%%/saxon-9.1.0.8.jar
+%%DATADIR%%/xercesImpl-2.9.1.jar
+%%DATADIR%%/xml-apis-1.3.02.jar
 %%DATADIR%%/xmlParserAPIs-2.6.2.jar
+%%DATADIR%%/xom-1.0.jar
 @dirrm %%DATADIR%%
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 12 Antoine Brodin freebsd_committer freebsd_triage 2013-05-28 20:56:35 UTC
State Changed
From-To: feedback->closed

Port updated, thanks!