Skip to content
Browse files

[maven-release-plugin] copy for tag karaf-2.1.0

git-svn-id: https://svn.apache.org/repos/asf/karaf/tags/karaf-2.1.0@999387 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
2 parents 1255068 + c2f0d38 commit ea6a4eccb0273d9955413cf2d4a90c0ed9aea6fd @jgoodyear jgoodyear committed Sep 21, 2010
View
11 RELEASE-NOTES
@@ -19,6 +19,17 @@
Apache Karaf 2.1.0
==================
+ Overview
+ --------
+
+ New to this release of Apache Karaf is a JAAS Database Login Module, a way to store
+ passwords in a secured way, a mechanism that allows a karaf application to distinguish
+ between UserPrincipal and RolePrincipal without depending from the Karaf JAAS Module.
+ The shell console has been enhanced to be available in a plain non-OSGi environment and
+ smart tab completion has been improved, along with various commands.
+ We have also resolved a number of outstanding issues, and improved support on OS X and
+ IBM Java based systems. For more detail please see the change log below.
+
Changelog
---------
View
16 archetypes/command/pom.xml
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
View
16 archetypes/command/src/main/resources/META-INF/maven/archetype-metadata.xml
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="org.apache.karaf.archetypes.command"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
View
16 archetypes/command/src/main/resources/archetype-resources/pom.xml
@@ -1,3 +1,19 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
View
16 archetypes/command/src/main/resources/archetype-resources/src/main/java/__command__.java
@@ -1,3 +1,19 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
View
16 ...rc/main/resources/archetype-resources/src/main/resources/OSGI-INF/blueprint/shell-log.xml
@@ -1,3 +1,19 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
View
16 archetypes/command/src/main/resources/archetype-resources/src/test/java/__command__Test.java
@@ -1,3 +1,19 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
View
17 archetypes/command/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,19 @@
-#Mon Jul 19 10:12:55 EEST 2010
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
version=0.1-SNAPSHOT
groupId=archetype.it
artifactId=basic
View
16 archetypes/itests/pom.xml
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
View
103 deployer/war/src/main/java/org/apache/karaf/deployer/war/WarDeploymentListener.java
@@ -18,28 +18,13 @@
package org.apache.karaf.deployer.war;
import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
import java.net.URL;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import java.util.jar.JarInputStream;
import java.util.jar.Manifest;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.apache.felix.fileinstall.ArtifactUrlTransformer;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
/**
* A deployment listener that listens for war deployements.
@@ -48,11 +33,6 @@
private static final String PATH_SEPERATOR = "/";
- private static final Log LOGGER = LogFactory
- .getLog(WarDeploymentListener.class);
-
- private DocumentBuilderFactory dbf;
-
public boolean canHandle(File artifact) {
try {
JarFile jar = new JarFile(artifact);
@@ -80,79 +60,24 @@ public URL transform(URL artifact) throws Exception {
String path = artifact.getPath();
String protocol = artifact.getProtocol();
+ int lastSlash = 0;
// match the last slash to retrieve the name of the archive
- int lastSlash = path.lastIndexOf(PATH_SEPERATOR);
+ if ("jardir".equalsIgnoreCase(protocol)) {
+ // just to make sure this works on all kinds of windows
+ File fileInstance = new File(path);
+ // with a jardir this is system specific
+ lastSlash = fileInstance.getAbsolutePath().lastIndexOf(File.separator);
+ } else {
+ // a standard file is not system specific, this is always a standardized URL path
+ lastSlash = path.lastIndexOf(PATH_SEPERATOR);
+ }
// match the suffix so we get rid of it for displaying
- int suffixPos = path.lastIndexOf(".war");
+ int suffixPos = path.length() - 4; // usually this should be a war but might also be a jar plus the colon makes 4 signs
- // Fall back if there is no display-name set in the web.xml or if the
- // web.xml can't be read.
+ // the display name for a web context is derived from the name of the archive
String displayName = path.substring(lastSlash + 1, suffixPos);
- try {
- // step through the jar to find the web.xml
- JarInputStream jar = new JarInputStream(artifact.openStream());
- JarEntry nextJarEntry = jar.getNextJarEntry();
- boolean found = false;
- while (nextJarEntry != null) {
- if (nextJarEntry.getName().indexOf("web.xml") != -1
- && !nextJarEntry.isDirectory()) {
- Document doc = parse(jar); // found the web.xml
- NodeList nodeList = doc.getDocumentElement()
- .getChildNodes(); // getElementsByTagName("display-name");
- for (int i = 0; i < nodeList.getLength(); i++) {
- Node item = nodeList.item(i);
- String nodeName = item.getNodeName();
- if ("display-name".equalsIgnoreCase(nodeName)) {
- String nodeValue = item.getFirstChild()
- .getNodeValue();
- if (nodeValue != null) {
- displayName = nodeValue;
- }
- found = true;
- jar.close();
- break;
- }
- }
- }
- if (found)
- break;
- else
- nextJarEntry = jar.getNextJarEntry();
- }
- // alter the original URL artifact
- } catch (Exception e) {
- LOGGER.warn("Unable to create Webapp-Context from web.xml", e);
- }
- return new URL("war", null, protocol + ":" + path + "?Webapp-Context="
- + displayName);
- }
-
- private Document parse(InputStream inputStream)
- throws ParserConfigurationException, SAXException, IOException {
- if (dbf == null) {
- dbf = DocumentBuilderFactory.newInstance();
- dbf.setNamespaceAware(true);
- }
-
- DocumentBuilder db = dbf.newDocumentBuilder();
- db.setErrorHandler(new ErrorHandler() {
-
- public void warning(SAXParseException exception)
- throws SAXException {
- // ignore waring
- }
-
- public void fatalError(SAXParseException exception)
- throws SAXException {
- throw exception;
- }
-
- public void error(SAXParseException exception) throws SAXException {
- throw exception;
- }
- });
-
- return db.parse(inputStream);
+
+ return new URL("war", null, protocol + ":" + path + "?Webapp-Context=" + displayName);
}
}
View
2 jaas/jasypt/pom.xml
@@ -87,4 +87,4 @@
</plugins>
</build>
-</project>
+</project>
View
16 shell/commands/src/main/resources/META-INF/services/org/apache/karaf/shell/commands
@@ -1,3 +1,19 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
org.apache.karaf.shell.commands.CatAction
org.apache.karaf.shell.commands.ClearAction
org.apache.karaf.shell.commands.EachAction
View
16 shell/console/src/main/resources/META-INF/services/org/apache/karaf/shell/commands
@@ -1 +1,17 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
org.apache.karaf.shell.console.HelpAction
View
2 util/pom.xml
@@ -42,4 +42,4 @@
<appendedResourcesDirectory>${basedir}/../etc/appended-resources</appendedResourcesDirectory>
</properties>
-</project>
+</project>
View
16 util/src/test/resources/test.properties
@@ -1,3 +1,19 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
#
# test.properties
# Used in the PropertiesTest

0 comments on commit ea6a4ec

Please sign in to comment.
Something went wrong with that request. Please try again.