Skip to content

Commit

Permalink
Replace srcdeps-maven-plugin with srcdeps core extension (#273)
Browse files Browse the repository at this point in the history
* Upgrade to hawkular-parent 50

* Ignoring target/ is enough to exclude jars, wars, ears and classes

* Introduce mvnw - a way to ensure that devs and CI use the same Maven
version

A part of this chnage was done by running

mvn -N io.takari:maven:wrapper

See also https://github.com/takari/maven-wrapper#maven-wrapper

* Replace srcdeps-maven-plugin with srcdeps core extension
  • Loading branch information
ppalaga authored and jmazzitelli committed Dec 5, 2016
1 parent 8e4821c commit beb0adb
Show file tree
Hide file tree
Showing 10 changed files with 510 additions and 15 deletions.
8 changes: 0 additions & 8 deletions .gitignore
@@ -1,14 +1,6 @@
# Java binary class files
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.ear
*.war

# virtual machine crash logs
hs_err_pid*

Expand Down
35 changes: 35 additions & 0 deletions .mvn/extensions.xml
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
and other contributors as indicated by the @author tags.
Licensed 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.
-->
<!--
Since version 1.0.0, srcdeps is not a Maven plugin but a Maven Core Extension that needs to be declared here
in .mvn/extensions.xml. Note that Core Extensions exist only since Maven 3.3.1.
-->
<extensions>
<extension>
<groupId>org.srcdeps.mvn</groupId>
<artifactId>srcdeps-maven-local-repository</artifactId>
<version>2.1.0</version><!-- @srcdeps.version@ -->
</extension>
<extension>
<groupId>org.srcdeps.mvn</groupId>
<artifactId>srcdeps-maven-enforcer</artifactId>
<version>2.1.0</version><!-- @srcdeps.version@ -->
</extension>
</extensions>
68 changes: 68 additions & 0 deletions .mvn/srcdeps.yaml
@@ -0,0 +1,68 @@
#
# Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# Licensed 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.
#

# `.mvn/srcdeps.yaml` - the srcdeps configuration file
#
# The full srcdeps.yaml reference can be found under https://github.com/srcdeps/srcdeps-core/tree/master/doc/srcdeps.yaml
#
# Note that the options set here can be overriden on the command line,
# see https://github.com/srcdeps/srcdeps-maven/blob/master/README.adoc#override-mvnsrcdepsyaml-options-on-the-command-line


configModelVersion: 1.1

repositories:

org.hawkular:
selectors:
- org.hawkular
urls:
- git:https://github.com/hawkular/hawkular-parent-pom.git
buildArguments:
- -Dcheckstyle.skip=true
- -Dlicense.skip=true
- -Drevapi.skip=true

org.hawkular.alerts:
selectors:
- org.hawkular.alerts
urls:
- git:https://github.com/hawkular/hawkular-alerts.git
buildArguments:
- -Dcheckstyle.skip=true
- -Dlicense.skip=true
- -Drevapi.skip=true

org.hawkular.commons:
selectors:
- org.hawkular.commons
urls:
- git:https://github.com/hawkular/hawkular-commons.git
buildArguments:
- -Dcheckstyle.skip=true
- -Dlicense.skip=true
- -Drevapi.skip=true

org.hawkular.inventory:
selectors:
- org.hawkular.inventory
urls:
- git:https://github.com/hawkular/hawkular-inventory.git
buildArguments:
- -Dcheckstyle.skip=true
- -Dlicense.skip=true
- -Drevapi.skip=true
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,18 @@
#
# Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
# and other contributors as indicated by the @author tags.
#
# Licensed 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.
#

distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -18,11 +18,11 @@ notifications:
- chat.freenode.net#hawkular
on_success: change
install:
- mvn -version -B
- ./mvnw -version -B
# unshallow is needed by license-maven-plugin
- git fetch origin --unshallow
script:
- mvn -s .travis.maven.settings.xml verify -Pitest -Dfailsafe.useFile=false | grep -vF "[INFO] Downloading:" | grep
- ./mvnw -s .travis.maven.settings.xml verify -Pitest -Dfailsafe.useFile=false | grep -vF "[INFO] Downloading:" | grep
-vF "[INFO] Downloaded:"; test ${PIPESTATUS[0]} -eq 0
env:
global:
Expand All @@ -43,8 +43,8 @@ before_cache:
fi

after_success:
- PROJECT_VERSION=`mvn --batch-mode org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
- PROJECT_VERSION=`./mvnw --batch-mode org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -v '\['`
- if [[ "$PROJECT_VERSION" =~ .*SNAPSHOT ]] && [[ "${TRAVIS_BRANCH}" = "master" ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]];
then
mvn -s .travis.maven.settings.xml deploy -DskipTests -Dlicense.skip=true;
./mvnw -s .travis.maven.settings.xml deploy -DskipTests -Dlicense.skip=true;
fi
4 changes: 2 additions & 2 deletions hawkular-wildfly-agent-installer/README.adoc
Expand Up @@ -9,13 +9,13 @@ Hawkular WildFly Agent Installer is a standalone java application to install Haw

Installer is configured via maven exec plugin so it installs Hawkular WildFly Agent from this repository into local WildFly located in `${org.hawkular.wildfly.home}`

mvn exec:java -Dorg.hawkular.wildfly.home=/opt/wildfly-9.0.0.Final
./mvnw exec:java -Dorg.hawkular.wildfly.home=/opt/wildfly-9.0.0.Final

== Running As Standalone Java Application

=== Building Standalone Jar

mvn package
./mvnw package

=== Running

Expand Down

0 comments on commit beb0adb

Please sign in to comment.