regroup read and write steps

This commit is contained in:
Eric Milles 2026-06-23 13:03:06 -05:00
parent fe36d4522a
commit 27584b72bf
Failed to extract signature
5 changed files with 285 additions and 350 deletions

View File

@ -17,232 +17,167 @@
*/
package org.apache.ivy.plugins.parser.m2;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
import org.apache.ivy.core.settings.IvySettings;
import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;
import org.apache.ivy.util.FileUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class PomModuleDescriptorWriterTest {
private static String LICENSE;
static {
public final class PomModuleDescriptorWriterTest {
private ModuleDescriptor readDescriptor(String resourceName) {
try {
LICENSE = FileUtil.readEntirely(new BufferedReader(new InputStreamReader(
PomModuleDescriptorWriterTest.class.getResourceAsStream("license.xml"))));
} catch (IOException e) {
e.printStackTrace();
return ModuleDescriptorParserRegistry.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource(resourceName), false);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private File dest = new File("build/test/test-write.xml");
@Test
public void testSimple() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-simple.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-simple.xml").replaceAll("\r\n", "\n").replace(
'\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testSimpleDependencies() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-simple-dependencies.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testDependenciesWithScope() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-dependencies-with-scope.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testDependenciesWithType() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-type.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-dependencies-with-type.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testDependenciesWithClassifier() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-classifier.pom"),
false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-dependencies-with-classifier.xml").replaceAll(
"\r\n", "\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testOptional() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-optional.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-dependencies-optional.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testTransitive() throws Exception {
ModuleDescriptor md = ModuleDescriptorParserRegistry.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-transitive.xml"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
System.out.println(wrote);
String expected = readEntirely("test-transitive.pom").replaceAll("\r\n", "\n").replace(
'\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testPackaging() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-packaging.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions());
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-packaging.xml").replaceAll("\r\n", "\n")
.replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testWriteCompileConfigurationOnly() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false);
PomModuleDescriptorWriter.write(md, dest,
getWriterOptions().setConfs(new String[] {"compile"}));
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-compile-dependencies.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testWriteRuntimeConfigurationOnly() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false);
PomModuleDescriptorWriter.write(md, dest,
getWriterOptions().setConfs(new String[] {"runtime"}));
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-dependencies-with-scope.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testWriteAllConfiguration() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false);
PomModuleDescriptorWriter.write(md, dest, getWriterOptions().setConfs(new String[] {"*"}));
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-dependencies-with-scope.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
@Test
public void testWriteAllExceptRuntimeConfiguration() throws Exception {
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
new IvySettings(), getClass().getResource("test-dependencies-with-scope.pom"), false);
PomModuleDescriptorWriter.write(md, dest,
getWriterOptions().setConfs(new String[] {"*", "!runtime"}));
assertTrue(dest.exists());
String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
.replaceAll("\r\n", "\n").replace('\r', '\n');
String expected = readEntirely("test-write-compile-dependencies.xml").replaceAll("\r\n",
"\n").replace('\r', '\n');
assertEquals(expected, wrote);
}
private String readEntirely(String resource) throws IOException {
return FileUtil.readEntirely(new BufferedReader(new InputStreamReader(
PomModuleDescriptorWriterTest.class.getResource(resource).openStream())));
}
private PomWriterOptions getWriterOptions() {
return (new PomWriterOptions()).setLicenseHeader(LICENSE).setPrintIvyInfo(false);
}
@Before
public void setUp() {
if (dest.exists()) {
dest.delete();
}
if (!dest.getParentFile().exists()) {
dest.getParentFile().mkdirs();
private String readResourceContents(String resourceName) {
try {
return FileUtil.readEntirely(getClass().getResourceAsStream(resourceName));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@After
public void tearDown() {
if (dest.exists()) {
dest.delete();
private String writeDescriptor(ModuleDescriptor md,
PomWriterOptions options) {
File pom = new File("build/test/test-write.pom");
assertTrue(FileUtil.forceDelete(pom));
if (!pom.getParentFile().exists()) {
pom.getParentFile().mkdirs();
}
try {
String license = readResourceContents("license.xml");
PomModuleDescriptorWriter.write(md, pom, options.setLicenseHeader(license).setPrintIvyInfo(false));
String output = FileUtil.readEntirely(pom);
output = output.replace("\r\n", "\n");
output = output.replace('\r', '\n');
return output;
} catch (Exception e) {
throw new RuntimeException(e);
} finally {
FileUtil.forceDelete(pom);
}
}
//--------------------------------------------------------------------------
@Test
public void testSimple() {
ModuleDescriptor md = readDescriptor("test-simple.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-simple.xml"), actual);
}
@Test
public void testSimpleDependencies() {
ModuleDescriptor md = readDescriptor("test-dependencies.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-simple-dependencies.xml"), actual);
}
@Test
public void testDependenciesWithScope() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual);
}
@Test
public void testDependenciesWithType() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-type.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-dependencies-with-type.xml"), actual);
}
@Test
public void testDependenciesWithClassifier() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-classifier.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-dependencies-with-classifier.xml"), actual);
}
@Test
public void testOptional() {
ModuleDescriptor md = readDescriptor("test-optional.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-dependencies-optional.xml"), actual);
}
@Test
public void testTransitive() {
ModuleDescriptor md = readDescriptor("test-transitive.xml");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-transitive.pom"), actual);
}
@Test
public void testPackaging() {
ModuleDescriptor md = readDescriptor("test-packaging.pom");
String actual = writeDescriptor(md, new PomWriterOptions());
assertEquals(readResourceContents("test-write-packaging.xml"), actual);
}
@Test
public void testWriteCompileConfigurationOnly() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"compile"}));
assertEquals(readResourceContents("test-write-compile-dependencies.xml"), actual);
}
@Test
public void testWriteRuntimeConfigurationOnly() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"runtime"}));
assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual);
}
@Test
public void testWriteAllConfiguration() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"*"}));
assertEquals(readResourceContents("test-write-dependencies-with-scope.xml"), actual);
}
@Test
public void testWriteAllExceptRuntimeConfiguration() {
ModuleDescriptor md = readDescriptor("test-dependencies-with-scope.pom");
String actual = writeDescriptor(md, new PomWriterOptions().setConfs(new String[] {"*", "!runtime"}));
assertEquals(readResourceContents("test-write-compile-dependencies.xml"), actual);
}
}

View File

@ -1,42 +1,42 @@
<?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
https://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>
<groupId>apache</groupId>
<artifactId>test-transitive</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>apache</groupId>
<artifactId>ivy</artifactId>
<version>1.0</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
<?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
https://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>
<groupId>apache</groupId>
<artifactId>test-transitive</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>apache</groupId>
<artifactId>ivy</artifactId>
<version>1.0</version>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>

View File

@ -1,24 +1,24 @@
<!--
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
https://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.
-->
<ivy-module version="1.0">
<info organisation="apache" module="test-transitive" revision="1.0"/>
<dependencies>
<dependency org="apache" name="ivy" rev="1.0" transitive="false" />
</dependencies>
</ivy-module>
<!--
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
https://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.
-->
<ivy-module version="1.0">
<info organisation="apache" module="test-transitive" revision="1.0"/>
<dependencies>
<dependency org="apache" name="ivy" rev="1.0" transitive="false" />
</dependencies>
</ivy-module>

View File

@ -1,38 +1,38 @@
<?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
https://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>
<groupId>org.apache</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<url>http://ant.apache.org/ivy</url>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<classifier>asl</classifier>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
<?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
https://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>
<groupId>org.apache</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<url>http://ant.apache.org/ivy</url>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<classifier>asl</classifier>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

View File

@ -1,38 +1,38 @@
<?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
https://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>
<groupId>org.apache</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<url>http://ant.apache.org/ivy</url>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<type>dll</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
<?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
https://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>
<groupId>org.apache</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<url>http://ant.apache.org/ivy</url>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
<type>dll</type>
<scope>compile</scope>
</dependency>
</dependencies>
</project>