Opened 14 years ago

Closed 14 years ago

#25656 closed submission (fixed)

New port: maven3

Reported by: lists@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: jberry@…, gk5885@…, ryandesign (Ryan Carsten Schmidt), ldeck, antony.stubbs@…, jendave@…, blair (Blair Zajac)
Port: maven, maven2, maven3

Description

I am attaching the Portfile for maven 3.0-beta-1.

Attachments (4)

Portfile (2.2 KB) - added by lists@… 14 years ago.
maven3 Portfile
Portfile.2 (2.7 KB) - added by ldeck 14 years ago.
clean maven3 port
Portfile.3 (2.7 KB) - added by jendave@… 14 years ago.
Updated for Maven3.0-beta-3
Portfile.4 (2.8 KB) - added by lists@… 14 years ago.
Updated for the Maven 3.0 release.

Download all attachments as: .zip

Change History (18)

Changed 14 years ago by lists@…

Attachment: Portfile added

maven3 Portfile

comment:1 Changed 14 years ago by lists@…

The attached maven3 Portfile is based upon the maven2 Portfile.

comment:2 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jberry@… gk5885@… ryandesign@… added
Port: maven maven2 maven3 added

Since this maven3 portfile is based on the existing maven2 portfile, I would prefer to see a diff from the maven2 portfile, rather than a complete new portfile. When I compare your new portfile with the existing maven2 portfile, I see many changes that do not appear to relate to the task at hand (updating from maven 2 to maven 3). For example, you've changed the modeline from the recommended MacPorts modeline to something else, changed some portfile comments, changed the description, and changed how the build phase is disabled. I would like the maven, maven2 and maven3 portfiles to be as similar as possible. I also think the whitespace style of the existing maven and maven2 portfiles is an atrocious mix of spaces and tabs. I would like to begin by fixing the whitespace of the maven and maven2 portfiles to use spaces only and to have consistent indentation, then to resolve any remaining extraneous differences between those ports, then perhaps make other changes to those ports that you're implying in the maven3 portfile you attached here, then we can think about making a maven3 port based on the cleaned-up maven2 port.

comment:3 Changed 14 years ago by lists@…

I can contact gk5885 at kickstyle.net and jberry at macports.org about cleaning up the maven* portfiles using your comments on the sbt clean-up. I copied the modeline from the docs <http://guide.macports.org/#development.creating-portfile>. Should the docs be updated?

Changed 14 years ago by ldeck

Attachment: Portfile.2 added

clean maven3 port

comment:4 Changed 14 years ago by ldeck

Hi Ryan, I've added a clean version of maven3 portfile. It is formatted as you've (well) suggested and also uses pre/post destroot operations as it should. The maven2 port was fixing permissions on files that only existed in maven1 -- so that's been fixed.

As far as providing an upgrade diff for the existing maven2 portfile I don't think that's a good thing(tm) to do. Various portfiles exist (e.g., for various versions of mysql or postgres) that target a specific major release version of the target port and that is a good thing to continue with here as maven3 is a major upgrade from maven2.

Besides which, maven3 is in beta and as such people will want to have both installed (as it is required by some other tools).

As such the attached portfile targets bin/mvn3 rather than overwriting bin/mvn as the previously attached port was (wrongly) doing. i.e., if it's a new port it shouldn't interfere with existing port executables.

I'm happy to watch for updates to maven3 and provide updated diffs as they are released.

comment:5 Changed 14 years ago by ldeck

Cc: lachlan.deck@… added

Cc Me!

comment:6 Changed 14 years ago by antony.stubbs@…

Cc: antony.stubbs@… added

Cc Me!

Changed 14 years ago by jendave@…

Attachment: Portfile.3 added

Updated for Maven3.0-beta-3

comment:7 Changed 14 years ago by jendave@…

Cc: jendave@… added

Cc Me!

Changed 14 years ago by lists@…

Attachment: Portfile.4 added

Updated for the Maven 3.0 release.

comment:8 Changed 14 years ago by lists@…

I modified Lachlan's file to use the final Maven 3.0 release. I added extra file permission fixes and chose to symlink the mvn into the bin directory to follow the precedent of the maven1 and maven2 ports.

Based upon the changes, I substituted my ID in place of Lachlan's only differentiate to file's origin. If Lachlan prefers, he can be the maintainer.

Hopefully, this file addresses Ryan's concerns.

comment:9 Changed 14 years ago by ldeck

No worries Jon! It was yours to begin with :-) I'm more than happy you've updated it. It's been a while since I looked at it as we never heard back from Ryan.

Without further feedback and communication from Ryan it seems things will lag on this port (perhaps for some time to come?) which is a shame. Faster turn arounds would be preferable.

comment:10 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: blair@… added

Blair added a maven3 port in r72281. I don't know if he was aware of this ticket or if his version includes everything proposed here. Blair, can you comment?

comment:11 Changed 14 years ago by blair (Blair Zajac)

I wasn't aware of this ticket and it's attached Portfiles.

If people want to submit diffs against the newly updated maven2 and maven3 ports, I'll commit them.

comment:12 in reply to:  11 Changed 14 years ago by lists@…

Replying to blair@…:

I wasn't aware of this ticket and it's attached Portfiles.

If people want to submit diffs against the newly updated maven2 and maven3 ports, I'll commit them.

Blair,

The critical patch would be fixing the permissions. Unfortunately, the archive was created with the JAR files having the SUID bit enabled and writeable by all.

pre-destroot {
    # Remove the extraneous Windows bat files.
    foreach f [glob -directory ${worksrcpath}/bin *.bat] {
       file delete $f
    }

    # Reduce the permissions on the distribution files.
    file attributes ${worksrcpath}/conf -permissions 0755
    file attributes ${worksrcpath}/conf/settings.xml -permissions 0644

    # Reduce the permissions on the JAR files.
    foreach f [glob -directory ${worksrcpath}/boot *.jar] {
        file attributes $f -permissions 0644
    }
    foreach f [glob -directory ${worksrcpath}/lib *.jar] {
        file attributes $f -permissions 0644
    }
}

comment:13 Changed 14 years ago by blair (Blair Zajac)

I fixed the permission issues in r72308 and r72310.

One thing to consider is using a "select" module like python_select to select between maven versions for the ${prefix}/bin/mvn symlink.

This may not be necessary though after a while if maven3 shows itself to be backwards compatibile with maven2.

Let me know your thoughts.

comment:14 Changed 14 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: newclosed

This submission is definitely fixed, and there are now other tickets for the other issues raised.

Note: See TracTickets for help on using tickets.