Skip to content

Commit

Permalink
Switch to JBoss Nexus for deployment and minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
galderz committed Aug 29, 2012
1 parent fdafab9 commit 3f0892b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 113 deletions.
91 changes: 8 additions & 83 deletions dist/utils.py
Expand Up @@ -100,91 +100,18 @@ def prettyprint(message, level):

print "[%s%s%s] %s" % (start_color, level, end_color, message)

#def apply_defaults(s):
# for e in default_settings.items():
# if e[0] not in s:
# s[e[0]] = e[1]
# return s

def to_bool(x):
if type(x) == bool:
return x
if type(x) == str:
return {'true': True, 'false': False}.get(x.strip().lower())

#def get_settings():
# """Retrieves user-specific settings for all Infinispan tools. Returns a dict of key/value pairs, or an empty dict if the settings file doesn't exist."""
# f = None
# try:
# settings = {}
# f = open(settings_file)
# for l in f:
# if not l.strip().startswith("#"):
# kvp = l.split("=")
# if kvp and len(kvp) > 0 and kvp[0] and len(kvp) > 1:
# settings[kvp[0].strip()] = kvp[1].strip()
# settings = apply_defaults(settings)
# for k in boolean_keys:
# settings[k] = to_bool(settings[k])
# return settings
# except IOError as ioe:
# return {}
# finally:
# if f:
# f.close()

#settings = get_settings()

def input_with_default(msg, default):
i = raw_input("%s %s[%s]%s: " % (msg, Colors.magenta(), default, Colors.end_color()))
if i.strip() == "":
i = default
return i

#def handle_release_virgin():
# """This sounds dirty!"""
# prettyprint("""
# It appears that this is the first time you are using this script. I need to ask you a few questions before
# we can proceed. Default values are in brackets, just hitting ENTER will accept the default value.
#
# Lets get started!
# """, Levels.WARNING)
# s = {}
# s["verbose"] = input_with_default("Be verbose?", False)
# s["multi_threaded"] = input_with_default("Run multi-threaded? (Disable to debug)", True)
# s["use_colors"] = input_with_default("Use colors?", True)
# s = apply_defaults(s)
# f = open(settings_file, "w")
# try:
# for e in s.keys():
# f.write(" %s = %s \n" % (e, s[e]))
# finally:
# f.close()

#def require_settings_file(recursive = False):
# """Tests whether the settings file exists, and if not prompts the user to create one."""
# f = None
# try:
# f = open(settings_file)
# except IOError as ioe:
# if not recursive:
# handle_release_virgin()
# require_settings_file(True)
# prettyprint("User-specific environment settings file %s created! Please start this script again!" % settings_file, Levels.INFO)
# sys.exit(4)
# else:
# prettyprint("User-specific environment settings file %s is missing! Cannot proceed!" % settings_file, Levels.FATAL)
# prettyprint("Please create a file called %s with the following lines:" % settings_file, Levels.FATAL)
# prettyprint( '''
# verbose = False
# use_colors = True
# multi_threaded = True
# ''', Levels.INFO)
# sys.exit(3)
# finally:
# if f:
# f.close()

def get_search_path(executable):
"""Retrieves a search path based on where the current executable is located. Returns a string to be prepended to add"""
in_bin_dir = re.compile('^.*/?bin/.*.py')
Expand Down Expand Up @@ -376,8 +303,14 @@ def upload(self, fr, to, type):

def maven_build_distribution(settings):
"""Builds the distribution in the current working dir"""
mvn_commands = [["clean"], ["deploy", "-Prelease"]]

mvn_commands = [['clean'], ['install']]

mvn_deploy = ['deploy', '-Prelease']
if settings.non_interactive:
mvn_deploy.append('-s')
mvn_deploy.append('/private/projectodd/private-escalante-settings.xml')

mvn_commands.append(mvn_deploy)
for c in mvn_commands:
c.append("-Dmaven.test.skip.exec=true")
if settings.dry_run:
Expand All @@ -390,10 +323,6 @@ def maven_build_distribution(settings):
c.insert(0, 'mvn')
subprocess.check_call(c)


#def get_version_pattern():
# return re.compile("^([4-9]\.[0-9])\.[0-9]\.(Final|(ALPHA|BETA|CR)[1-9][0-9]?)$", re.IGNORECASE)

def get_version_pattern():
return re.compile("^([0-9]\.[0-9])\.[0-9]", re.IGNORECASE)

Expand All @@ -410,8 +339,4 @@ def assert_python_minimum_version(major, minor):
if not (minor_ok and major_ok):
prettyprint( "This script requires Python >= %s.%s.0. You have %s" % (major, minor, sys.version), Levels.FATAL)
sys.exit(3)





43 changes: 13 additions & 30 deletions pom.xml
Expand Up @@ -53,17 +53,15 @@
<mailingLists>
<mailingList>
<name>Escalante Users</name>
<!--<subscribe>https://lists.jboss.org/mailman/listinfo/infinispan-issues</subscribe>-->
<!--<unsubscribe>https://lists.jboss.org/mailman/listinfo/infinispan-issues</unsubscribe>-->
<!--<post>infinispan-issues@lists.jboss.org</post>-->
<!--<archive>http://lists.jboss.org/pipermail/infinispan-issues/</archive>-->
<post>http://stackoverflow.com/tags/escalante</post>
<archive>http://stackoverflow.com/tags/escalante</archive>
</mailingList>
<mailingList>
<name>Escalante Developers</name>
<!--<subscribe>https://lists.jboss.org/mailman/listinfo/infinispan-dev</subscribe>-->
<!--<unsubscribe>https://lists.jboss.org/mailman/listinfo/infinispan-dev</unsubscribe>-->
<!--<post>infinispan-dev@lists.jboss.org</post>-->
<!--<archive>http://lists.jboss.org/pipermail/infinispan-dev/</archive>-->
<subscribe>escalante-dev-subscribe@escalante.io</subscribe>
<unsubscribe>escalante-dev-unsubscribe@escalante.io</unsubscribe>
<post>escalante-dev@escalante.io</post>
<archive>http://markmail.org/search/?q=io.escalante.escalante-dev+list%3Aio.escalante.escalante-dev+order%3Adate-backward</archive>
</mailingList>
</mailingLists>
<issueManagement>
Expand All @@ -80,16 +78,17 @@
<!--</notifier>-->
<!--</notifiers>-->
<!--</ciManagement>-->

<distributionManagement>
<repository>
<id>projectodd-releases-repository</id>
<name>ProjectOdd Release Repository</name>
<url>dav:https://repository-projectodd.forge.cloudbees.com/release</url>
<id>jboss-releases-repository</id>
<name>JBoss Release Repository</name>
<url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>projectodd-snapshots-repository</id>
<name>ProjectOdd Snapshot Repository</name>
<url>dav:https://repository-projectodd.forge.cloudbees.com/snapshot</url>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshot Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

Expand Down Expand Up @@ -195,12 +194,6 @@
<version>${project.version}</version>
<type>test-jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>escalante-test-lift24-scala28</artifactId>
<version>${project.version}</version>
<type>test-jar</type>
</dependency>

<dependency>
<groupId>org.scalatest</groupId>
Expand Down Expand Up @@ -457,14 +450,4 @@
</pluginRepository>
</pluginRepositories>

<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-webdav-jackrabbit</artifactId>
<version>1.0-beta-7</version>
</extension>
</extensions>
</build>

</project>

0 comments on commit 3f0892b

Please sign in to comment.