[javapackages] Maven requires generator switched to BSD license
by Jaromír Cápík
commit 8ec9b184ccbcd994e1aae3fe0a10eeefe91a128a
Author: Jaromír Cápík <jcapik(a)redhat.com>
Date: Mon Jun 6 17:27:00 2011 +0200
Maven requires generator switched to BSD license
depgenerators/maven.req | 37 ++++++++++++++++++++++++-------------
1 files changed, 24 insertions(+), 13 deletions(-)
---
diff --git a/depgenerators/maven.req b/depgenerators/maven.req
index f5c27a8..0ba7efc 100644
--- a/depgenerators/maven.req
+++ b/depgenerators/maven.req
@@ -1,21 +1,32 @@
#!/usr/bin/python
-
#
-# maven.req - Maven requires generator
-# Copyright (C) 2011 Jaromir Capik <jcapik(a)redhat.com>
+# Copyright (c) 2011, Red Hat, Inc.
+# All rights reserved.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# * Neither the name of the <organization> nor the
+# names of its contributors may be used to endorse or promote products
+# derived from this software without specific prior written permission.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Authors:
+# Jaromir Capik <jcapik(a)redhat.com>
#
# List of scopes considered runtime
12 years, 10 months
[javapackages] Maven requires generator addition
by Jaromír Cápík
commit 491e14d78cae39c418869a19080dd04abf8fb601
Author: Jaromír Cápík <jcapik(a)redhat.com>
Date: Mon Jun 6 17:00:46 2011 +0200
Maven requires generator addition
depgenerators/fileattrs/maven.attr | 1 +
depgenerators/maven.req | 55 ++++++++++++++++++++++++++++++++++++
2 files changed, 56 insertions(+), 0 deletions(-)
---
diff --git a/depgenerators/fileattrs/maven.attr b/depgenerators/fileattrs/maven.attr
index 9964c69..8ee72ab 100644
--- a/depgenerators/fileattrs/maven.attr
+++ b/depgenerators/fileattrs/maven.attr
@@ -1,3 +1,4 @@
%__maven_provides %{_rpmconfigdir}/maven.prov
+#%__maven_requires %{_rpmconfigdir}/maven.req
%__maven_path ^%{_datadir}/maven2/.*\.pom
diff --git a/depgenerators/maven.req b/depgenerators/maven.req
new file mode 100644
index 0000000..f5c27a8
--- /dev/null
+++ b/depgenerators/maven.req
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+#
+# maven.req - Maven requires generator
+# Copyright (C) 2011 Jaromir Capik <jcapik(a)redhat.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# List of scopes considered runtime
+runtime_scopes = [None, "runtime"]
+
+import sys
+import xml.dom.minidom
+
+# Returns a list of direct subtags matching the tagname
+def getTag(tag,tagname):
+ result = []
+ for node in tag.childNodes:
+ if node.nodeType == node.ELEMENT_NODE and node.tagName == tagname:
+ result.append(node)
+ return result
+
+# Returns a text contained in the last subtag matching the tagname
+def getText(tag,tagname):
+ result = None
+ for node in getTag(tag,tagname):
+ for text in node.childNodes:
+ if text.nodeType == node.TEXT_NODE:
+ result = text.data
+ return result
+
+# Main loop (project / dependencies / dependency / ...)
+for pomfile in sys.stdin:
+ dom = xml.dom.minidom.parse(pomfile.rstrip())
+ for project_tag in getTag(dom, "project"):
+ for dependencies_tag in getTag(project_tag, "dependencies"):
+ for dependency_tag in getTag(dependencies_tag, "dependency"):
+ scope = getText(dependency_tag,"scope")
+ if scope in runtime_scopes:
+ groupId = getText(dependency_tag,"groupId")
+ artifactId = getText(dependency_tag,"artifactId")
+ if groupId != None and artifactId != None:
+ print "mvn(%s:%s)" %(groupId, artifactId)
12 years, 10 months
[maven] Add help to mvn-rpmbuild and mvn-local (rhbz#710448)
by Stanislav Ochotnicky
commit 70f23c430611790499d1a599e455c859fc50557a
Author: Stanislav Ochotnicky <sochotnicky(a)redhat.com>
Date: Mon Jun 6 10:34:24 2011 +0200
Add help to mvn-rpmbuild and mvn-local (rhbz#710448)
maven-script-local | 31 +++++++++++++++++++++++++++++++
maven-script-rpmbuild | 20 ++++++++++++++++++++
maven.spec | 5 ++++-
3 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/maven-script-local b/maven-script-local
index 61499df..cd76245 100644
--- a/maven-script-local
+++ b/maven-script-local
@@ -5,6 +5,37 @@ if [ -f /usr/share/java-utils/java-functions ] ; then
set_javacmd
fi
+function help()
+{
+ echo "mvn-local [options] [<goal(s)>] [<phase(s)>]"
+ echo
+ echo "mvn-local is custom Fedora maven used for building maven projects"
+ echo "using mix of jar files provided by system and remote maven repositories."
+ echo "You can modify its behaviour using several environment variables:"
+ echo
+ echo "-Dmaven.repo.local [default:$(pwd)/.m2] - custom location of maven repository"
+ echo "-Dmaven.local.depmap.file - file containing custom dependency mapping between"
+ echo " groupId:artifactId and jar file. File format see:"
+ echo " http://fedoraproject.org/wiki/Java/JPPMavenReadme"
+ echo "-Dmaven.local.debug - if set maven will print additional resolving information"
+ echo " that can be useful for debugging resolver problems"
+}
+
+function process_args()
+{
+while [ $# != 0 ]; do
+ flag="$1"
+ case "$flag" in
+ -h|--help)
+ help
+ ;;
+ esac
+ shift
+done
+}
+
+process_args "$@"
+
export M2_HOME=/usr/share/maven
echo $JAVA_HOME
export JAVA_HOME
diff --git a/maven-script-rpmbuild b/maven-script-rpmbuild
index f9058ad..d44f74a 100644
--- a/maven-script-rpmbuild
+++ b/maven-script-rpmbuild
@@ -11,6 +11,23 @@ function install_metadata()
tar xf /usr/share/maven/repo-metadata.tar.xz -C "$1"
}
+function help()
+{
+ echo "mvn-rpmbuild [options] [<goal(s)>] [<phase(s)>]"
+ echo
+ echo "mvn-rpmbuild is custom Fedora maven used for building maven projects"
+ echo "using only jar files provided by rpms installed on your system. It will"
+ echo "never download artifacts from remote repositories. You can modify its"
+ echo "behaviour using several environment variables:"
+ echo
+ echo "-Dmaven.repo.local [default:$(pwd)/.m2] - custom location of maven repository"
+ echo "-Dmaven.local.depmap.file - file containing custom dependency mapping between"
+ echo " groupId:artifactId and jar file. File format see:"
+ echo " http://fedoraproject.org/wiki/Java/JPPMavenReadme"
+ echo "-Dmaven.local.debug - if set maven will print additional resolving information"
+ echo " that can be useful for debugging resolver problems"
+}
+
# add maven.repo.local if it's not defined already
local_add="-Dmaven.repo.local=$(pwd)/.m2/"
@@ -20,6 +37,9 @@ function process_args()
while [ $# != 0 ]; do
flag="$1"
case "$flag" in
+ -h|--help)
+ help
+ ;;
*) ind=`expr match "$flag" -Dmaven.repo.local=`
if [[ $ind != 0 ]];then
install_metadata "${flag/-Dmaven.repo.local=/}/"
diff --git a/maven.spec b/maven.spec
index e0033a0..4c0c1e0 100644
--- a/maven.spec
+++ b/maven.spec
@@ -1,7 +1,7 @@
Name: maven
Version: 3.0.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Java project management and project comprehension tool
Group: Development/Tools
@@ -308,6 +308,9 @@ cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
%changelog
+* Mon Jun 6 2011 Stanislav Ochotnicky <sochotnicky(a)redhat.com> - 3.0.3-4
+- Add help to mvn-rpmbuild and mvn-local (rhbz#710448)
+
* Tue May 10 2011 Stanislav Ochotnicky <sochotnicky(a)redhat.com> - 3.0.3-3
- Improve and clean up depmap handling for m2/m3 repos
12 years, 10 months
[javapackages] Created tag 0.2
by Stanislav Ochotnicky
The lightweight tag '0.2' was created pointing to:
2ba711f... Add maven and osgi provides generators.
12 years, 10 months
[javapackages] Add maven and osgi provides generators.
by Alexander Kurtakov
commit 2ba711f1b339136bcf42c3dd3a628ab00642dfe3
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Mon Jun 6 08:58:46 2011 +0300
Add maven and osgi provides generators.
depgenerators/fileattrs/maven.attr | 3 +
depgenerators/fileattrs/osgi.attr | 3 +
depgenerators/maven.prov | 63 +++++++++++++++++++++++++++++
depgenerators/osgi.prov | 77 ++++++++++++++++++++++++++++++++++++
4 files changed, 146 insertions(+), 0 deletions(-)
---
diff --git a/depgenerators/fileattrs/maven.attr b/depgenerators/fileattrs/maven.attr
new file mode 100644
index 0000000..9964c69
--- /dev/null
+++ b/depgenerators/fileattrs/maven.attr
@@ -0,0 +1,3 @@
+%__maven_provides %{_rpmconfigdir}/maven.prov
+%__maven_path ^%{_datadir}/maven2/.*\.pom
+
diff --git a/depgenerators/fileattrs/osgi.attr b/depgenerators/fileattrs/osgi.attr
new file mode 100644
index 0000000..78ae38b
--- /dev/null
+++ b/depgenerators/fileattrs/osgi.attr
@@ -0,0 +1,3 @@
+%__osgi_provides %{_rpmconfigdir}/osgi.prov
+%__osgi_path ^.*\.jar
+
diff --git a/depgenerators/maven.prov b/depgenerators/maven.prov
new file mode 100644
index 0000000..d9ea469
--- /dev/null
+++ b/depgenerators/maven.prov
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+
+# Copyright (c) 2011, Red Hat, Inc
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of the <ORGANIZATION> nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Alexander Kurtakov <akurtako(a)redhat.com>
+
+import sys
+import xml.etree.ElementTree as ET
+
+class TagBuilder:
+ mavenns = "{http://maven.apache.org/POM/4.0.0}"
+
+ def __init__ (self, filelist=None):
+ if filelist == None:
+ filelist = sys.stdin
+ paths = map (lambda x: x.rstrip (), filelist.readlines ())
+ for path in paths:
+ self.get_mvn_provide (path)
+
+ def get_mvn_provide (self, path):
+ doc = ET.parse(path)
+ artifactId = doc.getroot().findtext("%sartifactId"%(self.mavenns))
+ if artifactId is None:
+ artifactId = doc.getroot().findtext("artifactId")
+ if artifactId is None:
+ return
+ groupId = doc.getroot().findtext("%sgroupId"%(self.mavenns))
+ if groupId is None:
+ groupId = doc.getroot().findtext("groupId")
+ if groupId is None:
+ groupId = doc.getroot().findtext("%sparent/%sgroupId"%(self.mavenns, self.mavenns))
+ if groupId is None:
+ groupId = doc.getroot().findtext("parent/groupId")
+ if groupId is not None:
+ print "mvn(%s:%s)" %(groupId, artifactId)
+
+if __name__ == "__main__":
+ builder = TagBuilder ()
diff --git a/depgenerators/osgi.prov b/depgenerators/osgi.prov
new file mode 100644
index 0000000..9bb70de
--- /dev/null
+++ b/depgenerators/osgi.prov
@@ -0,0 +1,77 @@
+#!/usr/bin/python
+
+# Copyright (c) 2011, Red Hat, Inc
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without modification,
+# are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+# * Neither the name of the <ORGANIZATION> nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY
+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# Authors: Alexander Kurtakov <akurtako(a)redhat.com>
+
+import sys
+import os.path
+import zipfile
+from zipfile import ZipFile
+
+class OsgiProvideInfo:
+
+ symbolicName = None
+ version = None
+
+ def setSymbolicName(self, content):
+ self.symbolicName = content.split(";")[0].strip()
+
+ def setVersion(self, content):
+ versions = content.split('.')[0:3]
+ self.version = ".".join(versions)
+
+ def printProvide(self):
+ if self.version and self.symbolicName:
+ print "osgi(%s) = %s" %(self.symbolicName, self.version)
+
+class TagBuilder:
+
+ def __init__ (self, filelist=None):
+ if filelist == None:
+ filelist = sys.stdin
+ paths = map (lambda x: x.rstrip (), filelist.readlines ())
+ for path in paths:
+ self.get_osgi_provide (path)
+
+ def get_osgi_provide (self, path):
+ if not os.path.islink(path):
+ if zipfile.is_zipfile(path):
+ jarfile = ZipFile(path)
+ manifest = jarfile.open("META-INF/MANIFEST.MF")
+ provideInfo = OsgiProvideInfo()
+ for line in manifest.readlines():
+ if line.startswith("Bundle-SymbolicName:"):
+ provideInfo.setSymbolicName(line.split(':')[1].strip())
+ if line.startswith("Bundle-Version:"):
+ provideInfo.setVersion(line.split(':')[1].strip())
+ provideInfo.printProvide()
+
+
+if __name__ == "__main__":
+ builder = TagBuilder ()
12 years, 10 months
[maven-install-plugin] Build with maven v3.
by Alexander Kurtakov
commit 83dd83147949770df1526899f3d92dbd30a3e2b0
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Fri Jun 3 17:11:59 2011 +0300
Build with maven v3.
Guidelines fixes.
maven-install-plugin.spec | 38 ++++++++++++--------------------------
1 files changed, 12 insertions(+), 26 deletions(-)
---
diff --git a/maven-install-plugin.spec b/maven-install-plugin.spec
index c455772..9ca679e 100644
--- a/maven-install-plugin.spec
+++ b/maven-install-plugin.spec
@@ -1,6 +1,6 @@
Name: maven-install-plugin
Version: 2.3.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Maven Install Plugin
Group: Development/Libraries
@@ -8,12 +8,11 @@ License: ASL 2.0
URL: http://maven.apache.org/plugins/maven-install-plugin
Source0: http://repo2.maven.org/maven2/org/apache/maven/plugins/%{name}/%{version}...
Patch0: pom.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
-BuildRequires: maven2
+BuildRequires: maven
BuildRequires: maven-plugin-plugin
BuildRequires: maven-jar-plugin
BuildRequires: maven-install-plugin
@@ -30,7 +29,7 @@ BuildRequires: junit
BuildRequires: maven-archiver
BuildRequires: maven-shared-reporting-impl
-Requires: maven2
+Requires: maven
Requires: jpackage-utils
Requires: java
Requires: maven-archiver
@@ -54,28 +53,19 @@ API documentation for %{name}.
%prep
-%setup -q -n %{name}-%{version}
+%setup -q
#Add dependency of wagon-provider-api
%patch0
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-mvn-jpp \
- -e \
- -Dmaven2.jpp.mode=true \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+mvn-rpmbuild \
-Dmaven.test.failure.ignore=true \
install javadoc:javadoc
%install
-rm -rf %{buildroot}
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar
-
-(cd %{buildroot}%{_javadir} && for jar in *-%{version}*; \
- do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done)
+install -m 644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
%add_to_maven_depmap org.apache.maven.plugins maven-install-plugin %{version} JPP maven-install-plugin
@@ -85,10 +75,8 @@ install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
# javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{version}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{version}/
-ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name}
-rm -rf target/site/api*
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
%post
%update_maven_depmap
@@ -96,23 +84,21 @@ rm -rf target/site/api*
%postun
%update_maven_depmap
-%clean
-rm -rf %{buildroot}
-
%files
-%defattr(-,root,root,-)
%doc LICENSE NOTICE
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
%doc LICENSE
-%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%changelog
+* Fri Jun 3 2011 Alexander Kurtakov <akurtako(a)redhat.com> 2.3.1-3
+- Build with maven v3.
+- Guidelines fixes.
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
12 years, 10 months
[maven-compiler-plugin] Do not require maven2.
by Alexander Kurtakov
commit 54d026d5b42388d519aad20d27d9c694bf7689dc
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Fri Jun 3 17:03:41 2011 +0300
Do not require maven2.
Guidelines fixes.
maven-compiler-plugin.spec | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/maven-compiler-plugin.spec b/maven-compiler-plugin.spec
index 864db61..171c58d 100644
--- a/maven-compiler-plugin.spec
+++ b/maven-compiler-plugin.spec
@@ -1,6 +1,6 @@
Name: maven-compiler-plugin
Version: 2.3.2
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Maven Compiler Plugin
Group: Development/Libraries
@@ -20,12 +20,12 @@ BuildRequires: maven-jar-plugin
BuildRequires: maven-install-plugin
BuildRequires: maven-resources-plugin
BuildRequires: maven-javadoc-plugin
-BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-doxia-sitetools
-BuildRequires: maven-shared-plugin-testing-harness
+BuildRequires: maven-plugin-testing-harness
-Requires: maven2
+Requires: maven
Requires: jpackage-utils
Requires: java
Requires(post): jpackage-utils
@@ -50,8 +50,8 @@ API documentation for %{name}.
%setup -q #You may need to update this according to your Source0
%build
-mvn-local -e \
- -Dmaven.test.skip=true \
+mvn-rpmbuild -e \
+ -Dmaven.test.failure.ignore=true \
install javadoc:javadoc
%install
@@ -83,16 +83,18 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%update_maven_depmap
%files
-%defattr(-,root,root,-)
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%changelog
+* Fri Jun 3 2011 Alexander Kurtakov <akurtako(a)redhat.com> 2.3.2-3
+- Do not require maven2.
+- Guidelines fixes.
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 2.3.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
12 years, 10 months
[maven-stage-plugin] Build with maven v3.
by Alexander Kurtakov
commit 019ec210e1dbd59c820d0bfd05c2afc6204bc8b4
Author: Alexander Kurtakov <akurtako(a)redhat.com>
Date: Fri Jun 3 16:36:09 2011 +0300
Build with maven v3.
Adapt to current guidelines.
maven-stage-plugin.spec | 46 +++++++++++++++-------------------------------
1 files changed, 15 insertions(+), 31 deletions(-)
---
diff --git a/maven-stage-plugin.spec b/maven-stage-plugin.spec
index a7be007..733e25c 100644
--- a/maven-stage-plugin.spec
+++ b/maven-stage-plugin.spec
@@ -1,7 +1,7 @@
-%define project_version 1.0-alpha-2
+%global project_version 1.0-alpha-2
Name: maven-stage-plugin
Version: 1.0
-Release: 0.2.alpha2%{?dist}
+Release: 0.3.alpha2%{?dist}
Summary: Plugin to copy artifacts from one repository to another
Group: Development/Libraries
@@ -11,26 +11,24 @@ URL: http://maven.apache.org/plugins/maven-stage-plugin/
# tar jcf maven-stage-plugin-1.0-alpha-2.tar.bz2 maven-stage-plugin-1.0-alpha-2/
Source0: %{name}-%{project_version}.tar.bz2
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
BuildArch: noarch
BuildRequires: java-devel >= 1:1.6.0
BuildRequires: plexus-utils
-BuildRequires: ant-nodeps
-BuildRequires: maven2
+BuildRequires: ant
+BuildRequires: maven
BuildRequires: maven-install-plugin
BuildRequires: maven-compiler-plugin
BuildRequires: maven-plugin-plugin
BuildRequires: maven-resources-plugin
-BuildRequires: maven-surefire-maven-plugin
+BuildRequires: maven-surefire-plugin
BuildRequires: maven-surefire-provider-junit
BuildRequires: maven-plugin-testing-harness
BuildRequires: maven-jar-plugin
BuildRequires: maven-javadoc-plugin
BuildRequires: jpackage-utils
-Requires: ant-nodeps
-Requires: maven2
+Requires: ant
+Requires: maven
Requires: jpackage-utils
Requires: java
Requires(post): jpackage-utils
@@ -57,24 +55,14 @@ API documentation for %{name}.
%setup -q -n %{name}-%{project_version}
%build
-export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
-
-mvn-jpp \
- -e \
- -Dmaven2.jpp.mode=true \
- -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
+mvn-rpmbuild \
-Dmaven.test.failure.ignore=true \
install javadoc:javadoc
%install
-rm -rf %{buildroot}
-
# jars
install -d -m 0755 %{buildroot}%{_javadir}
-install -m 644 target/%{name}-%{project_version}.jar %{buildroot}%{_javadir}/%{name}-%{project_version}.jar
-
-(cd %{buildroot}%{_javadir} && for jar in *-%{project_version}*; \
- do ln -sf ${jar} `echo $jar| sed "s|-%{project_version}||g"`; done)
+install -m 644 target/%{name}-%{project_version}.jar %{buildroot}%{_javadir}/%{name}.jar
%add_to_maven_depmap org.apache.maven.plugins %{name} %{project_version} JPP %{name}
@@ -84,10 +72,8 @@ install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
# javadoc
-install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}-%{project_version}
-cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}-%{project_version}/
-ln -s %{name}-%{project_version} %{buildroot}%{_javadocdir}/%{name}
-rm -rf target/site/api*
+install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}/
%post
%update_maven_depmap
@@ -95,21 +81,19 @@ rm -rf target/site/api*
%postun
%update_maven_depmap
-%clean
-rm -rf %{buildroot}
-
%files
-%defattr(-,root,root,-)
%{_javadir}/*
%{_mavenpomdir}/*
%{_mavendepmapfragdir}/*
%files javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/%{name}-%{project_version}
%{_javadocdir}/%{name}
%changelog
+* Fri Jun 3 2011 Alexander Kurtakov <akurtako(a)redhat.com> 1.0-0.3.alpha2
+- Build with maven v3.
+- Adapt to current guidelines.
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 1.0-0.2.alpha2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
12 years, 10 months