Issue Details (XML | Word | Printable)

Key: STR-2853
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Wendy Smoak
Reporter: Wendy Smoak
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts 1

Configure the CheckStyle plugin to use the struts_checks.xml file

Created: 01/May/06 04:31 AM   Updated: 04/Jul/07 03:25 AM
Component/s: Build
Affects Version/s: Nightly Build
Fix Version/s: 1.3.5

Time Tracking:
Not Specified

Resolution Date: 06/Jul/06 11:13 AM
Labels:


 Description  « Hide
As shown at the bottom of [1], we need to put the struts_checks.xml and LICENSE.CheckStyle files in a jar and use it as an <extension> in the pom.

[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Wendy Smoak made changes - 01/May/06 04:35 AM
Field Original Value New Value
Summary Confiure the CheckStyle plugin to use the struts_checks.xml file Configure the CheckStyle plugin to use the struts_checks.xml file
Description
As shown at the bottom of [1], we need to put the struts_checks.xml and LICENSE.CheckStyle files in a jar and use it as an <extension> in the pom.

[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
As shown at the bottom of [1], we need to put the struts_checks.xml and LICENSE.CheckStyle files in a jar and use it as an <extension> in the pom.

[1] http://maven.apache.org/plugins/maven-checkstyle-plugin/customize.html
Component/s Web Site [ 21245 ]
Component/s Infrastructure [ 21246 ]
Wendy Smoak added a comment - 01/May/06 10:53 AM

One option is to have a top-level 'maven' project for the CheckStyle and other config files, the struts-parent pom, and any Maven plugins we end up writing. (Similar to MyFaces: http://svn.apache.org/repos/asf/myfaces )

Another is to create a jar from action/build, but then the plugin config has to be duplicated in all the modules to avoid a circular dependency.

Other ideas?

James Mitchell added a comment - 01/May/06 11:43 AM
It sounds like the first option would be the best for us. That would allow us to share anything (code, resources, *tests*, licenses, etc) across all of Struts projects (action1, action2, as well as Shale or any other projects in the sandbox or even external).


Wendy Smoak added a comment - 01/May/06 11:31 PM

Some discussion in the webwork chat:
   http://forums.opensymphony.com/thread.jspa?threadID=28830

I'm not sure about sharing code and tests... what I'm thinking of here is maven-specific. So far my plan is to have

struts/maven/trunk
struts/maven/trunk/pom/pom.xml <--- currently in struts/pom, to be moved down.
struts/maven/trunk/build/ <--- Maven project for struts-build.jar, containing the CheckStyle config (and LICENSE.txt, Jalopy config...)

This is also where we'll put the (as yet unwritten) 'test build promotion' plugin.

These are things that must be released separately from, and in advance of, any Action 1 release. (Same for Action 2/Shale if those sub-projects elect to release with Maven 2 and need these or other build config files.)

Unless I hear objections I'll go ahead and try this out in a day or so. If it doesn't work out, we can always remove it.

Repository Revision Date User Message
ASF #399087 Tue May 02 23:44:30 UTC 2006 wsmoak Created a module for Maven-related items such as the struts-parent pom and build config files.
Issue: STR-2853
Files Changed
ADD /struts/maven/branches
ADD /struts/maven/trunk
ADD /struts/maven/tags
ADD /struts/maven

Repository Revision Date User Message
ASF #399091 Tue May 02 23:47:06 UTC 2006 wsmoak Moved the build config files into the maven module.
Issue: STR-2853
Files Changed
ADD /struts/maven/trunk/build (from /struts/action/trunk/build)
DEL /struts/action/trunk/build

Repository Revision Date User Message
ASF #399120 Wed May 03 03:46:50 UTC 2006 wsmoak Add the struts-build jar as an <extension>.
Set the <configLocation> to find the struts_checks.xml file on the classpath.
Issue: STR-2853
Files Changed
MODIFY /struts/action/trunk/pom.xml

Repository Revision Date User Message
ASF #399151 Wed May 03 05:40:40 UTC 2006 wsmoak Remove the build directory (which was moved to struts/maven/trunk/build) from the Struts Action assembly descriptor.
Issue: STR-2853
Files Changed
MODIFY /struts/action/trunk/assembly/src/main/assembly/dist.xml

Wendy Smoak added a comment - 03/May/06 12:43 PM

The struts/action/trunk/build directory has been moved to struts/maven/trunk/build, where it now creates a struts-build-1.0.0-SNAPSHOT.jar containing the config files. A snapshot has been published to cvs.apache.org, so the build should work from a clean checkout.

CheckStyle's regexpHeader property still needs to be set to the org/apache/struts/build/LICENSE.CheckStyle file in the struts-build jar.

Repository Revision Date User Message
ASF #418909 Tue Jul 04 03:50:06 UTC 2006 wsmoak Configure Checkstyle with a URL instead of using the struts-build.jar extension.
STR-2853
Files Changed
MODIFY /struts/struts1/trunk/pom.xml

Wendy Smoak added a comment - 04/Jul/06 10:58 AM
I've changed the struts-parent pom to use a URL instead of finding the Checkstyle config file in struts-build.jar.

IMO, while it's nice to make the build reproducible by having struts-build.jar in the repository, it isn't worth the additional effort required to coordinate a release when anything changes. No objection if someone else would like to release it and change the pom back, though.

Repository Revision Date User Message
ASF #419430 Thu Jul 06 04:12:49 UTC 2006 wsmoak Convert LICENSE.CheckStyle to a single line (replacing newlines with \n) and add it to struts_checks.xml.
Once again, the double quotes around "AS IS" and "LICENSE" were converted to '.' in the regexp.
STR-2853
Files Changed
MODIFY /struts/maven/trunk/build/struts_checks.xml

Wendy Smoak added a comment - 06/Jul/06 11:13 AM
Fixed, with struts1/pom.xml pointing at struts_checks.xml in the svn repo, and the header added as a single line regexp since Checkstyle won't read a headerFile from a URL.

Wendy Smoak made changes - 06/Jul/06 11:13 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 1.3.5 [ 21721 ]
Paul Benedict made changes - 04/Jul/07 03:25 AM
Status Resolved [ 5 ] Closed [ 6 ]
Jeff Turner made changes - 01/Feb/10 01:03 AM
Project Import Mon Feb 01 01:03:21 UTC 2010 [ 1264986201992 ]