Ate, you are right, I know that :). Just to clarify, although I am sure all of us know this. It's not about good or bad, it's about convention over configuration and making things simple. META-INF is absolutely necessary, we all know that. By convention, we'd put it in src/main/resources/META-INF and maven plugins know what to do with. If we have config like persitence.xml it would go there. All is fine. What maven does is to generate everything in ./target, and in that process META-INF gets copied into ./target/classes/META-INF.

What I was talking about is a few places where META-INF gets created into ./src somewhere, and it's not a versioned resource, so it should be generated directly in ./target (instead in ./src and then copied to ./target). I don't know yet if that was done by mvn or by my eclipse environment. Technically, nothing should be generated in ./src by the build process, but then again, it's just a convention. If we add support for OSGi this would become a moot point, the OSGi manifest would contain a bit more entries. For those less familiar with OSGi, a bundle is actually a jar with a few extra entries in the MANIFEST.MF, which are ignored in a servlet container.

The way I discovered this was by rat:check reporting unknown license for the generated MANIFEST.MF, rat assumes the convention above. There is another workaround, of course, excluding the MANIFEST in the rat configuration.

But it's really not a biggie. I'll give more details once I discover where that happens.

Cheers,
Hadrian


On 10/20/2011 06:02 AM, Ate Douma wrote:
On 10/20/2011 03:05 AM, Hadrian Zbarcea wrote:

I finally had a bit more time and looked over a few things in rave
and it looks mostly good. I ran a rat:check and fixed the only place
where a license header was missed. There are a few places where a
META-INF directory is created in src (and it shouldn't) and the
MANIFEST.MF fails and one pem test file.

I intend to look while the META-INF is created in src and fix that and
add a configuration for the rat plugin in the main pom to exclude the
.pem extension. Any ideas, objections?

No objections for you to look into it.

But I don't see how or why META-INF entries within the src tree by
definition would be bad.
AFAIK there are some explicit requirements to do so, like providing the
OpenJPA persistence.xml which expects it under META-INF.
And lots of frameworks make use of this for similar purposes and its
also 'spec' based like for Java Service Providers (under
META-INF/services/)


Hadrian



On 10/19/2011 08:02 PM, [email protected] wrote:
Author: hadrian
Date: Thu Oct 20 00:02:15 2011
New Revision: 1186573

URL: http://svn.apache.org/viewvc?rev=1186573&view=rev
Log:
Add missing license header

Modified:
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/error.jsp



Modified:
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/error.jsp


URL:
http://svn.apache.org/viewvc/incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/error.jsp?rev=1186573&r1=1186572&r2=1186573&view=diff


==============================================================================

---
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/error.jsp

(original)
+++
incubator/rave/trunk/rave-portal-resources/src/main/webapp/WEB-INF/views/error.jsp

Thu Oct 20 00:02:15 2011
@@ -1,3 +1,21 @@
+<%--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ --%>
<%@ page isErrorPage="true" trimDirectiveWhitespaces="true"
pageEncoding="UTF-8" contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"; %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"; %>
@@ -33,4 +51,4 @@
</button>
</div>
</div>
-</rave:rave_generic_page>
\ No newline at end of file
+</rave:rave_generic_page>



Reply via email to