Author: lcorneliussen
Date: Thu Apr 26 10:38:08 2012
New Revision: 1330763
URL: http://svn.apache.org/viewvc?rev=1330763&view=rev
Log:
[NPANDAY-556] Importer for Nuget Packages
o missing files
Added:
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/
(with props)
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/
(with props)
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/AssemblyPluginXpp3ReaderTest.groovy
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/
(with props)
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/sample-nuget-imports.xml
incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT006_CustomSource/package-source/NUnit.2.5.10.11092.nupkg
(with props)
incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT007_InstallToCustomLocalRepository/package-source/NUnit.2.6.0.12054.nupkg
(with props)
Propchange:
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/
------------------------------------------------------------------------------
bugtraq:number = true
Propchange:
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/
------------------------------------------------------------------------------
bugtraq:number = true
Added:
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/AssemblyPluginXpp3ReaderTest.groovy
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/AssemblyPluginXpp3ReaderTest.groovy?rev=1330763&view=auto
==============================================================================
---
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/AssemblyPluginXpp3ReaderTest.groovy
(added)
+++
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/groovy/AssemblyPluginXpp3ReaderTest.groovy
Thu Apr 26 10:38:08 2012
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+
+
+
+
+
+import npanday.model.library.imports.io.xpp3.LibraryImportsXpp3Reader
+
+class AssemblyPluginXpp3ReaderTest
+{
+ @org.junit.Test
+ void passes()
+ {
+ def xpp3Reader = new LibraryImportsXpp3Reader();
+ def stream = getClass().getResourceAsStream("/sample-nuget-imports.xml")
+ assert stream != null : "couldn't find sample xml"
+ def xmlStream = new InputStreamReader(stream)
+ def model = xpp3Reader.read(xmlStream)
+
+ assert model != null
+ assert model.nugetImports != null
+ assert model.nugetImports.size() == 1
+ assert model.nugetImports[0] != null
+ assert model.nugetImports[0].packageName == "NUnit"
+ assert model.nugetImports[0].versions != null
+ assert model.nugetImports[0].versions.size() == 2
+ assert model.nugetImports[0].versions[0].source != null
+ assert model.nugetImports[0].versions[0].maven != null
+
+ assert model.nugetImports[0].libraryDirectories.defaultDirectory == "net40"
+
+ assert model.nugetImports[0].referenceMappings.size() == 1
+ assert model.nugetImports[0].referenceMappings[0].name == "AssemblyName"
+ assert model.nugetImports[0].referenceMappings[0].ignore
+
+ assert model.nugetSources != null
+ assert model.nugetSources.addNugetGallery
+ assert model.nugetSources.customSources.size() == 1
+ assert model.nugetSources.customSources[0] == "package-source"
+
+ }
+}
Propchange:
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/
------------------------------------------------------------------------------
bugtraq:number = true
Added:
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/sample-nuget-imports.xml
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/sample-nuget-imports.xml?rev=1330763&view=auto
==============================================================================
---
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/sample-nuget-imports.xml
(added)
+++
incubator/npanday/trunk/components/dotnet-model/dotnet-model-library-import/src/test/resources/sample-nuget-imports.xml
Thu Apr 26 10:38:08 2012
@@ -0,0 +1,39 @@
+<!--
+ ~ 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.
+ -->
+
+<libs xmlns="http://npanday.apache.org/library-import/1.0.0">
+
+ <nugetSources addNugetGallery="true">
+ <custom>package-source</custom>
+ </nugetSources>
+
+ <nuget>
+ <package>NUnit</package>
+ <version source="2.6.0.12054" mapTo="2.6.0"/>
+ <version source="2.5.10.11092" mapTo="2.5.10"/>
+ <libDirs>
+ <default>net40</default>
+ </libDirs>
+
+ <mapReference
+ name="AssemblyName"
+ ignore="true"/>
+
+ </nuget>
+</libs>
Added:
incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT006_CustomSource/package-source/NUnit.2.5.10.11092.nupkg
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT006_CustomSource/package-source/NUnit.2.5.10.11092.nupkg?rev=1330763&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT006_CustomSource/package-source/NUnit.2.5.10.11092.nupkg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added:
incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT007_InstallToCustomLocalRepository/package-source/NUnit.2.6.0.12054.nupkg
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT007_InstallToCustomLocalRepository/package-source/NUnit.2.6.0.12054.nupkg?rev=1330763&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
incubator/npanday/trunk/plugins/library-importer-maven-plugin/src/it/IT007_InstallToCustomLocalRepository/package-source/NUnit.2.6.0.12054.nupkg
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream