Skip to content

Commit

Permalink
Socomo patch 2.0.2 - downgrade maven to reach broader audience.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdela committed Mar 12, 2019
1 parent 46ec7b4 commit 32254a0
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 21 deletions.
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar
26 changes: 23 additions & 3 deletions mvnw
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
fi
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
if [ -n "$MVNW_REPOURL" ]; then
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
else
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
fi
while IFS="=" read key value; do
case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
esac
Expand All @@ -220,22 +224,38 @@ else
echo "Downloading from: $jarUrl"
fi
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
if $cygwin; then
wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
fi

if command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
wget "$jarUrl" -O "$wrapperJarPath"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
wget "$jarUrl" -O "$wrapperJarPath"
else
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
fi
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
curl -o "$wrapperJarPath" "$jarUrl"
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
curl -o "$wrapperJarPath" "$jarUrl" -f
else
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
fi

else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
javaClass=`cygpath --path --windows "$javaClass"`
fi
if [ -e "$javaClass" ]; then
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
if [ "$MVNW_VERBOSE" = true ]; then
Expand Down
19 changes: 15 additions & 4 deletions mvnw.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,30 @@ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"

FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)

@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
echo Found %WRAPPER_JAR%
) else (
if not "%MVNW_REPOURL%" == "" (
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.3/maven-wrapper-0.5.3.jar"
)
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"

powershell -Command "&{"^
"$webclient = new-object System.Net.WebClient;"^
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
"}"^
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
"}"
echo Finished downloading %WRAPPER_JAR%
)
@REM End of extension
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>pl.gdela</groupId>
<artifactId>socomo-parent</artifactId>
<packaging>pom</packaging>
<version>2.1-SNAPSHOT</version>
<version>2.0.2</version>

<name>SoCoMo</name>
<description>
Expand Down
2 changes: 1 addition & 1 deletion socomo-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>pl.gdela</groupId>
<artifactId>socomo-parent</artifactId>
<version>2.1-SNAPSHOT</version>
<version>2.0.2</version>
</parent>
<artifactId>socomo-core</artifactId>
<packaging>jar</packaging>
Expand Down
6 changes: 2 additions & 4 deletions socomo-core/socomo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/cytoscape.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/klay.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/cytoscape-klay.min.js'></script>
<script src='target\classes\pl\gdela\socomo\visualizer\diagram-skin.js'></script>
<script src='target\classes\pl\gdela\socomo\visualizer\diagram.js'></script>
<link href='target\classes\pl\gdela\socomo\visualizer\visualizer.css' rel='stylesheet'>
<script src='target\classes\pl\gdela\socomo\visualizer\visualizer.js'></script>
<script src='https://cdn.jsdelivr.net/gh/gdela/[email protected]/dist/bundle.min.js'></script>
<link href='https://cdn.jsdelivr.net/gh/gdela/[email protected]/dist/bundle.min.css' rel='stylesheet'>
</head>
<body>
<script>
Expand Down
13 changes: 10 additions & 3 deletions socomo-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>pl.gdela</groupId>
<artifactId>socomo-parent</artifactId>
<version>2.1-SNAPSHOT</version>
<version>2.0.2</version>
</parent>
<artifactId>socomo-maven</artifactId>
<packaging>maven-plugin</packaging>
Expand All @@ -16,6 +16,13 @@
Maven plugin for visualizing and analyzing source code modularity of a single java project.
</description>

<prerequisites>
<maven>${maven.version}</maven>
</prerequisites>
<properties>
<maven.version>3.3.9</maven.version>
</properties>

<dependencies>

<dependency>
Expand All @@ -28,7 +35,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>2.0</version>
<version>${maven.version}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
Expand All @@ -39,7 +46,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.6.0</version>
<version>${maven.version}</version>
</dependency>

<!-- Testing -->
Expand Down
6 changes: 2 additions & 4 deletions socomo-maven/socomo.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
<script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/cytoscape.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/klay.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/[email protected]/cytoscape-klay.min.js'></script>
<script src='..\socomo-core\target\classes\pl\gdela\socomo\visualizer\diagram-skin.js'></script>
<script src='..\socomo-core\target\classes\pl\gdela\socomo\visualizer\diagram.js'></script>
<link href='..\socomo-core\target\classes\pl\gdela\socomo\visualizer\visualizer.css' rel='stylesheet'>
<script src='..\socomo-core\target\classes\pl\gdela\socomo\visualizer\visualizer.js'></script>
<script src='https://cdn.jsdelivr.net/gh/gdela/[email protected]/dist/bundle.min.js'></script>
<link href='https://cdn.jsdelivr.net/gh/gdela/[email protected]/dist/bundle.min.css' rel='stylesheet'>
</head>
<body>
<script>
Expand Down

0 comments on commit 32254a0

Please sign in to comment.